using System; using System.Collections; using System.Runtime.InteropServices; using System.Threading; namespace System.Globalization { /// Defines how values are formatted and displayed, depending on the culture. // Token: 0x02000181 RID: 385 [ComVisible(true)] [Serializable] public sealed class DateTimeFormatInfo : ICloneable, IFormatProvider { // Token: 0x060012C7 RID: 4807 RVA: 0x00049B88 File Offset: 0x00047D88 internal DateTimeFormatInfo(bool read_only) { this.m_isReadOnly = read_only; this.amDesignator = "AM"; this.pmDesignator = "PM"; this.dateSeparator = "/"; this.timeSeparator = ":"; this.shortDatePattern = "MM/dd/yyyy"; this.longDatePattern = "dddd, dd MMMM yyyy"; this.shortTimePattern = "HH:mm"; this.longTimePattern = "HH:mm:ss"; this.monthDayPattern = "MMMM dd"; this.yearMonthPattern = "yyyy MMMM"; this.fullDateTimePattern = "dddd, dd MMMM yyyy HH:mm:ss"; this._RFC1123Pattern = "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'"; this._SortableDateTimePattern = "yyyy'-'MM'-'dd'T'HH':'mm':'ss"; this._UniversalSortableDateTimePattern = "yyyy'-'MM'-'dd HH':'mm':'ss'Z'"; this.firstDayOfWeek = 0; this.calendar = new GregorianCalendar(); this.calendarWeekRule = 0; this.abbreviatedDayNames = DateTimeFormatInfo.INVARIANT_ABBREVIATED_DAY_NAMES; this.dayNames = DateTimeFormatInfo.INVARIANT_DAY_NAMES; this.abbreviatedMonthNames = DateTimeFormatInfo.INVARIANT_ABBREVIATED_MONTH_NAMES; this.monthNames = DateTimeFormatInfo.INVARIANT_MONTH_NAMES; this.m_genitiveAbbreviatedMonthNames = DateTimeFormatInfo.INVARIANT_ABBREVIATED_MONTH_NAMES; this.genitiveMonthNames = DateTimeFormatInfo.INVARIANT_MONTH_NAMES; this.shortDayNames = DateTimeFormatInfo.INVARIANT_SHORT_DAY_NAMES; } /// Initializes a new writable instance of the class that is culture-independent (invariant). // Token: 0x060012C8 RID: 4808 RVA: 0x00049CA4 File Offset: 0x00047EA4 public DateTimeFormatInfo() : this(false) { } /// Returns the associated with the specified . /// A associated with the specified . /// The that gets the .-or- null to get . // Token: 0x060012CA RID: 4810 RVA: 0x00049E94 File Offset: 0x00048094 public static DateTimeFormatInfo GetInstance(IFormatProvider provider) { if (provider != null) { DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)provider.GetFormat(typeof(DateTimeFormatInfo)); if (dateTimeFormatInfo != null) { return dateTimeFormatInfo; } } return DateTimeFormatInfo.CurrentInfo; } /// Gets a value indicating whether the object is read-only. /// true if the object is read-only; otherwise, false. // Token: 0x17000327 RID: 807 // (get) Token: 0x060012CB RID: 4811 RVA: 0x00049ECC File Offset: 0x000480CC public bool IsReadOnly { get { return this.m_isReadOnly; } } /// Returns a read-only wrapper. /// A read-only wrapper around . /// The to wrap. /// /// is null. // Token: 0x060012CC RID: 4812 RVA: 0x00049ED4 File Offset: 0x000480D4 public static DateTimeFormatInfo ReadOnly(DateTimeFormatInfo dtfi) { DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)dtfi.Clone(); dateTimeFormatInfo.m_isReadOnly = true; return dateTimeFormatInfo; } /// Creates a shallow copy of the . /// A new copied from the original . // Token: 0x060012CD RID: 4813 RVA: 0x00049EF8 File Offset: 0x000480F8 public object Clone() { DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)base.MemberwiseClone(); dateTimeFormatInfo.m_isReadOnly = false; return dateTimeFormatInfo; } /// Returns an object of the specified type that provides a formatting service. /// The current , if is the same as the type of the current ; otherwise, null. /// The of the required formatting service. // Token: 0x060012CE RID: 4814 RVA: 0x00049F1C File Offset: 0x0004811C public object GetFormat(Type formatType) { return (formatType != base.GetType()) ? null : this; } /// Returns the string containing the abbreviated name of the specified era, if an abbreviation exists. /// A string containing the abbreviated name of the specified era, if an abbreviation exists.-or- A string containing the full name of the era, if an abbreviation does not exist. /// The integer representing the era. /// /// does not represent a valid era in the calendar specified in the property. // Token: 0x060012CF RID: 4815 RVA: 0x00049F34 File Offset: 0x00048134 public string GetAbbreviatedEraName(int era) { if (era < 0 || era >= this.calendar.AbbreviatedEraNames.Length) { throw new ArgumentOutOfRangeException("era", era.ToString()); } return this.calendar.AbbreviatedEraNames[era]; } /// Returns the culture-specific abbreviated name of the specified month based on the culture associated with the current object. /// The culture-specific abbreviated name of the month represented by . /// An integer from 1 through 13 representing the name of the month to retrieve. /// /// is less than 1 or greater than 13. // Token: 0x060012D0 RID: 4816 RVA: 0x00049F7C File Offset: 0x0004817C public string GetAbbreviatedMonthName(int month) { if (month < 1 || month > 13) { throw new ArgumentOutOfRangeException(); } return this.abbreviatedMonthNames[month - 1]; } /// Returns the integer representing the specified era. /// The integer representing the era, if is valid; otherwise, -1. /// The string containing the name of the era. /// /// is null. // Token: 0x060012D1 RID: 4817 RVA: 0x00049FA0 File Offset: 0x000481A0 public int GetEra(string eraName) { if (eraName == null) { throw new ArgumentNullException(); } string[] array = this.calendar.EraNames; for (int i = 0; i < array.Length; i++) { if (CultureInfo.InvariantCulture.CompareInfo.Compare(eraName, array[i], CompareOptions.IgnoreCase) == 0) { return this.calendar.Eras[i]; } } array = this.calendar.AbbreviatedEraNames; for (int j = 0; j < array.Length; j++) { if (CultureInfo.InvariantCulture.CompareInfo.Compare(eraName, array[j], CompareOptions.IgnoreCase) == 0) { return this.calendar.Eras[j]; } } return -1; } /// Returns the string containing the name of the specified era. /// A string containing the name of the era. /// The integer representing the era. /// /// does not represent a valid era in the calendar specified in the property. // Token: 0x060012D2 RID: 4818 RVA: 0x0004A048 File Offset: 0x00048248 public string GetEraName(int era) { if (era < 0 || era > this.calendar.EraNames.Length) { throw new ArgumentOutOfRangeException("era", era.ToString()); } return this.calendar.EraNames[era - 1]; } /// Returns the culture-specific full name of the specified month based on the culture associated with the current object. /// The culture-specific full name of the month represented by . /// An integer from 1 through 13 representing the name of the month to retrieve. /// /// is less than 1 or greater than 13. // Token: 0x060012D3 RID: 4819 RVA: 0x0004A090 File Offset: 0x00048290 public string GetMonthName(int month) { if (month < 1 || month > 13) { throw new ArgumentOutOfRangeException(); } return this.monthNames[month - 1]; } /// Gets or sets a one-dimensional array of type containing the culture-specific abbreviated names of the days of the week. /// A one-dimensional array of type containing the culture-specific abbreviated names of the days of the week. The array for contains "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat". /// The property is being set to null. /// The property is being set to an array that is multidimensional or that has a length that is not exactly 7. /// The property is being set and the is read-only. // Token: 0x17000328 RID: 808 // (get) Token: 0x060012D4 RID: 4820 RVA: 0x0004A0B4 File Offset: 0x000482B4 // (set) Token: 0x060012D5 RID: 4821 RVA: 0x0004A0C8 File Offset: 0x000482C8 public string[] AbbreviatedDayNames { get { return (string[])this.RawAbbreviatedDayNames.Clone(); } set { this.RawAbbreviatedDayNames = value; } } // Token: 0x17000329 RID: 809 // (get) Token: 0x060012D6 RID: 4822 RVA: 0x0004A0D4 File Offset: 0x000482D4 // (set) Token: 0x060012D7 RID: 4823 RVA: 0x0004A0DC File Offset: 0x000482DC internal string[] RawAbbreviatedDayNames { get { return this.abbreviatedDayNames; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } if (value.GetLength(0) != 7) { throw new ArgumentException(DateTimeFormatInfo.MSG_ARRAYSIZE_DAY); } this.abbreviatedDayNames = (string[])value.Clone(); } } /// Gets or sets a one-dimensional array of type containing the culture-specific abbreviated names of the months. /// A one-dimensional array of type containing the culture-specific abbreviated names of the months. In a 12-month calendar, the 13th element of the array is an empty string. The array for contains "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", and "". /// The property is being set to null. /// The property is being set to an array that is multidimensional or that has a length that is not exactly 13. /// The property is being set and the is read-only. // Token: 0x1700032A RID: 810 // (get) Token: 0x060012D8 RID: 4824 RVA: 0x0004A134 File Offset: 0x00048334 // (set) Token: 0x060012D9 RID: 4825 RVA: 0x0004A148 File Offset: 0x00048348 public string[] AbbreviatedMonthNames { get { return (string[])this.RawAbbreviatedMonthNames.Clone(); } set { this.RawAbbreviatedMonthNames = value; } } // Token: 0x1700032B RID: 811 // (get) Token: 0x060012DA RID: 4826 RVA: 0x0004A154 File Offset: 0x00048354 // (set) Token: 0x060012DB RID: 4827 RVA: 0x0004A15C File Offset: 0x0004835C internal string[] RawAbbreviatedMonthNames { get { return this.abbreviatedMonthNames; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } if (value.GetLength(0) != 13) { throw new ArgumentException(DateTimeFormatInfo.MSG_ARRAYSIZE_MONTH); } this.abbreviatedMonthNames = (string[])value.Clone(); } } /// Gets or sets a one-dimensional array of type containing the culture-specific full names of the days of the week. /// A one-dimensional array of type containing the culture-specific full names of the days of the week. The array for contains "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". /// The property is being set to null. /// The property is being set to an array that is multidimensional or that has a length that is not exactly 7. /// The property is being set and the is read-only. // Token: 0x1700032C RID: 812 // (get) Token: 0x060012DC RID: 4828 RVA: 0x0004A1B8 File Offset: 0x000483B8 // (set) Token: 0x060012DD RID: 4829 RVA: 0x0004A1CC File Offset: 0x000483CC public string[] DayNames { get { return (string[])this.RawDayNames.Clone(); } set { this.RawDayNames = value; } } // Token: 0x1700032D RID: 813 // (get) Token: 0x060012DE RID: 4830 RVA: 0x0004A1D8 File Offset: 0x000483D8 // (set) Token: 0x060012DF RID: 4831 RVA: 0x0004A1E0 File Offset: 0x000483E0 internal string[] RawDayNames { get { return this.dayNames; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } if (value.GetLength(0) != 7) { throw new ArgumentException(DateTimeFormatInfo.MSG_ARRAYSIZE_DAY); } this.dayNames = (string[])value.Clone(); } } /// Gets or sets a one-dimensional array of type containing the culture-specific full names of the months. /// A one-dimensional array of type containing the culture-specific full names of the months. In a 12-month calendar, the 13th element of the array is an empty string. The array for contains "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", and "". /// The property is being set to null. /// The property is being set to an array that is multidimensional or that has a length that is not exactly 13. /// The property is being set and the is read-only. // Token: 0x1700032E RID: 814 // (get) Token: 0x060012E0 RID: 4832 RVA: 0x0004A238 File Offset: 0x00048438 // (set) Token: 0x060012E1 RID: 4833 RVA: 0x0004A24C File Offset: 0x0004844C public string[] MonthNames { get { return (string[])this.RawMonthNames.Clone(); } set { this.RawMonthNames = value; } } // Token: 0x1700032F RID: 815 // (get) Token: 0x060012E2 RID: 4834 RVA: 0x0004A258 File Offset: 0x00048458 // (set) Token: 0x060012E3 RID: 4835 RVA: 0x0004A260 File Offset: 0x00048460 internal string[] RawMonthNames { get { return this.monthNames; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } if (value.GetLength(0) != 13) { throw new ArgumentException(DateTimeFormatInfo.MSG_ARRAYSIZE_MONTH); } this.monthNames = (string[])value.Clone(); } } /// Gets or sets the string designator for hours that are "ante meridiem" (before noon). /// The string designator for hours that are "ante meridiem" (before noon). The default for is "AM". /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000330 RID: 816 // (get) Token: 0x060012E4 RID: 4836 RVA: 0x0004A2BC File Offset: 0x000484BC // (set) Token: 0x060012E5 RID: 4837 RVA: 0x0004A2C4 File Offset: 0x000484C4 public string AMDesignator { get { return this.amDesignator; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.amDesignator = value; } } /// Gets or sets the string designator for hours that are "post meridiem" (after noon). /// The string designator for hours that are "post meridiem" (after noon). The default for is "PM". /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000331 RID: 817 // (get) Token: 0x060012E6 RID: 4838 RVA: 0x0004A2F0 File Offset: 0x000484F0 // (set) Token: 0x060012E7 RID: 4839 RVA: 0x0004A2F8 File Offset: 0x000484F8 public string PMDesignator { get { return this.pmDesignator; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.pmDesignator = value; } } /// Gets or sets the string that separates the components of a date, that is, the year, month, and day. /// The string that separates the components of a date, that is, the year, month, and day. The default for is "/". /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000332 RID: 818 // (get) Token: 0x060012E8 RID: 4840 RVA: 0x0004A324 File Offset: 0x00048524 // (set) Token: 0x060012E9 RID: 4841 RVA: 0x0004A32C File Offset: 0x0004852C public string DateSeparator { get { return this.dateSeparator; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.dateSeparator = value; } } /// Gets or sets the string that separates the components of time, that is, the hour, minutes, and seconds. /// The string that separates the components of time. The default for is ":". /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000333 RID: 819 // (get) Token: 0x060012EA RID: 4842 RVA: 0x0004A358 File Offset: 0x00048558 // (set) Token: 0x060012EB RID: 4843 RVA: 0x0004A360 File Offset: 0x00048560 public string TimeSeparator { get { return this.timeSeparator; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.timeSeparator = value; } } /// Gets or sets the format pattern for a long date value, which is associated with the "D" format pattern. /// The format pattern for a long date value, which is associated with the "D" format pattern. /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000334 RID: 820 // (get) Token: 0x060012EC RID: 4844 RVA: 0x0004A38C File Offset: 0x0004858C // (set) Token: 0x060012ED RID: 4845 RVA: 0x0004A394 File Offset: 0x00048594 public string LongDatePattern { get { return this.longDatePattern; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.longDatePattern = value; } } /// Gets or sets the format pattern for a short date value, which is associated with the "d" format pattern. /// The format pattern for a short date value, which is associated with the "d" format pattern. /// The property is being set to null. /// The property is being set and the object is read-only. // Token: 0x17000335 RID: 821 // (get) Token: 0x060012EE RID: 4846 RVA: 0x0004A3C0 File Offset: 0x000485C0 // (set) Token: 0x060012EF RID: 4847 RVA: 0x0004A3C8 File Offset: 0x000485C8 public string ShortDatePattern { get { return this.shortDatePattern; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.shortDatePattern = value; } } /// Gets or sets the format pattern for a short time value, which is associated with the "t" format pattern. /// The format pattern for a short time value, which is associated with the "t" format pattern. /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000336 RID: 822 // (get) Token: 0x060012F0 RID: 4848 RVA: 0x0004A3F4 File Offset: 0x000485F4 // (set) Token: 0x060012F1 RID: 4849 RVA: 0x0004A3FC File Offset: 0x000485FC public string ShortTimePattern { get { return this.shortTimePattern; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.shortTimePattern = value; } } /// Gets or sets the format pattern for a long time value, which is associated with the "T" format pattern. /// The format pattern for a long time value, which is associated with the "T" format pattern. /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000337 RID: 823 // (get) Token: 0x060012F2 RID: 4850 RVA: 0x0004A428 File Offset: 0x00048628 // (set) Token: 0x060012F3 RID: 4851 RVA: 0x0004A430 File Offset: 0x00048630 public string LongTimePattern { get { return this.longTimePattern; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.longTimePattern = value; } } /// Gets or sets the format pattern for a month and day value, which is associated with the "m" and "M" format patterns. /// The format pattern for a month and day value, which is associated with the "m" and "M" format patterns. /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000338 RID: 824 // (get) Token: 0x060012F4 RID: 4852 RVA: 0x0004A45C File Offset: 0x0004865C // (set) Token: 0x060012F5 RID: 4853 RVA: 0x0004A464 File Offset: 0x00048664 public string MonthDayPattern { get { return this.monthDayPattern; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.monthDayPattern = value; } } /// Gets or sets the format pattern for a year and month value, which is associated with the "y" and "Y" format patterns. /// The format pattern for a year and month value, which is associated with the "y" and "Y" format patterns. /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x17000339 RID: 825 // (get) Token: 0x060012F6 RID: 4854 RVA: 0x0004A490 File Offset: 0x00048690 // (set) Token: 0x060012F7 RID: 4855 RVA: 0x0004A498 File Offset: 0x00048698 public string YearMonthPattern { get { return this.yearMonthPattern; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.yearMonthPattern = value; } } /// Gets or sets the format pattern for a long date and long time value, which is associated with the "F" format pattern. /// The format pattern for a long date and long time value, which is associated with the "F" format pattern. /// The property is being set to null. /// The property is being set and the is read-only. // Token: 0x1700033A RID: 826 // (get) Token: 0x060012F8 RID: 4856 RVA: 0x0004A4C4 File Offset: 0x000486C4 // (set) Token: 0x060012F9 RID: 4857 RVA: 0x0004A4FC File Offset: 0x000486FC public string FullDateTimePattern { get { if (this.fullDateTimePattern != null) { return this.fullDateTimePattern; } return this.longDatePattern + " " + this.longTimePattern; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.fullDateTimePattern = value; } } /// Gets a read-only object that formats values based on the current culture. /// A read-only object based on the object for the current thread. // Token: 0x1700033B RID: 827 // (get) Token: 0x060012FA RID: 4858 RVA: 0x0004A528 File Offset: 0x00048728 public static DateTimeFormatInfo CurrentInfo { get { return Thread.CurrentThread.CurrentCulture.DateTimeFormat; } } /// Gets the default read-only that is culture-independent (invariant). /// The default read-only object that is culture-independent (invariant). // Token: 0x1700033C RID: 828 // (get) Token: 0x060012FB RID: 4859 RVA: 0x0004A53C File Offset: 0x0004873C public static DateTimeFormatInfo InvariantInfo { get { if (DateTimeFormatInfo.theInvariantDateTimeFormatInfo == null) { DateTimeFormatInfo.theInvariantDateTimeFormatInfo = DateTimeFormatInfo.ReadOnly(new DateTimeFormatInfo()); DateTimeFormatInfo.theInvariantDateTimeFormatInfo.FillInvariantPatterns(); } return DateTimeFormatInfo.theInvariantDateTimeFormatInfo; } } /// Gets or sets the first day of the week. /// A value representing the first day of the week. The default for is . /// The property is being set to a value that is not a valid value. /// The property is being set and the is read-only. // Token: 0x1700033D RID: 829 // (get) Token: 0x060012FC RID: 4860 RVA: 0x0004A574 File Offset: 0x00048774 // (set) Token: 0x060012FD RID: 4861 RVA: 0x0004A57C File Offset: 0x0004877C public DayOfWeek FirstDayOfWeek { get { return (DayOfWeek)this.firstDayOfWeek; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value < DayOfWeek.Sunday || value > DayOfWeek.Saturday) { throw new ArgumentOutOfRangeException(); } this.firstDayOfWeek = (int)value; } } /// Gets or sets the calendar to use for the current culture. /// The indicating the calendar to use for the current culture. The default for is the . /// The property is being set to null. /// The property is being set to a that is not valid for the current culture. /// The property is being set and the is read-only. // Token: 0x1700033E RID: 830 // (get) Token: 0x060012FE RID: 4862 RVA: 0x0004A5B0 File Offset: 0x000487B0 // (set) Token: 0x060012FF RID: 4863 RVA: 0x0004A5B8 File Offset: 0x000487B8 public Calendar Calendar { get { return this.calendar; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } if (value == null) { throw new ArgumentNullException(); } this.calendar = value; } } /// Gets or sets a value that specifies which rule is used to determine the first calendar week of the year. /// A value that determines the first calendar week of the year. The default for is . /// The property is being set to a value that is not a valid value. // Token: 0x1700033F RID: 831 // (get) Token: 0x06001300 RID: 4864 RVA: 0x0004A5E4 File Offset: 0x000487E4 // (set) Token: 0x06001301 RID: 4865 RVA: 0x0004A5EC File Offset: 0x000487EC public CalendarWeekRule CalendarWeekRule { get { return (CalendarWeekRule)this.calendarWeekRule; } set { if (this.IsReadOnly) { throw new InvalidOperationException(DateTimeFormatInfo.MSG_READONLY); } this.calendarWeekRule = (int)value; } } /// Gets the format pattern for a time value, which is based on the Internet Engineering Task Force (IETF) Request for Comments (RFC) 1123 specification and is associated with the "r" and "R" format patterns. /// The format pattern for a time value, which is based on the IETF RFC 1123 specification and is associated with the "r" and "R" format patterns. // Token: 0x17000340 RID: 832 // (get) Token: 0x06001302 RID: 4866 RVA: 0x0004A60C File Offset: 0x0004880C public string RFC1123Pattern { get { return this._RFC1123Pattern; } } // Token: 0x17000341 RID: 833 // (get) Token: 0x06001303 RID: 4867 RVA: 0x0004A614 File Offset: 0x00048814 internal string RoundtripPattern { get { return "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK"; } } /// Gets the format pattern for a sortable date and time value, which is associated with the "s" format pattern. /// The format pattern for a sortable date and time value, which is associated with the "s" format pattern. // Token: 0x17000342 RID: 834 // (get) Token: 0x06001304 RID: 4868 RVA: 0x0004A61C File Offset: 0x0004881C public string SortableDateTimePattern { get { return this._SortableDateTimePattern; } } /// Gets the format pattern for a universal sortable date and time value, which is associated with the "u" format pattern. /// The format pattern for a universal sortable date and time value, which is associated with the "u" format pattern. // Token: 0x17000343 RID: 835 // (get) Token: 0x06001305 RID: 4869 RVA: 0x0004A624 File Offset: 0x00048824 public string UniversalSortableDateTimePattern { get { return this._UniversalSortableDateTimePattern; } } /// Returns all the standard patterns in which date and time values can be formatted. /// An array containing the standard patterns in which date and time values can be formatted. // Token: 0x06001306 RID: 4870 RVA: 0x0004A62C File Offset: 0x0004882C public string[] GetAllDateTimePatterns() { return (string[])this.GetAllDateTimePatternsInternal().Clone(); } // Token: 0x06001307 RID: 4871 RVA: 0x0004A640 File Offset: 0x00048840 internal string[] GetAllDateTimePatternsInternal() { this.FillAllDateTimePatterns(); return this.all_date_time_patterns; } // Token: 0x06001308 RID: 4872 RVA: 0x0004A650 File Offset: 0x00048850 private void FillAllDateTimePatterns() { if (this.all_date_time_patterns != null) { return; } ArrayList arrayList = new ArrayList(); arrayList.AddRange(this.GetAllRawDateTimePatterns('d')); arrayList.AddRange(this.GetAllRawDateTimePatterns('D')); arrayList.AddRange(this.GetAllRawDateTimePatterns('g')); arrayList.AddRange(this.GetAllRawDateTimePatterns('G')); arrayList.AddRange(this.GetAllRawDateTimePatterns('f')); arrayList.AddRange(this.GetAllRawDateTimePatterns('F')); arrayList.AddRange(this.GetAllRawDateTimePatterns('m')); arrayList.AddRange(this.GetAllRawDateTimePatterns('M')); arrayList.AddRange(this.GetAllRawDateTimePatterns('r')); arrayList.AddRange(this.GetAllRawDateTimePatterns('R')); arrayList.AddRange(this.GetAllRawDateTimePatterns('s')); arrayList.AddRange(this.GetAllRawDateTimePatterns('t')); arrayList.AddRange(this.GetAllRawDateTimePatterns('T')); arrayList.AddRange(this.GetAllRawDateTimePatterns('u')); arrayList.AddRange(this.GetAllRawDateTimePatterns('U')); arrayList.AddRange(this.GetAllRawDateTimePatterns('y')); arrayList.AddRange(this.GetAllRawDateTimePatterns('Y')); this.all_date_time_patterns = (string[])arrayList.ToArray(typeof(string)); } /// Returns all the standard patterns in which date and time values can be formatted using the specified format pattern. /// An array containing the standard patterns in which date and time values can be formatted using the specified format pattern. /// A standard format pattern. /// /// is not a valid standard format pattern. // Token: 0x06001309 RID: 4873 RVA: 0x0004A77C File Offset: 0x0004897C public string[] GetAllDateTimePatterns(char format) { return (string[])this.GetAllRawDateTimePatterns(format).Clone(); } // Token: 0x0600130A RID: 4874 RVA: 0x0004A790 File Offset: 0x00048990 internal string[] GetAllRawDateTimePatterns(char format) { string[] array; switch (format) { case 'R': goto IL_2CB; default: switch (format) { case 'r': goto IL_2CB; case 's': return new string[] { this.SortableDateTimePattern }; case 't': if (this.allShortTimePatterns != null && this.allShortTimePatterns.Length > 0) { return this.allShortTimePatterns; } return new string[] { this.ShortTimePattern }; case 'u': return new string[] { this.UniversalSortableDateTimePattern }; default: switch (format) { case 'D': if (this.allLongDatePatterns != null && this.allLongDatePatterns.Length > 0) { return this.allLongDatePatterns; } return new string[] { this.LongDatePattern }; default: switch (format) { case 'd': if (this.allShortDatePatterns != null && this.allShortDatePatterns.Length > 0) { return this.allShortDatePatterns; } return new string[] { this.ShortDatePattern }; default: if (format != 'M' && format != 'm') { throw new ArgumentException("Format specifier was invalid."); } if (this.monthDayPatterns != null && this.monthDayPatterns.Length > 0) { return this.monthDayPatterns; } return new string[] { this.MonthDayPattern }; case 'f': array = this.PopulateCombinedList(this.allLongDatePatterns, this.allShortTimePatterns); if (array != null && array.Length > 0) { return array; } return new string[] { this.LongDatePattern + " " + this.ShortTimePattern }; case 'g': array = this.PopulateCombinedList(this.allShortDatePatterns, this.allShortTimePatterns); if (array != null && array.Length > 0) { return array; } return new string[] { this.ShortDatePattern + " " + this.ShortTimePattern }; } break; case 'F': break; case 'G': array = this.PopulateCombinedList(this.allShortDatePatterns, this.allLongTimePatterns); if (array != null && array.Length > 0) { return array; } return new string[] { this.ShortDatePattern + " " + this.LongTimePattern }; } break; case 'y': goto IL_29B; } break; case 'T': if (this.allLongTimePatterns != null && this.allLongTimePatterns.Length > 0) { return this.allLongTimePatterns; } return new string[] { this.LongTimePattern }; case 'U': break; case 'Y': goto IL_29B; } array = this.PopulateCombinedList(this.allLongDatePatterns, this.allLongTimePatterns); if (array != null && array.Length > 0) { return array; } return new string[] { this.LongDatePattern + " " + this.LongTimePattern }; IL_29B: if (this.yearMonthPatterns != null && this.yearMonthPatterns.Length > 0) { return this.yearMonthPatterns; } return new string[] { this.YearMonthPattern }; IL_2CB: return new string[] { this.RFC1123Pattern }; } /// Returns the culture-specific full name of the specified day of the week based on the culture associated with the current object. /// The culture-specific full name of the day of the week represented by . /// A value. /// /// is not a valid value. // Token: 0x0600130B RID: 4875 RVA: 0x0004AAA4 File Offset: 0x00048CA4 public string GetDayName(DayOfWeek dayofweek) { if (dayofweek < DayOfWeek.Sunday || dayofweek > DayOfWeek.Saturday) { throw new ArgumentOutOfRangeException(); } return this.dayNames[(int)dayofweek]; } /// Returns the culture-specific abbreviated name of the specified day of the week based on the culture associated with the current object. /// The culture-specific abbreviated name of the day of the week represented by . /// A value. /// /// is not a valid value. // Token: 0x0600130C RID: 4876 RVA: 0x0004AAD0 File Offset: 0x00048CD0 public string GetAbbreviatedDayName(DayOfWeek dayofweek) { if (dayofweek < DayOfWeek.Sunday || dayofweek > DayOfWeek.Saturday) { throw new ArgumentOutOfRangeException(); } return this.abbreviatedDayNames[(int)dayofweek]; } // Token: 0x0600130D RID: 4877 RVA: 0x0004AAFC File Offset: 0x00048CFC private void FillInvariantPatterns() { this.allShortDatePatterns = new string[] { "MM/dd/yyyy" }; this.allLongDatePatterns = new string[] { "dddd, dd MMMM yyyy" }; this.allLongTimePatterns = new string[] { "HH:mm:ss" }; this.allShortTimePatterns = new string[] { "HH:mm", "hh:mm tt", "H:mm", "h:mm tt" }; this.monthDayPatterns = new string[] { "MMMM dd" }; this.yearMonthPatterns = new string[] { "yyyy MMMM" }; } // Token: 0x0600130E RID: 4878 RVA: 0x0004AB9C File Offset: 0x00048D9C private string[] PopulateCombinedList(string[] dates, string[] times) { if (dates != null && times != null) { string[] array = new string[dates.Length * times.Length]; int num = 0; foreach (string text in dates) { foreach (string text2 in times) { array[num++] = text + " " + text2; } } return array; } return null; } /// Gets or sets a string array of abbreviated month names associated with the current object. /// A string array of abbreviated month names. /// In a set operation, the value array or one of the elements of the value array is null. // Token: 0x17000344 RID: 836 // (get) Token: 0x0600130F RID: 4879 RVA: 0x0004AC20 File Offset: 0x00048E20 // (set) Token: 0x06001310 RID: 4880 RVA: 0x0004AC28 File Offset: 0x00048E28 [ComVisible(false)] [MonoTODO("Returns only the English month abbreviated names")] public string[] AbbreviatedMonthGenitiveNames { get { return this.m_genitiveAbbreviatedMonthNames; } set { this.m_genitiveAbbreviatedMonthNames = value; } } /// Gets or sets a string array of month names associated with the current object. /// A string array of month names. /// In a set operation, the value array or one of the elements of the value array is null. // Token: 0x17000345 RID: 837 // (get) Token: 0x06001311 RID: 4881 RVA: 0x0004AC34 File Offset: 0x00048E34 // (set) Token: 0x06001312 RID: 4882 RVA: 0x0004AC3C File Offset: 0x00048E3C [ComVisible(false)] [MonoTODO("Returns only the English moth names")] public string[] MonthGenitiveNames { get { return this.genitiveMonthNames; } set { this.genitiveMonthNames = value; } } /// Gets the native name of the calendar associated with the current object. /// The native name of the calendar used in the culture associated with the current object if that name is available, or the empty string ("") if the native calendar name is not available. // Token: 0x17000346 RID: 838 // (get) Token: 0x06001313 RID: 4883 RVA: 0x0004AC48 File Offset: 0x00048E48 [MonoTODO("Returns an empty string as if the calendar name wasn't available")] [ComVisible(false)] public string NativeCalendarName { get { return string.Empty; } } /// Gets or sets a string array of the shortest unique abbreviated day names associated with the current object. /// A string array of day names. /// In a set operation, the value array or one of the elements of the value array is null. // Token: 0x17000347 RID: 839 // (get) Token: 0x06001314 RID: 4884 RVA: 0x0004AC50 File Offset: 0x00048E50 // (set) Token: 0x06001315 RID: 4885 RVA: 0x0004AC58 File Offset: 0x00048E58 [ComVisible(false)] public string[] ShortestDayNames { get { return this.shortDayNames; } set { if (value == null) { throw new ArgumentNullException(); } if (value.Length != 7) { throw new ArgumentException("Array must have 7 entries"); } for (int i = 0; i < 7; i++) { if (value[i] == null) { throw new ArgumentNullException(string.Format("Element {0} is null", i)); } } this.shortDayNames = value; } } /// Obtains the shortest abbreviated day name for a specified day of the week associated with the current object. /// The abbreviated name of the week that corresponds to the parameter. /// One of the values. // Token: 0x06001316 RID: 4886 RVA: 0x0004ACBC File Offset: 0x00048EBC [ComVisible(false)] public string GetShortestDayName(DayOfWeek dayOfWeek) { if (dayOfWeek < DayOfWeek.Sunday || dayOfWeek > DayOfWeek.Saturday) { throw new ArgumentOutOfRangeException(); } return this.shortDayNames[(int)dayOfWeek]; } /// Sets all the custom date and time format strings that correspond to a specified standard format string. /// An array of custom format strings. /// The standard format string associated with the custom format strings specified in the parameter. /// /// is a zero-length array.-or- is not a valid standard format string or is a standard format string whose patterns cannot be set. /// /// is null.-or- has an array element whose value is null. /// This object is read-only. // Token: 0x06001317 RID: 4887 RVA: 0x0004ACE8 File Offset: 0x00048EE8 [ComVisible(false)] public void SetAllDateTimePatterns(string[] patterns, char format) { if (patterns == null) { throw new ArgumentNullException("patterns"); } if (patterns.Length == 0) { throw new ArgumentException("patterns", "The argument patterns must not be of zero-length"); } if (format != 'D') { if (format != 'M') { if (format != 'T') { if (format != 'Y') { if (format == 'd') { this.allShortDatePatterns = patterns; return; } if (format == 'm') { goto IL_7C; } if (format == 't') { this.allShortTimePatterns = patterns; return; } if (format != 'y') { throw new ArgumentException("format", "Format specifier is invalid"); } } this.yearMonthPatterns = patterns; return; } this.allLongTimePatterns = patterns; return; } IL_7C: this.monthDayPatterns = patterns; } else { this.allLongDatePatterns = patterns; } } // Token: 0x0400050D RID: 1293 private const string _RoundtripPattern = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK"; // Token: 0x0400050E RID: 1294 private static readonly string MSG_READONLY = "This instance is read only"; // Token: 0x0400050F RID: 1295 private static readonly string MSG_ARRAYSIZE_MONTH = "An array with exactly 13 elements is needed"; // Token: 0x04000510 RID: 1296 private static readonly string MSG_ARRAYSIZE_DAY = "An array with exactly 7 elements is needed"; // Token: 0x04000511 RID: 1297 private static readonly string[] INVARIANT_ABBREVIATED_DAY_NAMES = new string[] { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; // Token: 0x04000512 RID: 1298 private static readonly string[] INVARIANT_DAY_NAMES = new string[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; // Token: 0x04000513 RID: 1299 private static readonly string[] INVARIANT_ABBREVIATED_MONTH_NAMES = new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", string.Empty }; // Token: 0x04000514 RID: 1300 private static readonly string[] INVARIANT_MONTH_NAMES = new string[] { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", string.Empty }; // Token: 0x04000515 RID: 1301 private static readonly string[] INVARIANT_SHORT_DAY_NAMES = new string[] { "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" }; // Token: 0x04000516 RID: 1302 private static DateTimeFormatInfo theInvariantDateTimeFormatInfo; // Token: 0x04000517 RID: 1303 private bool m_isReadOnly; // Token: 0x04000518 RID: 1304 private string amDesignator; // Token: 0x04000519 RID: 1305 private string pmDesignator; // Token: 0x0400051A RID: 1306 private string dateSeparator; // Token: 0x0400051B RID: 1307 private string timeSeparator; // Token: 0x0400051C RID: 1308 private string shortDatePattern; // Token: 0x0400051D RID: 1309 private string longDatePattern; // Token: 0x0400051E RID: 1310 private string shortTimePattern; // Token: 0x0400051F RID: 1311 private string longTimePattern; // Token: 0x04000520 RID: 1312 private string monthDayPattern; // Token: 0x04000521 RID: 1313 private string yearMonthPattern; // Token: 0x04000522 RID: 1314 private string fullDateTimePattern; // Token: 0x04000523 RID: 1315 private string _RFC1123Pattern; // Token: 0x04000524 RID: 1316 private string _SortableDateTimePattern; // Token: 0x04000525 RID: 1317 private string _UniversalSortableDateTimePattern; // Token: 0x04000526 RID: 1318 private int firstDayOfWeek; // Token: 0x04000527 RID: 1319 private Calendar calendar; // Token: 0x04000528 RID: 1320 private int calendarWeekRule; // Token: 0x04000529 RID: 1321 private string[] abbreviatedDayNames; // Token: 0x0400052A RID: 1322 private string[] dayNames; // Token: 0x0400052B RID: 1323 private string[] monthNames; // Token: 0x0400052C RID: 1324 private string[] abbreviatedMonthNames; // Token: 0x0400052D RID: 1325 private string[] allShortDatePatterns; // Token: 0x0400052E RID: 1326 private string[] allLongDatePatterns; // Token: 0x0400052F RID: 1327 private string[] allShortTimePatterns; // Token: 0x04000530 RID: 1328 private string[] allLongTimePatterns; // Token: 0x04000531 RID: 1329 private string[] monthDayPatterns; // Token: 0x04000532 RID: 1330 private string[] yearMonthPatterns; // Token: 0x04000533 RID: 1331 private string[] shortDayNames; // Token: 0x04000534 RID: 1332 private int nDataItem; // Token: 0x04000535 RID: 1333 private bool m_useUserOverride; // Token: 0x04000536 RID: 1334 private bool m_isDefaultCalendar; // Token: 0x04000537 RID: 1335 private int CultureID; // Token: 0x04000538 RID: 1336 private bool bUseCalendarInfo; // Token: 0x04000539 RID: 1337 private string generalShortTimePattern; // Token: 0x0400053A RID: 1338 private string generalLongTimePattern; // Token: 0x0400053B RID: 1339 private string[] m_eraNames; // Token: 0x0400053C RID: 1340 private string[] m_abbrevEraNames; // Token: 0x0400053D RID: 1341 private string[] m_abbrevEnglishEraNames; // Token: 0x0400053E RID: 1342 private string[] m_dateWords; // Token: 0x0400053F RID: 1343 private int[] optionalCalendars; // Token: 0x04000540 RID: 1344 private string[] m_superShortDayNames; // Token: 0x04000541 RID: 1345 private string[] genitiveMonthNames; // Token: 0x04000542 RID: 1346 private string[] m_genitiveAbbreviatedMonthNames; // Token: 0x04000543 RID: 1347 private string[] leapYearMonthNames; // Token: 0x04000544 RID: 1348 private DateTimeFormatFlags formatFlags; // Token: 0x04000545 RID: 1349 private string m_name; // Token: 0x04000546 RID: 1350 private volatile string[] all_date_time_patterns; } }