1436 lines
56 KiB
C#
1436 lines
56 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
using System.Threading;
|
|
|
|
namespace System.Globalization
|
|
{
|
|
/// <summary>Defines how <see cref="T:System.DateTime" /> values are formatted and displayed, depending on the culture.</summary>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Initializes a new writable instance of the <see cref="T:System.Globalization.DateTimeFormatInfo" /> class that is culture-independent (invariant).</summary>
|
|
// Token: 0x060012C8 RID: 4808 RVA: 0x00049CA4 File Offset: 0x00047EA4
|
|
public DateTimeFormatInfo()
|
|
: this(false)
|
|
{
|
|
}
|
|
|
|
/// <summary>Returns the <see cref="T:System.Globalization.DateTimeFormatInfo" /> associated with the specified <see cref="T:System.IFormatProvider" />.</summary>
|
|
/// <returns>A <see cref="T:System.Globalization.DateTimeFormatInfo" /> associated with the specified <see cref="T:System.IFormatProvider" />.</returns>
|
|
/// <param name="provider">The <see cref="T:System.IFormatProvider" /> that gets the <see cref="T:System.Globalization.DateTimeFormatInfo" />.-or- null to get <see cref="P:System.Globalization.DateTimeFormatInfo.CurrentInfo" />. </param>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether the <see cref="T:System.Globalization.DateTimeFormatInfo" /> object is read-only.</summary>
|
|
/// <returns>true if the <see cref="T:System.Globalization.DateTimeFormatInfo" /> object is read-only; otherwise, false.</returns>
|
|
// Token: 0x17000327 RID: 807
|
|
// (get) Token: 0x060012CB RID: 4811 RVA: 0x00049ECC File Offset: 0x000480CC
|
|
public bool IsReadOnly
|
|
{
|
|
get
|
|
{
|
|
return this.m_isReadOnly;
|
|
}
|
|
}
|
|
|
|
/// <summary>Returns a read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> wrapper.</summary>
|
|
/// <returns>A read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> wrapper around <paramref name="dtfi" />.</returns>
|
|
/// <param name="dtfi">The <see cref="T:System.Globalization.DateTimeFormatInfo" /> to wrap. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="dtfi" /> is null. </exception>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Creates a shallow copy of the <see cref="T:System.Globalization.DateTimeFormatInfo" />.</summary>
|
|
/// <returns>A new <see cref="T:System.Globalization.DateTimeFormatInfo" /> copied from the original <see cref="T:System.Globalization.DateTimeFormatInfo" />.</returns>
|
|
// Token: 0x060012CD RID: 4813 RVA: 0x00049EF8 File Offset: 0x000480F8
|
|
public object Clone()
|
|
{
|
|
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)base.MemberwiseClone();
|
|
dateTimeFormatInfo.m_isReadOnly = false;
|
|
return dateTimeFormatInfo;
|
|
}
|
|
|
|
/// <summary>Returns an object of the specified type that provides a <see cref="T:System.DateTime" /> formatting service.</summary>
|
|
/// <returns>The current <see cref="T:System.Globalization.DateTimeFormatInfo" />, if <paramref name="formatType" /> is the same as the type of the current <see cref="T:System.Globalization.DateTimeFormatInfo" />; otherwise, null.</returns>
|
|
/// <param name="formatType">The <see cref="T:System.Type" /> of the required formatting service. </param>
|
|
// Token: 0x060012CE RID: 4814 RVA: 0x00049F1C File Offset: 0x0004811C
|
|
public object GetFormat(Type formatType)
|
|
{
|
|
return (formatType != base.GetType()) ? null : this;
|
|
}
|
|
|
|
/// <summary>Returns the string containing the abbreviated name of the specified era, if an abbreviation exists.</summary>
|
|
/// <returns>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.</returns>
|
|
/// <param name="era">The integer representing the era. </param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="era" /> does not represent a valid era in the calendar specified in the <see cref="P:System.Globalization.DateTimeFormatInfo.Calendar" /> property. </exception>
|
|
// 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];
|
|
}
|
|
|
|
/// <summary>Returns the culture-specific abbreviated name of the specified month based on the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>The culture-specific abbreviated name of the month represented by <paramref name="month" />.</returns>
|
|
/// <param name="month">An integer from 1 through 13 representing the name of the month to retrieve. </param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="month" /> is less than 1 or greater than 13. </exception>
|
|
// 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];
|
|
}
|
|
|
|
/// <summary>Returns the integer representing the specified era.</summary>
|
|
/// <returns>The integer representing the era, if <paramref name="eraName" /> is valid; otherwise, -1.</returns>
|
|
/// <param name="eraName">The string containing the name of the era. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="eraName" /> is null. </exception>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Returns the string containing the name of the specified era.</summary>
|
|
/// <returns>A string containing the name of the era.</returns>
|
|
/// <param name="era">The integer representing the era. </param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="era" /> does not represent a valid era in the calendar specified in the <see cref="P:System.Globalization.DateTimeFormatInfo.Calendar" /> property. </exception>
|
|
// 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];
|
|
}
|
|
|
|
/// <summary>Returns the culture-specific full name of the specified month based on the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>The culture-specific full name of the month represented by <paramref name="month" />.</returns>
|
|
/// <param name="month">An integer from 1 through 13 representing the name of the month to retrieve. </param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="month" /> is less than 1 or greater than 13. </exception>
|
|
// 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];
|
|
}
|
|
|
|
/// <summary>Gets or sets a one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific abbreviated names of the days of the week.</summary>
|
|
/// <returns>A one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific abbreviated names of the days of the week. The array for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> contains "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat".</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.ArgumentException">The property is being set to an array that is multidimensional or that has a length that is not exactly 7. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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();
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets a one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific abbreviated names of the months.</summary>
|
|
/// <returns>A one-dimensional array of type <see cref="T:System.String" /> 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 <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> contains "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", and "".</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.ArgumentException">The property is being set to an array that is multidimensional or that has a length that is not exactly 13. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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();
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets a one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific full names of the days of the week.</summary>
|
|
/// <returns>A one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific full names of the days of the week. The array for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> contains "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday".</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.ArgumentException">The property is being set to an array that is multidimensional or that has a length that is not exactly 7. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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();
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets a one-dimensional array of type <see cref="T:System.String" /> containing the culture-specific full names of the months.</summary>
|
|
/// <returns>A one-dimensional array of type <see cref="T:System.String" /> 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 <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> contains "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", and "".</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.ArgumentException">The property is being set to an array that is multidimensional or that has a length that is not exactly 13. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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();
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the string designator for hours that are "ante meridiem" (before noon).</summary>
|
|
/// <returns>The string designator for hours that are "ante meridiem" (before noon). The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is "AM".</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the string designator for hours that are "post meridiem" (after noon).</summary>
|
|
/// <returns>The string designator for hours that are "post meridiem" (after noon). The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is "PM".</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the string that separates the components of a date, that is, the year, month, and day.</summary>
|
|
/// <returns>The string that separates the components of a date, that is, the year, month, and day. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is "/".</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the string that separates the components of time, that is, the hour, minutes, and seconds.</summary>
|
|
/// <returns>The string that separates the components of time. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is ":".</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the format pattern for a long date value, which is associated with the "D" format pattern.</summary>
|
|
/// <returns>The format pattern for a long date value, which is associated with the "D" format pattern.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the format pattern for a short date value, which is associated with the "d" format pattern.</summary>
|
|
/// <returns>The format pattern for a short date value, which is associated with the "d" format pattern.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> object is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the format pattern for a short time value, which is associated with the "t" format pattern.</summary>
|
|
/// <returns>The format pattern for a short time value, which is associated with the "t" format pattern.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the format pattern for a long time value, which is associated with the "T" format pattern.</summary>
|
|
/// <returns>The format pattern for a long time value, which is associated with the "T" format pattern.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the format pattern for a month and day value, which is associated with the "m" and "M" format patterns.</summary>
|
|
/// <returns>The format pattern for a month and day value, which is associated with the "m" and "M" format patterns.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the format pattern for a year and month value, which is associated with the "y" and "Y" format patterns.</summary>
|
|
/// <returns>The format pattern for a year and month value, which is associated with the "y" and "Y" format patterns.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the format pattern for a long date and long time value, which is associated with the "F" format pattern.</summary>
|
|
/// <returns>The format pattern for a long date and long time value, which is associated with the "F" format pattern.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> object that formats values based on the current culture.</summary>
|
|
/// <returns>A read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> object based on the <see cref="T:System.Globalization.CultureInfo" /> object for the current thread.</returns>
|
|
// Token: 0x1700033B RID: 827
|
|
// (get) Token: 0x060012FA RID: 4858 RVA: 0x0004A528 File Offset: 0x00048728
|
|
public static DateTimeFormatInfo CurrentInfo
|
|
{
|
|
get
|
|
{
|
|
return Thread.CurrentThread.CurrentCulture.DateTimeFormat;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the default read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> that is culture-independent (invariant).</summary>
|
|
/// <returns>The default read-only <see cref="T:System.Globalization.DateTimeFormatInfo" /> object that is culture-independent (invariant).</returns>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the first day of the week.</summary>
|
|
/// <returns>A <see cref="T:System.DayOfWeek" /> value representing the first day of the week. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is <see cref="F:System.DayOfWeek.Sunday" />.</returns>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is not a valid <see cref="T:System.DayOfWeek" /> value. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the calendar to use for the current culture.</summary>
|
|
/// <returns>The <see cref="T:System.Globalization.Calendar" /> indicating the calendar to use for the current culture. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is the <see cref="T:System.Globalization.GregorianCalendar" />.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">The property is being set to null. </exception>
|
|
/// <exception cref="T:System.ArgumentException">The property is being set to a <see cref="T:System.Globalization.Calendar" /> that is not valid for the current culture. </exception>
|
|
/// <exception cref="T:System.InvalidOperationException">The property is being set and the <see cref="T:System.Globalization.DateTimeFormatInfo" /> is read-only. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets a value that specifies which rule is used to determine the first calendar week of the year.</summary>
|
|
/// <returns>A <see cref="T:System.Globalization.CalendarWeekRule" /> value that determines the first calendar week of the year. The default for <see cref="P:System.Globalization.DateTimeFormatInfo.InvariantInfo" /> is <see cref="F:System.Globalization.CalendarWeekRule.FirstDay" />.</returns>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is being set to a value that is not a valid <see cref="T:System.Globalization.CalendarWeekRule" /> value. </exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
/// <returns>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.</returns>
|
|
// 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";
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the format pattern for a sortable date and time value, which is associated with the "s" format pattern.</summary>
|
|
/// <returns>The format pattern for a sortable date and time value, which is associated with the "s" format pattern.</returns>
|
|
// Token: 0x17000342 RID: 834
|
|
// (get) Token: 0x06001304 RID: 4868 RVA: 0x0004A61C File Offset: 0x0004881C
|
|
public string SortableDateTimePattern
|
|
{
|
|
get
|
|
{
|
|
return this._SortableDateTimePattern;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the format pattern for a universal sortable date and time value, which is associated with the "u" format pattern.</summary>
|
|
/// <returns>The format pattern for a universal sortable date and time value, which is associated with the "u" format pattern.</returns>
|
|
// Token: 0x17000343 RID: 835
|
|
// (get) Token: 0x06001305 RID: 4869 RVA: 0x0004A624 File Offset: 0x00048824
|
|
public string UniversalSortableDateTimePattern
|
|
{
|
|
get
|
|
{
|
|
return this._UniversalSortableDateTimePattern;
|
|
}
|
|
}
|
|
|
|
/// <summary>Returns all the standard patterns in which date and time values can be formatted.</summary>
|
|
/// <returns>An array containing the standard patterns in which date and time values can be formatted.</returns>
|
|
// 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));
|
|
}
|
|
|
|
/// <summary>Returns all the standard patterns in which date and time values can be formatted using the specified format pattern.</summary>
|
|
/// <returns>An array containing the standard patterns in which date and time values can be formatted using the specified format pattern.</returns>
|
|
/// <param name="format">A standard format pattern. </param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="format" /> is not a valid standard format pattern. </exception>
|
|
// 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 };
|
|
}
|
|
|
|
/// <summary>Returns the culture-specific full name of the specified day of the week based on the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>The culture-specific full name of the day of the week represented by <paramref name="dayofweek" />.</returns>
|
|
/// <param name="dayofweek">A <see cref="T:System.DayOfWeek" /> value. </param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="dayofweek" /> is not a valid <see cref="T:System.DayOfWeek" /> value. </exception>
|
|
// 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];
|
|
}
|
|
|
|
/// <summary>Returns the culture-specific abbreviated name of the specified day of the week based on the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>The culture-specific abbreviated name of the day of the week represented by <paramref name="dayofweek" />.</returns>
|
|
/// <param name="dayofweek">A <see cref="T:System.DayOfWeek" /> value. </param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="dayofweek" /> is not a valid <see cref="T:System.DayOfWeek" /> value. </exception>
|
|
// 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;
|
|
}
|
|
|
|
/// <summary>Gets or sets a string array of abbreviated month names associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>A string array of abbreviated month names.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">In a set operation, the value array or one of the elements of the value array is null.</exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets a string array of month names associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>A string array of month names.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">In a set operation, the value array or one of the elements of the value array is null.</exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the native name of the calendar associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>The native name of the calendar used in the culture associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object if that name is available, or the empty string ("") if the native calendar name is not available.</returns>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets a string array of the shortest unique abbreviated day names associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>A string array of day names.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">In a set operation, the value array or one of the elements of the value array is null.</exception>
|
|
// 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>Obtains the shortest abbreviated day name for a specified day of the week associated with the current <see cref="T:System.Globalization.DateTimeFormatInfo" /> object.</summary>
|
|
/// <returns>The abbreviated name of the week that corresponds to the <paramref name="dayOfWeek" /> parameter.</returns>
|
|
/// <param name="dayOfWeek">One of the <see cref="T:System.DayOfWeek" /> values.</param>
|
|
// 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];
|
|
}
|
|
|
|
/// <summary>Sets all the custom date and time format strings that correspond to a specified standard format string.</summary>
|
|
/// <param name="patterns">An array of custom format strings.</param>
|
|
/// <param name="format">The standard format string associated with the custom format strings specified in the <paramref name="patterns" /> parameter. </param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="patterns" /> is a zero-length array.-or-<paramref name="format" /> is not a valid standard format string or is a standard format string whose patterns cannot be set.</exception>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="patterns" /> is null.-or-<paramref name="patterns" /> has an array element whose value is null.</exception>
|
|
/// <exception cref="T:System.InvalidOperationException">This <see cref="T:System.Globalization.DateTimeFormatInfo" /> object is read-only.</exception>
|
|
// 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;
|
|
}
|
|
}
|