using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace System
{
/// Represents an instant in time, typically expressed as a date and time of day.
/// 1
// Token: 0x02000653 RID: 1619
[Serializable]
[StructLayout(LayoutKind.Auto)]
public struct DateTime : IFormattable, IConvertible, IComparable, IComparable, IEquatable
{
/// Initializes a new instance of the structure to a specified number of ticks.
/// A date and time expressed in the number of 100-nanosecond intervals that have elapsed since January 1, 0001 at 00:00:00.000 in the Gregorian calendar.
///
/// is less than or greater than .
// Token: 0x06003D24 RID: 15652 RVA: 0x000CDB84 File Offset: 0x000CBD84
public DateTime(long ticks)
{
this.ticks = new TimeSpan(ticks);
if (ticks < DateTime.MinValue.Ticks || ticks > DateTime.MaxValue.Ticks)
{
string text = Locale.GetText("Value {0} is outside the valid range [{1},{2}].", new object[]
{
ticks,
DateTime.MinValue.Ticks,
DateTime.MaxValue.Ticks
});
throw new ArgumentOutOfRangeException("ticks", text);
}
this.kind = DateTimeKind.Unspecified;
}
/// Initializes a new instance of the structure to the specified year, month, and day.
/// The year (1 through 9999).
/// The month (1 through 12).
/// The day (1 through the number of days in ).
///
/// is less than 1 or greater than 9999.-or- is less than 1 or greater than 12.-or- is less than 1 or greater than the number of days in .
/// The specified parameters evaluate to less than or more than .
// Token: 0x06003D25 RID: 15653 RVA: 0x000CDC1C File Offset: 0x000CBE1C
public DateTime(int year, int month, int day)
{
this = new DateTime(year, month, day, 0, 0, 0, 0);
}
/// Initializes a new instance of the structure to the specified year, month, day, hour, minute, and second.
/// The year (1 through 9999).
/// The month (1 through 12).
/// The day (1 through the number of days in ).
/// The hours (0 through 23).
/// The minutes (0 through 59).
/// The seconds (0 through 59).
///
/// is less than 1 or greater than 9999. -or- is less than 1 or greater than 12. -or- is less than 1 or greater than the number of days in .-or- is less than 0 or greater than 23. -or- is less than 0 or greater than 59. -or- is less than 0 or greater than 59.
/// The specified parameters evaluate to less than or more than .
// Token: 0x06003D26 RID: 15654 RVA: 0x000CDC38 File Offset: 0x000CBE38
public DateTime(int year, int month, int day, int hour, int minute, int second)
{
this = new DateTime(year, month, day, hour, minute, second, 0);
}
/// Initializes a new instance of the structure to the specified year, month, day, hour, minute, second, and millisecond.
/// The year (1 through 9999).
/// The month (1 through 12).
/// The day (1 through the number of days in ).
/// The hours (0 through 23).
/// The minutes (0 through 59).
/// The seconds (0 through 59).
/// The milliseconds (0 through 999).
///
/// is less than 1 or greater than 9999.-or- is less than 1 or greater than 12.-or- is less than 1 or greater than the number of days in .-or- is less than 0 or greater than 23.-or- is less than 0 or greater than 59.-or- is less than 0 or greater than 59.-or- is less than 0 or greater than 999.
/// The specified parameters evaluate to less than or more than .
// Token: 0x06003D27 RID: 15655 RVA: 0x000CDC58 File Offset: 0x000CBE58
public DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
{
if (year < 1 || year > 9999 || month < 1 || month > 12 || day < 1 || day > DateTime.DaysInMonth(year, month) || hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59 || millisecond < 0 || millisecond > 999)
{
throw new ArgumentOutOfRangeException("Parameters describe an unrepresentable DateTime.");
}
this.ticks = new TimeSpan(DateTime.AbsoluteDays(year, month, day), hour, minute, second, millisecond);
this.kind = DateTimeKind.Unspecified;
}
/// Initializes a new instance of the structure to the specified year, month, and day for the specified calendar.
/// The year (1 through the number of years in ).
/// The month (1 through the number of months in ).
/// The day (1 through the number of days in ).
/// The calendar that is used to interpret , , and .
///
/// is null.
///
/// is not in the range supported by .-or- is less than 1 or greater than the number of months in .-or- is less than 1 or greater than the number of days in .
/// The specified parameters evaluate to less than or more than .
// Token: 0x06003D28 RID: 15656 RVA: 0x000CDD10 File Offset: 0x000CBF10
public DateTime(int year, int month, int day, Calendar calendar)
{
this = new DateTime(year, month, day, 0, 0, 0, 0, calendar);
}
/// Initializes a new instance of the structure to the specified year, month, day, hour, minute, and second for the specified calendar.
/// The year (1 through the number of years in ).
/// The month (1 through the number of months in ).
/// The day (1 through the number of days in ).
/// The hours (0 through 23).
/// The minutes (0 through 59).
/// The seconds (0 through 59).
/// The calendar that is used to interpret , , and .
///
/// is null.
///
/// is not in the range supported by .-or- is less than 1 or greater than the number of months in .-or- is less than 1 or greater than the number of days in .-or- is less than 0 or greater than 23 -or- is less than 0 or greater than 59. -or- is less than 0 or greater than 59.
/// The specified parameters evaluate to less than or more than .
// Token: 0x06003D29 RID: 15657 RVA: 0x000CDD2C File Offset: 0x000CBF2C
public DateTime(int year, int month, int day, int hour, int minute, int second, Calendar calendar)
{
this = new DateTime(year, month, day, hour, minute, second, 0, calendar);
}
/// Initializes a new instance of the structure to the specified year, month, day, hour, minute, second, and millisecond for the specified calendar.
/// The year (1 through the number of years in ).
/// The month (1 through the number of months in ).
/// The day (1 through the number of days in ).
/// The hours (0 through 23).
/// The minutes (0 through 59).
/// The seconds (0 through 59).
/// The milliseconds (0 through 999).
/// The calendar that is used to interpret , , and .
///
/// is null.
///
/// is not in the range supported by .-or- is less than 1 or greater than the number of months in .-or- is less than 1 or greater than the number of days in .-or- is less than 0 or greater than 23.-or- is less than 0 or greater than 59.-or- is less than 0 or greater than 59.-or- is less than 0 or greater than 999.
/// The specified parameters evaluate to less than or more than .
// Token: 0x06003D2A RID: 15658 RVA: 0x000CDD4C File Offset: 0x000CBF4C
public DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, Calendar calendar)
{
if (calendar == null)
{
throw new ArgumentNullException("calendar");
}
this.ticks = calendar.ToDateTime(year, month, day, hour, minute, second, millisecond).ticks;
this.kind = DateTimeKind.Unspecified;
}
// Token: 0x06003D2B RID: 15659 RVA: 0x000CDD94 File Offset: 0x000CBF94
internal DateTime(bool check, TimeSpan value)
{
if (check && (value.Ticks < DateTime.MinValue.Ticks || value.Ticks > DateTime.MaxValue.Ticks))
{
throw new ArgumentOutOfRangeException();
}
this.ticks = value;
this.kind = DateTimeKind.Unspecified;
}
/// Initializes a new instance of the structure to a specified number of ticks and to Coordinated Universal Time (UTC) or local time.
/// A date and time expressed in the number of 100-nanosecond intervals that have elapsed since January 1, 0001 at 00:00:00.000 in the Gregorian calendar.
/// One of the enumeration values that indicates whether specifies a local time, Coordinated Universal Time (UTC), or neither.
///
/// is less than or greater than .
///
/// is not one of the values.
// Token: 0x06003D2C RID: 15660 RVA: 0x000CDDF0 File Offset: 0x000CBFF0
public DateTime(long ticks, DateTimeKind kind)
{
this = new DateTime(ticks);
this.CheckDateTimeKind(kind);
this.kind = kind;
}
/// Initializes a new instance of the structure to the specified year, month, day, hour, minute, second, and Coordinated Universal Time (UTC) or local time.
/// The year (1 through 9999).
/// The month (1 through 12).
/// The day (1 through the number of days in ).
/// The hours (0 through 23).
/// The minutes (0 through 59).
/// The seconds (0 through 59).
/// One of the enumeration values that indicates whether , , , , and specify a local time, Coordinated Universal Time (UTC), or neither.
///
/// is less than 1 or greater than 9999. -or- is less than 1 or greater than 12. -or- is less than 1 or greater than the number of days in .-or- is less than 0 or greater than 23. -or- is less than 0 or greater than 59. -or- is less than 0 or greater than 59.
/// The specified time parameters evaluate to less than or more than . -or- is not one of the values.
// Token: 0x06003D2D RID: 15661 RVA: 0x000CDE08 File Offset: 0x000CC008
public DateTime(int year, int month, int day, int hour, int minute, int second, DateTimeKind kind)
{
this = new DateTime(year, month, day, hour, minute, second);
this.CheckDateTimeKind(kind);
this.kind = kind;
}
/// Initializes a new instance of the structure to the specified year, month, day, hour, minute, second, millisecond, and Coordinated Universal Time (UTC) or local time.
/// The year (1 through 9999).
/// The month (1 through 12).
/// The day (1 through the number of days in ).
/// The hours (0 through 23).
/// The minutes (0 through 59).
/// The seconds (0 through 59).
/// The milliseconds (0 through 999).
/// One of the enumeration values that indicates whether , , , , , , and specify a local time, Coordinated Universal Time (UTC), or neither.
///
/// is less than 1 or greater than 9999.-or- is less than 1 or greater than 12.-or- is less than 1 or greater than the number of days in .-or- is less than 0 or greater than 23.-or- is less than 0 or greater than 59.-or- is less than 0 or greater than 59.-or- is less than 0 or greater than 999.
/// The specified time parameters evaluate to less than or more than . -or- is not one of the values.
// Token: 0x06003D2E RID: 15662 RVA: 0x000CDE2C File Offset: 0x000CC02C
public DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, DateTimeKind kind)
{
this = new DateTime(year, month, day, hour, minute, second, millisecond);
this.CheckDateTimeKind(kind);
this.kind = kind;
}
/// Initializes a new instance of the structure to the specified year, month, day, hour, minute, second, millisecond, and Coordinated Universal Time (UTC) or local time for the specified calendar.
/// The year (1 through the number of years in ).
/// The month (1 through the number of months in ).
/// The day (1 through the number of days in ).
/// The hours (0 through 23).
/// The minutes (0 through 59).
/// The seconds (0 through 59).
/// The milliseconds (0 through 999).
/// The calendar that is used to interpret , , and .
/// One of the enumeration values that indicates whether , , , , , , and specify a local time, Coordinated Universal Time (UTC), or neither.
///
/// is null.
///
/// is not in the range supported by .-or- is less than 1 or greater than the number of months in .-or- is less than 1 or greater than the number of days in .-or- is less than 0 or greater than 23.-or- is less than 0 or greater than 59.-or- is less than 0 or greater than 59.-or- is less than 0 or greater than 999.
/// The specified time parameters evaluate to less than or more than . -or- is not one of the values.
// Token: 0x06003D2F RID: 15663 RVA: 0x000CDE5C File Offset: 0x000CC05C
public DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, Calendar calendar, DateTimeKind kind)
{
this = new DateTime(year, month, day, hour, minute, second, millisecond, calendar);
this.CheckDateTimeKind(kind);
this.kind = kind;
}
// Token: 0x06003D30 RID: 15664 RVA: 0x000CDE8C File Offset: 0x000CC08C
static DateTime()
{
if (MonoTouchAOTHelper.FalseFlag)
{
GenericComparer genericComparer = new GenericComparer();
GenericEqualityComparer genericEqualityComparer = new GenericEqualityComparer();
}
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D31 RID: 15665 RVA: 0x000CE184 File Offset: 0x000CC384
bool IConvertible.ToBoolean(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D32 RID: 15666 RVA: 0x000CE18C File Offset: 0x000CC38C
byte IConvertible.ToByte(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D33 RID: 15667 RVA: 0x000CE194 File Offset: 0x000CC394
char IConvertible.ToChar(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// Returns the current object.
/// The current object.
/// An object that implements the interface. (This parameter is not used; specify null.)
// Token: 0x06003D34 RID: 15668 RVA: 0x000CE19C File Offset: 0x000CC39C
DateTime IConvertible.ToDateTime(IFormatProvider provider)
{
return this;
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface or null.
/// In all cases.
// Token: 0x06003D35 RID: 15669 RVA: 0x000CE1A4 File Offset: 0x000CC3A4
decimal IConvertible.ToDecimal(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D36 RID: 15670 RVA: 0x000CE1AC File Offset: 0x000CC3AC
double IConvertible.ToDouble(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D37 RID: 15671 RVA: 0x000CE1B4 File Offset: 0x000CC3B4
short IConvertible.ToInt16(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D38 RID: 15672 RVA: 0x000CE1BC File Offset: 0x000CC3BC
int IConvertible.ToInt32(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D39 RID: 15673 RVA: 0x000CE1C4 File Offset: 0x000CC3C4
long IConvertible.ToInt64(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D3A RID: 15674 RVA: 0x000CE1CC File Offset: 0x000CC3CC
sbyte IConvertible.ToSByte(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D3B RID: 15675 RVA: 0x000CE1D4 File Offset: 0x000CC3D4
float IConvertible.ToSingle(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// Converts the current object to an object of a specified type.
/// An object of the type specified by the parameter, with a value equivalent to the current object.
/// The desired type.
/// An object that implements the interface. (This parameter is not used; specify null.)
///
/// is null.
/// This conversion is not supported for the type.
// Token: 0x06003D3C RID: 15676 RVA: 0x000CE1DC File Offset: 0x000CC3DC
object IConvertible.ToType(Type targetType, IFormatProvider provider)
{
if (targetType == null)
{
throw new ArgumentNullException("targetType");
}
if (targetType == typeof(DateTime))
{
return this;
}
if (targetType == typeof(string))
{
return this.ToString(provider);
}
if (targetType == typeof(object))
{
return this;
}
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D3D RID: 15677 RVA: 0x000CE250 File Offset: 0x000CC450
ushort IConvertible.ToUInt16(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D3E RID: 15678 RVA: 0x000CE258 File Offset: 0x000CC458
uint IConvertible.ToUInt32(IFormatProvider provider)
{
throw new InvalidCastException();
}
/// This conversion is not supported. Attempting to use this method throws an .
/// The return value for this member is not used.
/// An object that implements the interface. (This parameter is not used; specify null.)
/// In all cases.
// Token: 0x06003D3F RID: 15679 RVA: 0x000CE260 File Offset: 0x000CC460
ulong IConvertible.ToUInt64(IFormatProvider provider)
{
throw new InvalidCastException();
}
// Token: 0x06003D40 RID: 15680 RVA: 0x000CE268 File Offset: 0x000CC468
private static int AbsoluteDays(int year, int month, int day)
{
int num = 0;
int i = 1;
int[] array = ((!DateTime.IsLeapYear(year)) ? DateTime.daysmonth : DateTime.daysmonthleap);
while (i < month)
{
num += array[i++];
}
return day - 1 + num + 365 * (year - 1) + (year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400;
}
// Token: 0x06003D41 RID: 15681 RVA: 0x000CE2D0 File Offset: 0x000CC4D0
private int FromTicks(DateTime.Which what)
{
int num = 1;
int[] array = DateTime.daysmonth;
int i = this.ticks.Days;
int num2 = i / 146097;
i -= num2 * 146097;
int num3 = i / 36524;
if (num3 == 4)
{
num3 = 3;
}
i -= num3 * 36524;
int num4 = i / 1461;
i -= num4 * 1461;
int num5 = i / 365;
if (num5 == 4)
{
num5 = 3;
}
if (what == DateTime.Which.Year)
{
return num2 * 400 + num3 * 100 + num4 * 4 + num5 + 1;
}
i -= num5 * 365;
if (what == DateTime.Which.DayYear)
{
return i + 1;
}
if (num5 == 3 && (num3 == 3 || num4 != 24))
{
array = DateTime.daysmonthleap;
}
while (i >= array[num])
{
i -= array[num++];
}
if (what == DateTime.Which.Month)
{
return num;
}
return i + 1;
}
/// Gets the date component of this instance.
/// A new with the same date as this instance, and the time value set to 12:00:00 midnight (00:00:00).
/// 1
// Token: 0x17000B67 RID: 2919
// (get) Token: 0x06003D42 RID: 15682 RVA: 0x000CE3D0 File Offset: 0x000CC5D0
public DateTime Date
{
get
{
return new DateTime(this.Year, this.Month, this.Day)
{
kind = this.kind
};
}
}
/// Gets the month component of the date represented by this instance.
/// The month component, expressed as a value between 1 and 12.
/// 1
// Token: 0x17000B68 RID: 2920
// (get) Token: 0x06003D43 RID: 15683 RVA: 0x000CE404 File Offset: 0x000CC604
public int Month
{
get
{
return this.FromTicks(DateTime.Which.Month);
}
}
/// Gets the day of the month represented by this instance.
/// The day component, expressed as a value between 1 and 31.
/// 1
// Token: 0x17000B69 RID: 2921
// (get) Token: 0x06003D44 RID: 15684 RVA: 0x000CE410 File Offset: 0x000CC610
public int Day
{
get
{
return this.FromTicks(DateTime.Which.Day);
}
}
/// Gets the day of the week represented by this instance.
/// A enumerated constant that indicates the day of the week of this value.
/// 1
// Token: 0x17000B6A RID: 2922
// (get) Token: 0x06003D45 RID: 15685 RVA: 0x000CE41C File Offset: 0x000CC61C
public DayOfWeek DayOfWeek
{
get
{
return (this.ticks.Days + DayOfWeek.Monday) % (DayOfWeek)7;
}
}
/// Gets the day of the year represented by this instance.
/// The day of the year, expressed as a value between 1 and 366.
/// 1
// Token: 0x17000B6B RID: 2923
// (get) Token: 0x06003D46 RID: 15686 RVA: 0x000CE430 File Offset: 0x000CC630
public int DayOfYear
{
get
{
return this.FromTicks(DateTime.Which.DayYear);
}
}
/// Gets the time of day for this instance.
/// A that represents the fraction of the day that has elapsed since midnight.
/// 1
// Token: 0x17000B6C RID: 2924
// (get) Token: 0x06003D47 RID: 15687 RVA: 0x000CE43C File Offset: 0x000CC63C
public TimeSpan TimeOfDay
{
get
{
return new TimeSpan(this.ticks.Ticks % 864000000000L);
}
}
/// Gets the hour component of the date represented by this instance.
/// The hour component, expressed as a value between 0 and 23.
/// 1
// Token: 0x17000B6D RID: 2925
// (get) Token: 0x06003D48 RID: 15688 RVA: 0x000CE458 File Offset: 0x000CC658
public int Hour
{
get
{
return this.ticks.Hours;
}
}
/// Gets the minute component of the date represented by this instance.
/// The minute component, expressed as a value between 0 and 59.
/// 1
// Token: 0x17000B6E RID: 2926
// (get) Token: 0x06003D49 RID: 15689 RVA: 0x000CE468 File Offset: 0x000CC668
public int Minute
{
get
{
return this.ticks.Minutes;
}
}
/// Gets the seconds component of the date represented by this instance.
/// The seconds, between 0 and 59.
/// 1
// Token: 0x17000B6F RID: 2927
// (get) Token: 0x06003D4A RID: 15690 RVA: 0x000CE478 File Offset: 0x000CC678
public int Second
{
get
{
return this.ticks.Seconds;
}
}
/// Gets the milliseconds component of the date represented by this instance.
/// The milliseconds component, expressed as a value between 0 and 999.
/// 1
// Token: 0x17000B70 RID: 2928
// (get) Token: 0x06003D4B RID: 15691 RVA: 0x000CE488 File Offset: 0x000CC688
public int Millisecond
{
get
{
return this.ticks.Milliseconds;
}
}
// Token: 0x06003D4C RID: 15692
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern long GetTimeMonotonic();
// Token: 0x06003D4D RID: 15693
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern long GetNow();
/// Gets a object that is set to the current date and time on this computer, expressed as the local time.
/// A whose value is the current local date and time.
/// 1
// Token: 0x17000B71 RID: 2929
// (get) Token: 0x06003D4E RID: 15694 RVA: 0x000CE498 File Offset: 0x000CC698
public static DateTime Now
{
get
{
long now = DateTime.GetNow();
DateTime dateTime = new DateTime(now);
if (now - DateTime.last_now > 600000000L)
{
DateTime.to_local_time_span_object = TimeZone.CurrentTimeZone.GetLocalTimeDiff(dateTime);
DateTime.last_now = now;
}
DateTime dateTime2 = dateTime + (TimeSpan)DateTime.to_local_time_span_object;
dateTime2.kind = DateTimeKind.Local;
return dateTime2;
}
}
/// Gets the number of ticks that represent the date and time of this instance.
/// The number of ticks that represent the date and time of this instance. The value is between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
/// 1
// Token: 0x17000B72 RID: 2930
// (get) Token: 0x06003D4F RID: 15695 RVA: 0x000CE4FC File Offset: 0x000CC6FC
public long Ticks
{
get
{
return this.ticks.Ticks;
}
}
/// Gets the current date.
/// A set to today's date, with the time component set to 00:00:00.
/// 1
// Token: 0x17000B73 RID: 2931
// (get) Token: 0x06003D50 RID: 15696 RVA: 0x000CE50C File Offset: 0x000CC70C
public static DateTime Today
{
get
{
DateTime now = DateTime.Now;
return new DateTime(now.Year, now.Month, now.Day)
{
kind = now.kind
};
}
}
/// Gets a object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
/// A whose value is the current UTC date and time.
/// 1
// Token: 0x17000B74 RID: 2932
// (get) Token: 0x06003D51 RID: 15697 RVA: 0x000CE54C File Offset: 0x000CC74C
public static DateTime UtcNow
{
get
{
return new DateTime(DateTime.GetNow(), DateTimeKind.Utc);
}
}
/// Gets the year component of the date represented by this instance.
/// The year, between 1 and 9999.
/// 1
// Token: 0x17000B75 RID: 2933
// (get) Token: 0x06003D52 RID: 15698 RVA: 0x000CE55C File Offset: 0x000CC75C
public int Year
{
get
{
return this.FromTicks(DateTime.Which.Year);
}
}
/// Gets a value that indicates whether the time represented by this instance is based on local time, Coordinated Universal Time (UTC), or neither.
/// One of the T:System.DateTimeKind values. The default is .
/// 1
// Token: 0x17000B76 RID: 2934
// (get) Token: 0x06003D53 RID: 15699 RVA: 0x000CE568 File Offset: 0x000CC768
public DateTimeKind Kind
{
get
{
return this.kind;
}
}
/// Returns a new that adds the value of the specified to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and the time interval represented by .
/// A object that represents a positive or negative time interval.
/// The resulting is less than or greater than .
/// 2
// Token: 0x06003D54 RID: 15700 RVA: 0x000CE570 File Offset: 0x000CC770
public DateTime Add(TimeSpan value)
{
DateTime dateTime = this.AddTicks(value.Ticks);
dateTime.kind = this.kind;
return dateTime;
}
/// Returns a new that adds the specified number of days to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and the number of days represented by .
/// A number of whole and fractional days. The parameter can be negative or positive.
/// The resulting is less than or greater than .
/// 2
// Token: 0x06003D55 RID: 15701 RVA: 0x000CE59C File Offset: 0x000CC79C
public DateTime AddDays(double value)
{
return this.AddMilliseconds(Math.Round(value * 86400000.0));
}
/// Returns a new that adds the specified number of ticks to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and the time represented by .
/// A number of 100-nanosecond ticks. The parameter can be positive or negative.
/// The resulting is less than or greater than .
/// 2
// Token: 0x06003D56 RID: 15702 RVA: 0x000CE5B4 File Offset: 0x000CC7B4
public DateTime AddTicks(long value)
{
if (value + this.ticks.Ticks > 3155378975999999999L || value + this.ticks.Ticks < 0L)
{
throw new ArgumentOutOfRangeException();
}
return new DateTime(value + this.ticks.Ticks)
{
kind = this.kind
};
}
/// Returns a new that adds the specified number of hours to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and the number of hours represented by .
/// A number of whole and fractional hours. The parameter can be negative or positive.
/// The resulting is less than or greater than .
/// 2
// Token: 0x06003D57 RID: 15703 RVA: 0x000CE618 File Offset: 0x000CC818
public DateTime AddHours(double value)
{
return this.AddMilliseconds(value * 3600000.0);
}
/// Returns a new that adds the specified number of milliseconds to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and the number of milliseconds represented by .
/// A number of whole and fractional milliseconds. The parameter can be negative or positive. Note that this value is rounded to the nearest integer.
/// The resulting is less than or greater than .
/// 2
// Token: 0x06003D58 RID: 15704 RVA: 0x000CE62C File Offset: 0x000CC82C
public DateTime AddMilliseconds(double value)
{
if (value * 10000.0 > 9.223372036854776E+18 || value * 10000.0 < -9.223372036854776E+18)
{
throw new ArgumentOutOfRangeException();
}
long num = (long)Math.Round(value * 10000.0);
return this.AddTicks(num);
}
// Token: 0x06003D59 RID: 15705 RVA: 0x000CE68C File Offset: 0x000CC88C
private DateTime AddRoundedMilliseconds(double ms)
{
if (ms * 10000.0 > 9.223372036854776E+18 || ms * 10000.0 < -9.223372036854776E+18)
{
throw new ArgumentOutOfRangeException();
}
long num = (long)(ms += ((ms <= 0.0) ? (-0.5) : 0.5)) * 10000L;
return this.AddTicks(num);
}
/// Returns a new that adds the specified number of minutes to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and the number of minutes represented by .
/// A number of whole and fractional minutes. The parameter can be negative or positive.
/// The resulting is less than or greater than .
/// 2
// Token: 0x06003D5A RID: 15706 RVA: 0x000CE70C File Offset: 0x000CC90C
public DateTime AddMinutes(double value)
{
return this.AddMilliseconds(value * 60000.0);
}
/// Returns a new that adds the specified number of months to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and .
/// A number of months. The parameter can be negative or positive.
/// The resulting is less than or greater than .-or- is less than -120,000 or greater than 120,000.
/// 2
// Token: 0x06003D5B RID: 15707 RVA: 0x000CE720 File Offset: 0x000CC920
public DateTime AddMonths(int months)
{
int num = this.Day;
int num2 = this.Month + months % 12;
int num3 = this.Year + months / 12;
if (num2 < 1)
{
num2 = 12 + num2;
num3--;
}
else if (num2 > 12)
{
num2 -= 12;
num3++;
}
int num4 = DateTime.DaysInMonth(num3, num2);
if (num > num4)
{
num = num4;
}
DateTime dateTime = new DateTime(num3, num2, num);
dateTime.kind = this.kind;
return dateTime.Add(this.TimeOfDay);
}
/// Returns a new that adds the specified number of seconds to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and the number of seconds represented by .
/// A number of whole and fractional seconds. The parameter can be negative or positive.
/// The resulting is less than or greater than .
/// 2
// Token: 0x06003D5C RID: 15708 RVA: 0x000CE7A8 File Offset: 0x000CC9A8
public DateTime AddSeconds(double value)
{
return this.AddMilliseconds(value * 1000.0);
}
/// Returns a new that adds the specified number of years to the value of this instance.
/// A whose value is the sum of the date and time represented by this instance and the number of years represented by .
/// A number of years. The parameter can be negative or positive.
///
/// or the resulting is less than or greater than .
/// 2
// Token: 0x06003D5D RID: 15709 RVA: 0x000CE7BC File Offset: 0x000CC9BC
public DateTime AddYears(int value)
{
return this.AddMonths(value * 12);
}
/// Compares two instances of and returns an integer that indicates whether the first instance is earlier than, the same as, or later than the second instance.
/// A signed number indicating the relative values of and .Value Type Condition Less than zero is earlier than . Zero is the same as . Greater than zero is later than .
/// The first object to compare.
/// The second object to compare.
/// 1
// Token: 0x06003D5E RID: 15710 RVA: 0x000CE7C8 File Offset: 0x000CC9C8
public static int Compare(DateTime t1, DateTime t2)
{
if (t1.ticks < t2.ticks)
{
return -1;
}
if (t1.ticks > t2.ticks)
{
return 1;
}
return 0;
}
/// Compares the value of this instance to a specified object that contains a specified value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified value.
/// A signed number indicating the relative values of this instance and .Value Description Less than zero This instance is earlier than . Zero This instance is the same as . Greater than zero This instance is later than , or is null.
/// A boxed object to compare, or null.
///
/// is not a .
/// 2
// Token: 0x06003D5F RID: 15711 RVA: 0x000CE800 File Offset: 0x000CCA00
public int CompareTo(object value)
{
if (value == null)
{
return 1;
}
if (!(value is DateTime))
{
throw new ArgumentException(Locale.GetText("Value is not a System.DateTime"));
}
return DateTime.Compare(this, (DateTime)value);
}
/// Indicates whether this instance of is within the Daylight Saving Time range for the current time zone.
/// true if is or and the value of this instance of is within the Daylight Saving Time range for the current time zone. false if is .
/// 2
// Token: 0x06003D60 RID: 15712 RVA: 0x000CE844 File Offset: 0x000CCA44
public bool IsDaylightSavingTime()
{
return this.kind != DateTimeKind.Utc && TimeZone.CurrentTimeZone.IsDaylightSavingTime(this);
}
/// Compares the value of this instance to a specified value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified value.
/// A signed number indicating the relative values of this instance and the parameter.Value Description Less than zero This instance is earlier than . Zero This instance is the same as . Greater than zero This instance is later than .
/// The object to compare to the current instance.
/// 2
// Token: 0x06003D61 RID: 15713 RVA: 0x000CE864 File Offset: 0x000CCA64
public int CompareTo(DateTime value)
{
return DateTime.Compare(this, value);
}
/// Returns a value indicating whether this instance is equal to the specified instance.
/// true if the parameter equals the value of this instance; otherwise, false.
/// The object to compare to this instance.
/// 2
// Token: 0x06003D62 RID: 15714 RVA: 0x000CE874 File Offset: 0x000CCA74
public bool Equals(DateTime value)
{
return value.ticks == this.ticks;
}
/// Serializes the current object to a 64-bit binary value that subsequently can be used to recreate the object.
/// A 64-bit signed integer that encodes the and properties.
/// 2
// Token: 0x06003D63 RID: 15715 RVA: 0x000CE888 File Offset: 0x000CCA88
public long ToBinary()
{
DateTimeKind dateTimeKind = this.kind;
if (dateTimeKind == DateTimeKind.Utc)
{
return this.Ticks | 4611686018427387904L;
}
if (dateTimeKind != DateTimeKind.Local)
{
return this.Ticks;
}
return this.ToUniversalTime().Ticks | long.MinValue;
}
/// Deserializes a 64-bit binary value and recreates an original serialized object.
/// A object that is equivalent to the object that was serialized by the method.
/// A 64-bit signed integer that encodes the property in a 2-bit field and the property in a 62-bit field.
///
/// is less than or greater than .
/// 1
// Token: 0x06003D64 RID: 15716 RVA: 0x000CE8E0 File Offset: 0x000CCAE0
public static DateTime FromBinary(long dateData)
{
ulong num = (ulong)dateData >> 62;
if (num == (ulong)0)
{
return new DateTime(dateData, DateTimeKind.Unspecified);
}
if (num != (ulong)1)
{
DateTime dateTime = new DateTime(dateData & 4611686018427387903L, DateTimeKind.Utc);
return dateTime.ToLocalTime();
}
return new DateTime(dateData ^ 4611686018427387904L, DateTimeKind.Utc);
}
/// Creates a new object that has the same number of ticks as the specified , but is designated as either local time, Coordinated Universal Time (UTC), or neither, as indicated by the specified value.
/// A new object that has the same number of ticks as the object represented by the parameter and the value specified by the parameter.
/// A object.
/// One of the values.
/// 2
// Token: 0x06003D65 RID: 15717 RVA: 0x000CE93C File Offset: 0x000CCB3C
public static DateTime SpecifyKind(DateTime value, DateTimeKind kind)
{
return new DateTime(value.Ticks, kind);
}
/// Returns the number of days in the specified month and year.
/// The number of days in for the specified .For example, if equals 2 for February, the return value is 28 or 29 depending upon whether is a leap year.
/// The year.
/// The month (a number ranging from 1 to 12).
///
/// is less than 1 or greater than 12.-or- is less than 1 or greater than 9999.
/// 1
// Token: 0x06003D66 RID: 15718 RVA: 0x000CE94C File Offset: 0x000CCB4C
public static int DaysInMonth(int year, int month)
{
if (month < 1 || month > 12)
{
throw new ArgumentOutOfRangeException();
}
if (year < 1 || year > 9999)
{
throw new ArgumentOutOfRangeException();
}
int[] array = ((!DateTime.IsLeapYear(year)) ? DateTime.daysmonth : DateTime.daysmonthleap);
return array[month];
}
/// Returns a value indicating whether this instance is equal to a specified object.
/// true if is an instance of and equals the value of this instance; otherwise, false.
/// An object to compare to this instance.
/// 2
// Token: 0x06003D67 RID: 15719 RVA: 0x000CE9A4 File Offset: 0x000CCBA4
public override bool Equals(object value)
{
return value is DateTime && ((DateTime)value).ticks == this.ticks;
}
/// Returns a value indicating whether two instances of are equal.
/// true if the two values are equal; otherwise, false.
/// The first object to compare.
/// The second object to compare.
/// 1
// Token: 0x06003D68 RID: 15720 RVA: 0x000CE9D8 File Offset: 0x000CCBD8
public static bool Equals(DateTime t1, DateTime t2)
{
return t1.ticks == t2.ticks;
}
/// Converts the specified Windows file time to an equivalent local time.
/// A object that represents a local time equivalent to the date and time represented by the parameter.
/// A Windows file time expressed in ticks.
///
/// is less than 0 or represents a time greater than .
/// 1
// Token: 0x06003D69 RID: 15721 RVA: 0x000CE9F0 File Offset: 0x000CCBF0
public static DateTime FromFileTime(long fileTime)
{
if (fileTime < 0L)
{
throw new ArgumentOutOfRangeException("fileTime", "< 0");
}
DateTime dateTime = new DateTime(504911232000000000L + fileTime);
return dateTime.ToLocalTime();
}
/// Converts the specified Windows file time to an equivalent UTC time.
/// A object that represents a UTC time equivalent to the date and time represented by the parameter.
/// A Windows file time expressed in ticks.
///
/// is less than 0 or represents a time greater than .
/// 1
// Token: 0x06003D6A RID: 15722 RVA: 0x000CEA30 File Offset: 0x000CCC30
public static DateTime FromFileTimeUtc(long fileTime)
{
if (fileTime < 0L)
{
throw new ArgumentOutOfRangeException("fileTime", "< 0");
}
return new DateTime(504911232000000000L + fileTime);
}
/// Returns a equivalent to the specified OLE Automation date.
/// A that represents the same date and time as .
/// An OLE Automation date value.
/// The date is not a valid OLE Automation date value.
/// 1
// Token: 0x06003D6B RID: 15723 RVA: 0x000CEA68 File Offset: 0x000CCC68
public static DateTime FromOADate(double d)
{
if (d <= -657435.0 || d >= 2958466.0)
{
throw new ArgumentException("d", "[-657435,2958466]");
}
DateTime dateTime = new DateTime(599264352000000000L);
if (d < 0.0)
{
double num = Math.Ceiling(d);
dateTime = dateTime.AddRoundedMilliseconds(num * 86400000.0);
double num2 = num - d;
dateTime = dateTime.AddRoundedMilliseconds(num2 * 86400000.0);
}
else
{
dateTime = dateTime.AddRoundedMilliseconds(d * 86400000.0);
}
return dateTime;
}
/// Converts the value of this instance to all the string representations supported by the standard date and time format specifiers.
/// A string array where each element is the representation of the value of this instance formatted with one of the standard date and time format specifiers.
/// 2
// Token: 0x06003D6C RID: 15724 RVA: 0x000CEB0C File Offset: 0x000CCD0C
public string[] GetDateTimeFormats()
{
return this.GetDateTimeFormats(CultureInfo.CurrentCulture);
}
/// Converts the value of this instance to all the string representations supported by the specified standard date and time format specifier.
/// A string array where each element is the representation of the value of this instance formatted with the standard date and time format specifier.
/// A standard date and time format string (see Remarks).
///
/// is not a valid standard date and time format specifier character.
/// 2
// Token: 0x06003D6D RID: 15725 RVA: 0x000CEB1C File Offset: 0x000CCD1C
public string[] GetDateTimeFormats(char format)
{
if ("dDgGfFmMrRstTuUyY".IndexOf(format) < 0)
{
throw new FormatException("Invalid format character.");
}
return new string[] { this.ToString(format.ToString()) };
}
/// Converts the value of this instance to all the string representations supported by the standard date and time format specifiers and the specified culture-specific formatting information.
/// A string array where each element is the representation of the value of this instance formatted with one of the standard date and time format specifiers.
/// An object that supplies culture-specific formatting information about this instance.
/// 2
// Token: 0x06003D6E RID: 15726 RVA: 0x000CEB60 File Offset: 0x000CCD60
public string[] GetDateTimeFormats(IFormatProvider provider)
{
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)provider.GetFormat(typeof(DateTimeFormatInfo));
ArrayList arrayList = new ArrayList();
foreach (char c in "dDgGfFmMrRstTuUyY")
{
arrayList.AddRange(this.GetDateTimeFormats(c, dateTimeFormatInfo));
}
return arrayList.ToArray(typeof(string)) as string[];
}
/// Converts the value of this instance to all the string representations supported by the specified standard date and time format specifier and culture-specific formatting information.
/// A string array where each element is the representation of the value of this instance formatted with one of the standard date and time format specifiers.
/// A standard date and time format string (see Remarks).
/// An object that supplies culture-specific formatting information about this instance.
///
/// is not a valid standard date and time format specifier character.
/// 2
// Token: 0x06003D6F RID: 15727 RVA: 0x000CEBD8 File Offset: 0x000CCDD8
public string[] GetDateTimeFormats(char format, IFormatProvider provider)
{
if ("dDgGfFmMrRstTuUyY".IndexOf(format) < 0)
{
throw new FormatException("Invalid format character.");
}
bool flag = false;
if (format == 'U')
{
flag = true;
}
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)provider.GetFormat(typeof(DateTimeFormatInfo));
return this.GetDateTimeFormats(flag, dateTimeFormatInfo.GetAllRawDateTimePatterns(format), dateTimeFormatInfo);
}
// Token: 0x06003D70 RID: 15728 RVA: 0x000CEC40 File Offset: 0x000CCE40
private string[] GetDateTimeFormats(bool adjustutc, string[] patterns, DateTimeFormatInfo dfi)
{
string[] array = new string[patterns.Length];
DateTime dateTime = ((!adjustutc) ? this : this.ToUniversalTime());
for (int i = 0; i < array.Length; i++)
{
array[i] = DateTimeUtils.ToString(dateTime, patterns[i], dfi);
}
return array;
}
// Token: 0x06003D71 RID: 15729 RVA: 0x000CEC90 File Offset: 0x000CCE90
private void CheckDateTimeKind(DateTimeKind kind)
{
if (kind != DateTimeKind.Unspecified && kind != DateTimeKind.Utc && kind != DateTimeKind.Local)
{
throw new ArgumentException("Invalid DateTimeKind value.", "kind");
}
}
/// Returns the hash code for this instance.
/// A 32-bit signed integer hash code.
/// 2
// Token: 0x06003D72 RID: 15730 RVA: 0x000CECC4 File Offset: 0x000CCEC4
public override int GetHashCode()
{
return (int)this.ticks.Ticks;
}
/// Returns the for value type .
/// The enumerated constant, .
/// 2
// Token: 0x06003D73 RID: 15731 RVA: 0x000CECD4 File Offset: 0x000CCED4
public TypeCode GetTypeCode()
{
return TypeCode.DateTime;
}
/// Returns an indication whether the specified year is a leap year.
/// true if is a leap year; otherwise, false.
/// A 4-digit year.
///
/// is less than 1 or greater than 9999.
/// 1
// Token: 0x06003D74 RID: 15732 RVA: 0x000CECD8 File Offset: 0x000CCED8
public static bool IsLeapYear(int year)
{
if (year < 1 || year > 9999)
{
throw new ArgumentOutOfRangeException();
}
return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0;
}
/// Converts the specified string representation of a date and time to its equivalent.
/// A equivalent to the date and time contained in .
/// A string containing a date and time to convert.
///
/// is null.
///
/// does not contain a valid string representation of a date and time.
/// 1
// Token: 0x06003D75 RID: 15733 RVA: 0x000CED1C File Offset: 0x000CCF1C
public static DateTime Parse(string s)
{
return DateTime.Parse(s, null);
}
/// Converts the specified string representation of a date and time to its equivalent using the specified culture-specific format information.
/// A equivalent to the date and time contained in as specified by .
/// A string containing a date and time to convert.
/// An object that supplies culture-specific format information about .
///
/// is null.
///
/// does not contain a valid string representation of a date and time.
/// 1
// Token: 0x06003D76 RID: 15734 RVA: 0x000CED28 File Offset: 0x000CCF28
public static DateTime Parse(string s, IFormatProvider provider)
{
return DateTime.Parse(s, provider, DateTimeStyles.AllowWhiteSpaces);
}
/// Converts the specified string representation of a date and time to its equivalent using the specified culture-specific format information and formatting style.
/// A equivalent to the date and time contained in as specified by and .
/// A string containing a date and time to convert.
/// An object that supplies culture-specific formatting information about .
/// A bitwise combination of the enumeration values that indicates the style elements that can be present in for the parse operation to succeed and that defines how to interpret the parsed date in relation to the current time zone or the current date. A typical value to specify is .
///
/// is null.
///
/// does not contain a valid string representation of a date and time.
///
/// contains an invalid combination of values. For example, both and .
/// 1
// Token: 0x06003D77 RID: 15735 RVA: 0x000CED34 File Offset: 0x000CCF34
public static DateTime Parse(string s, IFormatProvider provider, DateTimeStyles styles)
{
if (s == null)
{
throw new ArgumentNullException("s");
}
Exception ex = null;
DateTime dateTime;
DateTimeOffset dateTimeOffset;
if (!DateTime.CoreParse(s, provider, styles, out dateTime, out dateTimeOffset, true, ref ex))
{
throw ex;
}
return dateTime;
}
// Token: 0x06003D78 RID: 15736 RVA: 0x000CED6C File Offset: 0x000CCF6C
internal static bool CoreParse(string s, IFormatProvider provider, DateTimeStyles styles, out DateTime result, out DateTimeOffset dto, bool setExceptionOnError, ref Exception exception)
{
dto = new DateTimeOffset(0L, TimeSpan.Zero);
if (s == null || s.Length == 0)
{
if (setExceptionOnError)
{
exception = new FormatException("String was not recognized as a valid DateTime.");
}
result = DateTime.MinValue;
return false;
}
if (provider == null)
{
provider = CultureInfo.CurrentCulture;
}
DateTimeFormatInfo instance = DateTimeFormatInfo.GetInstance(provider);
string[] array = DateTime.YearMonthDayFormats(instance, setExceptionOnError, ref exception);
if (array == null)
{
result = DateTime.MinValue;
return false;
}
bool flag = false;
foreach (string text in array)
{
bool flag2 = false;
if (DateTime._DoParse(s, text, string.Empty, false, out result, out dto, instance, styles, true, ref flag2, ref flag))
{
return true;
}
if (flag2)
{
for (int j = 0; j < DateTime.ParseTimeFormats.Length; j++)
{
if (DateTime._DoParse(s, text, DateTime.ParseTimeFormats[j], false, out result, out dto, instance, styles, true, ref flag2, ref flag))
{
return true;
}
}
}
}
int num = instance.MonthDayPattern.IndexOf('d');
int num2 = instance.MonthDayPattern.IndexOf('M');
if (num == -1 || num2 == -1)
{
result = DateTime.MinValue;
if (setExceptionOnError)
{
exception = new FormatException(Locale.GetText("Order of month and date is not defined by {0}", new object[] { instance.MonthDayPattern }));
}
return false;
}
bool flag3 = num < num2;
string[] array2 = ((!flag3) ? DateTime.MonthDayShortFormats : DateTime.DayMonthShortFormats);
for (int k = 0; k < array2.Length; k++)
{
bool flag4 = false;
if (DateTime._DoParse(s, array2[k], string.Empty, false, out result, out dto, instance, styles, true, ref flag4, ref flag))
{
return true;
}
}
for (int l = 0; l < DateTime.ParseTimeFormats.Length; l++)
{
string text2 = DateTime.ParseTimeFormats[l];
bool flag5 = false;
if (DateTime._DoParse(s, text2, string.Empty, false, out result, out dto, instance, styles, false, ref flag5, ref flag))
{
return true;
}
if (flag5)
{
for (int m = 0; m < array2.Length; m++)
{
if (DateTime._DoParse(s, text2, array2[m], false, out result, out dto, instance, styles, false, ref flag5, ref flag))
{
return true;
}
}
foreach (string text3 in array)
{
if (text3[text3.Length - 1] != 'T')
{
if (DateTime._DoParse(s, text2, text3, false, out result, out dto, instance, styles, false, ref flag5, ref flag))
{
return true;
}
}
}
}
}
if (DateTime.ParseExact(s, instance.GetAllDateTimePatternsInternal(), instance, styles, out result, false, ref flag, setExceptionOnError, ref exception))
{
return true;
}
if (!setExceptionOnError)
{
return false;
}
exception = new FormatException("String was not recognized as a valid DateTime.");
return false;
}
/// Converts the specified string representation of a date and time to its equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly.
/// A equivalent to the date and time contained in as specified by and .
/// A string that contains a date and time to convert.
/// A format specifier that defines the required format of .
/// An object that supplies culture-specific format information about .
///
/// or is null.
///
/// or is an empty string. -or- does not contain a date and time that corresponds to the pattern specified in .
/// 2
// Token: 0x06003D79 RID: 15737 RVA: 0x000CF04C File Offset: 0x000CD24C
public static DateTime ParseExact(string s, string format, IFormatProvider provider)
{
return DateTime.ParseExact(s, format, provider, DateTimeStyles.None);
}
// Token: 0x06003D7A RID: 15738 RVA: 0x000CF058 File Offset: 0x000CD258
private static string[] YearMonthDayFormats(DateTimeFormatInfo dfi, bool setExceptionOnError, ref Exception exc)
{
int num = dfi.ShortDatePattern.IndexOf('d');
int num2 = dfi.ShortDatePattern.IndexOf('M');
int num3 = dfi.ShortDatePattern.IndexOf('y');
if (num == -1 || num2 == -1 || num3 == -1)
{
if (setExceptionOnError)
{
exc = new FormatException(Locale.GetText("Order of year, month and date is not defined by {0}", new object[] { dfi.ShortDatePattern }));
}
return null;
}
if (num3 < num2)
{
if (num2 < num)
{
return DateTime.ParseYearMonthDayFormats;
}
if (num3 < num)
{
return DateTime.ParseYearDayMonthFormats;
}
if (setExceptionOnError)
{
exc = new FormatException(Locale.GetText("Order of date, year and month defined by {0} is not supported", new object[] { dfi.ShortDatePattern }));
}
return null;
}
else
{
if (num < num2)
{
return DateTime.ParseDayMonthYearFormats;
}
if (num < num3)
{
return DateTime.ParseMonthDayYearFormats;
}
if (setExceptionOnError)
{
exc = new FormatException(Locale.GetText("Order of month, year and date defined by {0} is not supported", new object[] { dfi.ShortDatePattern }));
}
return null;
}
}
// Token: 0x06003D7B RID: 15739 RVA: 0x000CF158 File Offset: 0x000CD358
private static int _ParseNumber(string s, int valuePos, int min_digits, int digits, bool leadingzero, bool sloppy_parsing, out int num_parsed)
{
int num = 0;
if (sloppy_parsing)
{
leadingzero = false;
}
if (!leadingzero)
{
int num2 = 0;
int i = valuePos;
while (i < s.Length && i < digits + valuePos)
{
if (!char.IsDigit(s[i]))
{
break;
}
num2++;
i++;
}
digits = num2;
}
if (digits < min_digits)
{
num_parsed = -1;
return 0;
}
if (s.Length - valuePos < digits)
{
num_parsed = -1;
return 0;
}
for (int i = valuePos; i < digits + valuePos; i++)
{
char c = s[i];
if (!char.IsDigit(c))
{
num_parsed = -1;
return 0;
}
num = num * 10 + (int)((byte)(c - '0'));
}
num_parsed = digits;
return num;
}
// Token: 0x06003D7C RID: 15740 RVA: 0x000CF218 File Offset: 0x000CD418
private static int _ParseEnum(string s, int sPos, string[] values, string[] invValues, bool exact, out int num_parsed)
{
for (int i = values.Length - 1; i >= 0; i--)
{
if (!exact && invValues[i].Length > values[i].Length)
{
if (invValues[i].Length > 0 && DateTime._ParseString(s, sPos, 0, invValues[i], out num_parsed))
{
return i;
}
if (values[i].Length > 0 && DateTime._ParseString(s, sPos, 0, values[i], out num_parsed))
{
return i;
}
}
else
{
if (values[i].Length > 0 && DateTime._ParseString(s, sPos, 0, values[i], out num_parsed))
{
return i;
}
if (!exact && invValues[i].Length > 0 && DateTime._ParseString(s, sPos, 0, invValues[i], out num_parsed))
{
return i;
}
}
}
num_parsed = -1;
return -1;
}
// Token: 0x06003D7D RID: 15741 RVA: 0x000CF2F0 File Offset: 0x000CD4F0
private static bool _ParseString(string s, int sPos, int maxlength, string value, out int num_parsed)
{
if (maxlength <= 0)
{
maxlength = value.Length;
}
if (sPos + maxlength <= s.Length && string.Compare(s, sPos, value, 0, maxlength, true, CultureInfo.InvariantCulture) == 0)
{
num_parsed = maxlength;
return true;
}
num_parsed = -1;
return false;
}
// Token: 0x06003D7E RID: 15742 RVA: 0x000CF33C File Offset: 0x000CD53C
private static bool _ParseAmPm(string s, int valuePos, int num, DateTimeFormatInfo dfi, bool exact, out int num_parsed, ref int ampm)
{
num_parsed = -1;
if (ampm != -1)
{
return false;
}
if (DateTime.IsLetter(s, valuePos))
{
DateTimeFormatInfo invariantInfo = DateTimeFormatInfo.InvariantInfo;
if ((!exact && DateTime._ParseString(s, valuePos, num, invariantInfo.PMDesignator, out num_parsed)) || (dfi.PMDesignator != string.Empty && DateTime._ParseString(s, valuePos, num, dfi.PMDesignator, out num_parsed)))
{
ampm = 1;
}
else
{
if ((exact || !DateTime._ParseString(s, valuePos, num, invariantInfo.AMDesignator, out num_parsed)) && !DateTime._ParseString(s, valuePos, num, dfi.AMDesignator, out num_parsed))
{
return false;
}
if (exact || num_parsed != 0)
{
ampm = 0;
}
}
return true;
}
if (dfi.AMDesignator != string.Empty)
{
return false;
}
if (exact)
{
ampm = 0;
}
num_parsed = 0;
return true;
}
// Token: 0x06003D7F RID: 15743 RVA: 0x000CF430 File Offset: 0x000CD630
private static bool _ParseTimeSeparator(string s, int sPos, DateTimeFormatInfo dfi, bool exact, out int num_parsed)
{
return DateTime._ParseString(s, sPos, 0, dfi.TimeSeparator, out num_parsed) || (!exact && DateTime._ParseString(s, sPos, 0, ":", out num_parsed));
}
// Token: 0x06003D80 RID: 15744 RVA: 0x000CF470 File Offset: 0x000CD670
private static bool _ParseDateSeparator(string s, int sPos, DateTimeFormatInfo dfi, bool exact, out int num_parsed)
{
num_parsed = -1;
if (exact && s[sPos] != '/')
{
return false;
}
if (DateTime._ParseTimeSeparator(s, sPos, dfi, exact, out num_parsed) || char.IsDigit(s[sPos]) || char.IsLetter(s[sPos]))
{
return false;
}
num_parsed = 1;
return true;
}
// Token: 0x06003D81 RID: 15745 RVA: 0x000CF4D0 File Offset: 0x000CD6D0
private static bool IsLetter(string s, int pos)
{
return pos < s.Length && char.IsLetter(s[pos]);
}
// Token: 0x06003D82 RID: 15746 RVA: 0x000CF4F0 File Offset: 0x000CD6F0
private static bool _DoParse(string s, string firstPart, string secondPart, bool exact, out DateTime result, out DateTimeOffset dto, DateTimeFormatInfo dfi, DateTimeStyles style, bool firstPartIsDate, ref bool incompleteFormat, ref bool longYear)
{
bool flag = false;
bool flag2 = false;
bool flag3 = false;
dto = new DateTimeOffset(0L, TimeSpan.Zero);
bool flag4 = !exact && secondPart != null;
incompleteFormat = false;
int num = 0;
string text = firstPart;
bool flag5 = false;
DateTimeFormatInfo invariantInfo = DateTimeFormatInfo.InvariantInfo;
if (text.Length == 1)
{
text = DateTimeUtils.GetStandardPattern(text[0], dfi, out flag, out flag2);
}
result = new DateTime(0L);
if (text == null)
{
return false;
}
if (s == null)
{
return false;
}
if ((style & DateTimeStyles.AllowLeadingWhite) != DateTimeStyles.None)
{
text = text.TrimStart(null);
s = s.TrimStart(null);
}
if ((style & DateTimeStyles.AllowTrailingWhite) != DateTimeStyles.None)
{
text = text.TrimEnd(null);
s = s.TrimEnd(null);
}
if (flag2)
{
dfi = invariantInfo;
}
if ((style & DateTimeStyles.AllowInnerWhite) != DateTimeStyles.None)
{
flag3 = true;
}
string text2 = text;
int num2 = text.Length;
int num3 = 0;
int num4 = 0;
if (num2 == 0)
{
return false;
}
int num5 = -1;
int num6 = -1;
int num7 = -1;
int num8 = -1;
int num9 = -1;
int num10 = -1;
int num11 = -1;
double num12 = -1.0;
int num13 = -1;
int num14 = -1;
int num15 = -1;
int num16 = -1;
bool flag6 = true;
while (num != s.Length)
{
int num17 = 0;
if (flag4 && num3 + num4 == 0)
{
bool flag7 = DateTime.IsLetter(s, num);
if (flag7)
{
if (s[num] == 'Z')
{
num17 = 1;
}
else
{
DateTime._ParseString(s, num, 0, "GMT", out num17);
}
if (num17 > 0 && !DateTime.IsLetter(s, num + num17))
{
num += num17;
flag = true;
continue;
}
}
if (!flag5 && DateTime._ParseAmPm(s, num, 0, dfi, exact, out num17, ref num13))
{
if (DateTime.IsLetter(s, num + num17))
{
num13 = -1;
}
else if (num17 > 0)
{
num += num17;
continue;
}
}
if (!flag5 && num6 == -1 && flag7)
{
num6 = DateTime._ParseEnum(s, num, dfi.RawDayNames, invariantInfo.RawDayNames, exact, out num17);
if (num6 == -1)
{
num6 = DateTime._ParseEnum(s, num, dfi.RawAbbreviatedDayNames, invariantInfo.RawAbbreviatedDayNames, exact, out num17);
}
if (num6 != -1 && !DateTime.IsLetter(s, num + num17))
{
num += num17;
continue;
}
num6 = -1;
}
if (char.IsWhiteSpace(s[num]) || s[num] == ',')
{
num++;
continue;
}
num17 = 0;
}
if (num3 + num4 >= num2)
{
if (flag4 && num4 == 0)
{
flag5 = flag6 && firstPart[firstPart.Length - 1] == 'T';
if (flag6 || !(text == string.Empty))
{
num3 = 0;
if (flag6)
{
text = secondPart;
}
else
{
text = string.Empty;
}
text2 = text;
num2 = text2.Length;
flag6 = false;
continue;
}
}
IL_EA9:
if (num3 + 1 < num2 && text2[num3] == '.' && text2[num3 + 1] == 'F')
{
num3++;
while (num3 < num2 && text2[num3] == 'F')
{
num3++;
}
}
while (num3 < num2 && text2[num3] == 'K')
{
num3++;
}
if (num3 < num2)
{
return false;
}
if (s.Length > num)
{
if (num == 0)
{
return false;
}
if (char.IsDigit(s[num]) && char.IsDigit(s[num - 1]))
{
return false;
}
if (char.IsLetter(s[num]) && char.IsLetter(s[num - 1]))
{
return false;
}
incompleteFormat = true;
return false;
}
else
{
if (num9 == -1)
{
num9 = 0;
}
if (num10 == -1)
{
num10 = 0;
}
if (num11 == -1)
{
num11 = 0;
}
if (num12 == -1.0)
{
num12 = 0.0;
}
if (num5 == -1 && num7 == -1 && num8 == -1)
{
if ((style & DateTimeStyles.NoCurrentDateDefault) != DateTimeStyles.None)
{
num5 = 1;
num7 = 1;
num8 = 1;
}
else
{
num5 = DateTime.Today.Day;
num7 = DateTime.Today.Month;
num8 = DateTime.Today.Year;
}
}
if (num5 == -1)
{
num5 = 1;
}
if (num7 == -1)
{
num7 = 1;
}
if (num8 == -1)
{
if ((style & DateTimeStyles.NoCurrentDateDefault) != DateTimeStyles.None)
{
num8 = 1;
}
else
{
num8 = DateTime.Today.Year;
}
}
if (num13 == 0 && num9 == 12)
{
num9 = 0;
}
if (num13 == 1 && (!flag4 || num9 < 12))
{
num9 += 12;
}
if (num8 < 1 || num8 > 9999 || num7 < 1 || num7 > 12 || num5 < 1 || num5 > DateTime.DaysInMonth(num8, num7) || num9 < 0 || num9 > 23 || num10 < 0 || num10 > 59 || num11 < 0 || num11 > 59)
{
return false;
}
result = new DateTime(num8, num7, num5, num9, num10, num11, 0);
result = result.AddSeconds(num12);
if (num6 != -1 && num6 != (int)result.DayOfWeek)
{
return false;
}
if (num14 == -1)
{
if (result != DateTime.MinValue)
{
try
{
dto = new DateTimeOffset(result);
}
catch
{
}
}
}
else
{
if (num16 == -1)
{
num16 = 0;
}
if (num15 == -1)
{
num15 = 0;
}
if (num14 == 1)
{
num15 = -num15;
num16 = -num16;
}
try
{
dto = new DateTimeOffset(result, new TimeSpan(num15, num16, 0));
}
catch
{
}
}
bool flag8 = (style & DateTimeStyles.AdjustToUniversal) != DateTimeStyles.None;
if (num14 != -1)
{
long num18 = (result.ticks - dto.Offset).Ticks;
if (num18 < 0L)
{
num18 += 864000000000L;
}
result = new DateTime(false, new TimeSpan(num18));
result.kind = DateTimeKind.Utc;
if ((style & DateTimeStyles.RoundtripKind) != DateTimeStyles.None)
{
result = result.ToLocalTime();
}
}
else if (flag || (style & DateTimeStyles.AssumeUniversal) != DateTimeStyles.None)
{
result.kind = DateTimeKind.Utc;
}
else if ((style & DateTimeStyles.AssumeLocal) != DateTimeStyles.None)
{
result.kind = DateTimeKind.Local;
}
bool flag9 = !flag8 && (style & DateTimeStyles.RoundtripKind) == DateTimeStyles.None;
if (result.kind != DateTimeKind.Unspecified)
{
if (flag8)
{
result = result.ToUniversalTime();
}
else if (flag9)
{
result = result.ToLocalTime();
}
}
return true;
}
}
else
{
bool flag10 = true;
if (text2[num3] == '\'')
{
num4 = 1;
while (num3 + num4 < num2)
{
if (text2[num3 + num4] == '\'')
{
break;
}
if (num == s.Length || s[num] != text2[num3 + num4])
{
return false;
}
num++;
num4++;
}
num3 += num4 + 1;
num4 = 0;
}
else if (text2[num3] == '"')
{
num4 = 1;
while (num3 + num4 < num2)
{
if (text2[num3 + num4] == '"')
{
break;
}
if (num == s.Length || s[num] != text2[num3 + num4])
{
return false;
}
num++;
num4++;
}
num3 += num4 + 1;
num4 = 0;
}
else if (text2[num3] == '\\')
{
num3 += num4 + 1;
num4 = 0;
if (num3 >= num2)
{
return false;
}
if (s[num] != text2[num3])
{
return false;
}
num++;
num3++;
}
else if (text2[num3] == '%')
{
num3++;
}
else if (char.IsWhiteSpace(s[num]) || (s[num] == ',' && ((!exact && text2[num3] == '/') || char.IsWhiteSpace(text2[num3]))))
{
num++;
num4 = 0;
if (exact && (style & DateTimeStyles.AllowInnerWhite) == DateTimeStyles.None)
{
if (!char.IsWhiteSpace(text2[num3]))
{
return false;
}
num3++;
}
else
{
int i;
for (i = num; i < s.Length; i++)
{
if (!char.IsWhiteSpace(s[i]) && s[i] != ',')
{
break;
}
}
num = i;
for (i = num3; i < text2.Length; i++)
{
if (!char.IsWhiteSpace(text2[i]) && text2[i] != ',')
{
break;
}
}
num3 = i;
if (!exact && num3 < text2.Length && text2[num3] == '/' && !DateTime._ParseDateSeparator(s, num, dfi, exact, out num17))
{
num3++;
}
}
}
else if (num3 + num4 + 1 < num2 && text2[num3 + num4 + 1] == text2[num3 + num4])
{
num4++;
}
else
{
char c = text2[num3];
switch (c)
{
case 'F':
flag10 = false;
goto IL_A82;
case 'G':
if (s[num] != 'G')
{
return false;
}
if (num3 + 2 < num2 && num + 2 < s.Length && text2[num3 + 1] == 'M' && s[num + 1] == 'M' && text2[num3 + 2] == 'T' && s[num + 2] == 'T')
{
flag = true;
num4 = 2;
num17 = 3;
}
else
{
num4 = 0;
num17 = 1;
}
break;
case 'H':
if (num9 != -1 || (!flag4 && num13 >= 0))
{
return false;
}
if (num4 == 0)
{
num9 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
else
{
num9 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
}
if (num9 >= 24)
{
return false;
}
break;
default:
switch (c)
{
case 's':
if (num11 != -1)
{
return false;
}
if (num4 == 0)
{
num11 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
else
{
num11 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
}
if (num11 >= 60)
{
return false;
}
break;
case 't':
if (!DateTime._ParseAmPm(s, num, (num4 <= 0) ? 1 : 0, dfi, exact, out num17, ref num13))
{
return false;
}
break;
default:
switch (c)
{
case 'd':
if ((num4 < 2 && num5 != -1) || (num4 >= 2 && num6 != -1))
{
return false;
}
if (num4 == 0)
{
num5 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
else if (num4 == 1)
{
num5 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
}
else if (num4 == 2)
{
num6 = DateTime._ParseEnum(s, num, dfi.RawAbbreviatedDayNames, invariantInfo.RawAbbreviatedDayNames, exact, out num17);
}
else
{
num6 = DateTime._ParseEnum(s, num, dfi.RawDayNames, invariantInfo.RawDayNames, exact, out num17);
}
break;
default:
if (c != '/')
{
if (c != ':')
{
if (c != 'Z')
{
if (c != 'm')
{
if (s[num] != text2[num3])
{
return false;
}
num4 = 0;
num17 = 1;
}
else
{
if (num10 != -1)
{
return false;
}
if (num4 == 0)
{
num10 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
else
{
num10 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
}
if (num10 >= 60)
{
return false;
}
}
}
else
{
if (s[num] != 'Z')
{
return false;
}
num4 = 0;
num17 = 1;
flag = true;
}
}
else if (!DateTime._ParseTimeSeparator(s, num, dfi, exact, out num17))
{
return false;
}
}
else
{
if (!DateTime._ParseDateSeparator(s, num, dfi, exact, out num17))
{
return false;
}
num4 = 0;
}
break;
case 'f':
goto IL_A82;
case 'h':
if (num9 != -1)
{
return false;
}
if (num4 == 0)
{
num9 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
else
{
num9 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
}
if (num9 > 12)
{
return false;
}
if (num9 == 12)
{
num9 = 0;
}
break;
}
break;
case 'y':
if (num8 != -1)
{
return false;
}
if (num4 == 0)
{
num8 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
else if (num4 < 3)
{
num8 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
}
else
{
num8 = DateTime._ParseNumber(s, num, (!exact) ? 3 : 4, 4, false, flag3, out num17);
if (num8 >= 1000 && num17 == 4 && !longYear && s.Length > 4 + num)
{
int num19 = 0;
int num20 = DateTime._ParseNumber(s, num, 5, 5, false, flag3, out num19);
longYear = num20 > 9999;
}
num4 = 3;
}
if (num17 <= 2)
{
num8 += ((num8 >= 30) ? 1900 : 2000);
}
break;
case 'z':
if (num14 != -1)
{
return false;
}
if (s[num] == '+')
{
num14 = 0;
}
else
{
if (s[num] != '-')
{
return false;
}
num14 = 1;
}
num++;
if (num4 == 0)
{
num15 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
else if (num4 == 1)
{
num15 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
}
else
{
num15 = DateTime._ParseNumber(s, num, 1, 2, true, true, out num17);
num += num17;
if (num17 < 0)
{
return false;
}
num17 = 0;
if ((num < s.Length && char.IsDigit(s[num])) || DateTime._ParseTimeSeparator(s, num, dfi, exact, out num17))
{
num += num17;
num16 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
if (num17 < 0)
{
return false;
}
}
else
{
if (!flag4)
{
return false;
}
num17 = 0;
}
}
break;
}
break;
case 'K':
if (s[num] == 'Z')
{
num++;
flag = true;
}
else if (s[num] == '+' || s[num] == '-')
{
if (num14 != -1)
{
return false;
}
if (s[num] == '+')
{
num14 = 0;
}
else if (s[num] == '-')
{
num14 = 1;
}
num++;
num15 = DateTime._ParseNumber(s, num, 0, 2, true, flag3, out num17);
num += num17;
if (num17 < 0)
{
return false;
}
if (char.IsDigit(s[num]))
{
num17 = 0;
}
else if (!DateTime._ParseString(s, num, 0, dfi.TimeSeparator, out num17))
{
return false;
}
num += num17;
num16 = DateTime._ParseNumber(s, num, 0, 2, true, flag3, out num17);
num4 = 2;
if (num17 < 0)
{
return false;
}
}
break;
case 'M':
if (num7 != -1)
{
return false;
}
if (flag4)
{
num17 = -1;
if (num4 == 0 || num4 == 3)
{
num7 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
if (num4 > 1 && num17 == -1)
{
num7 = DateTime._ParseEnum(s, num, dfi.RawMonthNames, invariantInfo.RawMonthNames, exact, out num17) + 1;
}
if (num4 > 1 && num17 == -1)
{
num7 = DateTime._ParseEnum(s, num, dfi.RawAbbreviatedMonthNames, invariantInfo.RawAbbreviatedMonthNames, exact, out num17) + 1;
}
}
else if (num4 == 0)
{
num7 = DateTime._ParseNumber(s, num, 1, 2, false, flag3, out num17);
}
else if (num4 == 1)
{
num7 = DateTime._ParseNumber(s, num, 1, 2, true, flag3, out num17);
}
else if (num4 == 2)
{
num7 = DateTime._ParseEnum(s, num, dfi.RawAbbreviatedMonthNames, invariantInfo.RawAbbreviatedMonthNames, exact, out num17) + 1;
}
else
{
num7 = DateTime._ParseEnum(s, num, dfi.RawMonthNames, invariantInfo.RawMonthNames, exact, out num17) + 1;
}
break;
}
IL_DF3:
if (num17 < 0)
{
return false;
}
num += num17;
if (!exact && !flag4)
{
c = text2[num3];
if (c == 'F' || c == 'f' || c == 'm' || c == 's' || c == 'z')
{
if (s.Length > num && s[num] == 'Z' && (num3 + 1 == text2.Length || text2[num3 + 1] != 'Z'))
{
flag = true;
num++;
}
}
}
num3 = num3 + num4 + 1;
num4 = 0;
continue;
IL_A82:
if (num4 > 6 || num12 != -1.0)
{
return false;
}
double num21 = (double)DateTime._ParseNumber(s, num, 0, num4 + 1, flag10, flag3, out num17);
if (num17 == -1)
{
return false;
}
num12 = num21 / Math.Pow(10.0, (double)num17);
goto IL_DF3;
}
}
}
goto IL_EA9;
}
/// Converts the specified string representation of a date and time to its equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly or an exception is thrown.
/// A equivalent to the date and time contained in as specified by , , and .
/// A string containing a date and time to convert.
/// A format specifier that defines the required format of .
/// An object that supplies culture-specific formatting information about .
/// A bitwise combination of the enumeration values that provides additional information about , about style elements that may be present in , or about the conversion from to a value. A typical value to specify is .
///
/// or is null.
///
/// or is an empty string. -or- does not contain a date and time that corresponds to the pattern specified in .
///
/// contains an invalid combination of values. For example, both and .
/// 2
// Token: 0x06003D83 RID: 15747 RVA: 0x000D0810 File Offset: 0x000CEA10
public static DateTime ParseExact(string s, string format, IFormatProvider provider, DateTimeStyles style)
{
if (format == null)
{
throw new ArgumentNullException("format");
}
return DateTime.ParseExact(s, new string[] { format }, provider, style);
}
/// Converts the specified string representation of a date and time to its equivalent using the specified array of formats, culture-specific format information, and style. The format of the string representation must match at least one of the specified formats exactly or an exception is thrown.
/// A equivalent to the date and time contained in as specified by , , and .
/// A string containing one or more dates and times to convert.
/// An array of allowable formats of .
/// An that supplies culture-specific format information about .
/// A bitwise combination of values that indicates the permitted format of . A typical value to specify is .
///
/// or is null.
///
/// is an empty string. -or- an element of is an empty string. -or- does not contain a date and time that corresponds to any element of .
///
/// contains an invalid combination of values. For example, both and .
/// 2
// Token: 0x06003D84 RID: 15748 RVA: 0x000D0844 File Offset: 0x000CEA44
public static DateTime ParseExact(string s, string[] formats, IFormatProvider provider, DateTimeStyles style)
{
DateTimeFormatInfo instance = DateTimeFormatInfo.GetInstance(provider);
DateTime.CheckStyle(style);
if (s == null)
{
throw new ArgumentNullException("s");
}
if (formats == null)
{
throw new ArgumentNullException("formats");
}
if (formats.Length == 0)
{
throw new FormatException("Format specifier was invalid.");
}
bool flag = false;
Exception ex = null;
DateTime dateTime;
if (!DateTime.ParseExact(s, formats, instance, style, out dateTime, true, ref flag, true, ref ex))
{
throw ex;
}
return dateTime;
}
// Token: 0x06003D85 RID: 15749 RVA: 0x000D08B0 File Offset: 0x000CEAB0
private static void CheckStyle(DateTimeStyles style)
{
if ((style & DateTimeStyles.RoundtripKind) != DateTimeStyles.None && ((style & DateTimeStyles.AdjustToUniversal) != DateTimeStyles.None || (style & DateTimeStyles.AssumeLocal) != DateTimeStyles.None || (style & DateTimeStyles.AssumeUniversal) != DateTimeStyles.None))
{
throw new ArgumentException("The DateTimeStyles value RoundtripKind cannot be used with the values AssumeLocal, Asersal or AdjustToUniversal.", "style");
}
if ((style & DateTimeStyles.AssumeUniversal) != DateTimeStyles.None && (style & DateTimeStyles.AssumeLocal) != DateTimeStyles.None)
{
throw new ArgumentException("The DateTimeStyles values AssumeLocal and AssumeUniversal cannot be used together.", "style");
}
}
/// Converts the specified string representation of a date and time to its equivalent and returns a value that indicates whether the conversion succeeded.
/// true if the parameter was converted successfully; otherwise, false.
/// A string containing a date and time to convert.
/// When this method returns, contains the value equivalent to the date and time contained in , if the conversion succeeded, or if the conversion failed. The conversion fails if the parameter is null, is an empty string (""), or does not contain a valid string representation of a date and time. This parameter is passed uninitialized.
/// 1
// Token: 0x06003D86 RID: 15750 RVA: 0x000D0918 File Offset: 0x000CEB18
public static bool TryParse(string s, out DateTime result)
{
if (s != null)
{
try
{
Exception ex = null;
DateTimeOffset dateTimeOffset;
return DateTime.CoreParse(s, null, DateTimeStyles.AllowWhiteSpaces, out result, out dateTimeOffset, false, ref ex);
}
catch
{
}
}
result = DateTime.MinValue;
return false;
}
/// Converts the specified string representation of a date and time to its equivalent using the specified culture-specific format information and formatting style, and returns a value that indicates whether the conversion succeeded.
/// true if the parameter was converted successfully; otherwise, false.
/// A string containing a date and time to convert.
/// An object that supplies culture-specific formatting information about .
/// A bitwise combination of enumeration values that defines how to interpret the parsed date in relation to the current time zone or the current date. A typical value to specify is .
/// When this method returns, contains the value equivalent to the date and time contained in , if the conversion succeeded, or if the conversion failed. The conversion fails if the parameter is null, is an empty string (""), or does not contain a valid string representation of a date and time. This parameter is passed uninitialized.
///
/// is not a valid value.-or- contains an invalid combination of values (for example, both and ).
///
/// is a neutral culture and cannot be used in a parsing operation.
/// 1
// Token: 0x06003D87 RID: 15751 RVA: 0x000D0978 File Offset: 0x000CEB78
public static bool TryParse(string s, IFormatProvider provider, DateTimeStyles styles, out DateTime result)
{
if (s != null)
{
try
{
Exception ex = null;
DateTimeOffset dateTimeOffset;
return DateTime.CoreParse(s, provider, styles, out result, out dateTimeOffset, false, ref ex);
}
catch
{
}
}
result = DateTime.MinValue;
return false;
}
/// Converts the specified string representation of a date and time to its equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly. The method returns a value that indicates whether the conversion succeeded.
/// true if was converted successfully; otherwise, false.
/// A string containing a date and time to convert.
/// The required format of .
/// An object that supplies culture-specific formatting information about .
/// A bitwise combination of one or more enumeration values that indicate the permitted format of .
/// When this method returns, contains the value equivalent to the date and time contained in , if the conversion succeeded, or if the conversion failed. The conversion fails if either the or parameter is null, is an empty string, or does not contain a date and time that correspond to the pattern specified in . This parameter is passed uninitialized.
///
/// is not a valid value.-or- contains an invalid combination of values (for example, both and ).
/// 1
// Token: 0x06003D88 RID: 15752 RVA: 0x000D09D8 File Offset: 0x000CEBD8
public static bool TryParseExact(string s, string format, IFormatProvider provider, DateTimeStyles style, out DateTime result)
{
return DateTime.TryParseExact(s, new string[] { format }, provider, style, out result);
}
/// Converts the specified string representation of a date and time to its equivalent using the specified array of formats, culture-specific format information, and style. The format of the string representation must match at least one of the specified formats exactly. The method returns a value that indicates whether the conversion succeeded.
/// true if the parameter was converted successfully; otherwise, false.
/// A string containing one or more dates and times to convert.
/// An array of allowable formats of .
/// An object that supplies culture-specific format information about .
/// A bitwise combination of enumeration values that indicates the permitted format of . A typical value to specify is .
/// When this method returns, contains the value equivalent to the date and time contained in , if the conversion succeeded, or if the conversion failed. The conversion fails if or is null, or an element of is an empty string, or the format of is not exactly as specified by at least one of the format patterns in . This parameter is passed uninitialized.
///
/// is not a valid value.-or- contains an invalid combination of values (for example, both and ).
/// 1
// Token: 0x06003D89 RID: 15753 RVA: 0x000D09FC File Offset: 0x000CEBFC
public static bool TryParseExact(string s, string[] formats, IFormatProvider provider, DateTimeStyles style, out DateTime result)
{
bool flag2;
try
{
DateTimeFormatInfo instance = DateTimeFormatInfo.GetInstance(provider);
bool flag = false;
Exception ex = null;
flag2 = DateTime.ParseExact(s, formats, instance, style, out result, true, ref flag, false, ref ex);
}
catch
{
result = DateTime.MinValue;
flag2 = false;
}
return flag2;
}
// Token: 0x06003D8A RID: 15754 RVA: 0x000D0A68 File Offset: 0x000CEC68
private static bool ParseExact(string s, string[] formats, DateTimeFormatInfo dfi, DateTimeStyles style, out DateTime ret, bool exact, ref bool longYear, bool setExceptionOnError, ref Exception exception)
{
bool flag = false;
for (int i = 0; i < formats.Length; i++)
{
string text = formats[i];
if (text == null || text == string.Empty)
{
break;
}
DateTime dateTime;
DateTimeOffset dateTimeOffset;
if (DateTime._DoParse(s, formats[i], null, exact, out dateTime, out dateTimeOffset, dfi, style, false, ref flag, ref longYear))
{
ret = dateTime;
return true;
}
}
if (setExceptionOnError)
{
exception = new FormatException("Invalid format string");
}
ret = DateTime.MinValue;
return false;
}
/// Subtracts the specified date and time from this instance.
/// A interval equal to the date and time represented by this instance minus the date and time represented by .
/// An instance of .
/// The result is less than or greater than .
/// 2
// Token: 0x06003D8B RID: 15755 RVA: 0x000D0AF4 File Offset: 0x000CECF4
public TimeSpan Subtract(DateTime value)
{
return new TimeSpan(this.ticks.Ticks) - value.ticks;
}
/// Subtracts the specified duration from this instance.
/// A equal to the date and time represented by this instance minus the time interval represented by .
/// An instance of .
/// The result is less than or greater than .
/// 2
// Token: 0x06003D8C RID: 15756 RVA: 0x000D0B14 File Offset: 0x000CED14
public DateTime Subtract(TimeSpan value)
{
TimeSpan timeSpan = new TimeSpan(this.ticks.Ticks) - value;
return new DateTime(true, timeSpan)
{
kind = this.kind
};
}
/// Converts the value of the current object to a Windows file time.
/// The value of the current object expressed as a Windows file time.
/// The resulting file time would represent a date and time before 12:00 midnight January 1, 1601 C.E. UTC.
/// 2
// Token: 0x06003D8D RID: 15757 RVA: 0x000D0B50 File Offset: 0x000CED50
public long ToFileTime()
{
DateTime dateTime = this.ToUniversalTime();
if (dateTime.Ticks < 504911232000000000L)
{
throw new ArgumentOutOfRangeException("file time is not valid");
}
return dateTime.Ticks - 504911232000000000L;
}
/// Converts the value of the current object to a Windows file time.
/// The value of the current object expressed as a Windows file time.
/// The resulting file time would represent a date and time before 12:00 midnight January 1, 1601 C.E. UTC.
/// 2
// Token: 0x06003D8E RID: 15758 RVA: 0x000D0B98 File Offset: 0x000CED98
public long ToFileTimeUtc()
{
if (this.Ticks < 504911232000000000L)
{
throw new ArgumentOutOfRangeException("file time is not valid");
}
return this.Ticks - 504911232000000000L;
}
/// Converts the value of the current object to its equivalent long date string representation.
/// A string that contains the long date string representation of the current object.
/// 2
// Token: 0x06003D8F RID: 15759 RVA: 0x000D0BCC File Offset: 0x000CEDCC
public string ToLongDateString()
{
return this.ToString("D");
}
/// Converts the value of the current object to its equivalent long time string representation.
/// A string that contains the long time string representation of the current object.
/// 2
// Token: 0x06003D90 RID: 15760 RVA: 0x000D0BDC File Offset: 0x000CEDDC
public string ToLongTimeString()
{
return this.ToString("T");
}
/// Converts the value of this instance to the equivalent OLE Automation date.
/// A double-precision floating-point number that contains an OLE Automation date equivalent to the value of this instance.
/// The value of this instance cannot be represented as an OLE Automation date.
/// 2
// Token: 0x06003D91 RID: 15761 RVA: 0x000D0BEC File Offset: 0x000CEDEC
public double ToOADate()
{
long num = this.Ticks;
if (num == 0L)
{
return 0.0;
}
if (num < 31242239136000000L)
{
return -657434.999;
}
TimeSpan timeSpan = new TimeSpan(this.Ticks - 599264352000000000L);
double num2 = timeSpan.TotalDays;
if (num < 599264352000000000L)
{
double num3 = Math.Ceiling(num2);
num2 = num3 - 2.0 - (num2 - num3);
}
else if (num2 >= 2958466.0)
{
num2 = 2958465.99999999;
}
return num2;
}
/// Converts the value of the current object to its equivalent short date string representation.
/// A string that contains the short date string representation of the current object.
/// 2
// Token: 0x06003D92 RID: 15762 RVA: 0x000D0C90 File Offset: 0x000CEE90
public string ToShortDateString()
{
return this.ToString("d");
}
/// Converts the value of the current object to its equivalent short time string representation.
/// A string that contains the short time string representation of the current object.
/// 2
// Token: 0x06003D93 RID: 15763 RVA: 0x000D0CA0 File Offset: 0x000CEEA0
public string ToShortTimeString()
{
return this.ToString("t");
}
/// Converts the value of the current object to its equivalent string representation.
/// A string representation of the value of the current object.
/// The date and time is outside the range of dates supported by the calendar used by the current culture.
/// 1
// Token: 0x06003D94 RID: 15764 RVA: 0x000D0CB0 File Offset: 0x000CEEB0
public override string ToString()
{
return this.ToString("G", null);
}
/// Converts the value of the current object to its equivalent string representation using the specified culture-specific format information.
/// A string representation of value of the current object as specified by .
/// An object that supplies culture-specific formatting information.
/// The date and time is outside the range of dates supported by the calendar used by .
/// 1
// Token: 0x06003D95 RID: 15765 RVA: 0x000D0CC0 File Offset: 0x000CEEC0
public string ToString(IFormatProvider provider)
{
return this.ToString(null, provider);
}
/// Converts the value of the current object to its equivalent string representation using the specified format.
/// A string representation of value of the current object as specified by .
/// A standard or custom date and time format string.
/// The length of is 1, and it is not one of the format specifier characters defined for .-or- does not contain a valid custom format pattern.
/// The date and time is outside the range of dates supported by the calendar used by the current culture.
/// 1
// Token: 0x06003D96 RID: 15766 RVA: 0x000D0CCC File Offset: 0x000CEECC
public string ToString(string format)
{
return this.ToString(format, null);
}
/// Converts the value of the current object to its equivalent string representation using the specified format and culture-specific format information.
/// A string representation of value of the current object as specified by and .
/// A standard or custom date and time format string.
/// An object that supplies culture-specific formatting information.
/// The length of is 1, and it is not one of the format specifier characters defined for .-or- does not contain a valid custom format pattern.
/// The date and time is outside the range of dates supported by the calendar used by .
/// 1
// Token: 0x06003D97 RID: 15767 RVA: 0x000D0CD8 File Offset: 0x000CEED8
public string ToString(string format, IFormatProvider provider)
{
DateTimeFormatInfo instance = DateTimeFormatInfo.GetInstance(provider);
if (format == null || format == string.Empty)
{
format = "G";
}
bool flag = false;
bool flag2 = false;
if (format.Length == 1)
{
char c = format[0];
format = DateTimeUtils.GetStandardPattern(c, instance, out flag, out flag2);
if (c == 'U')
{
return DateTimeUtils.ToString(this.ToUniversalTime(), format, instance);
}
if (format == null)
{
throw new FormatException("format is not one of the format specifier characters defined for DateTimeFormatInfo");
}
}
return DateTimeUtils.ToString(this, format, instance);
}
/// Converts the value of the current object to local time.
/// A object whose property is , and whose value is the local time equivalent to the value of the current object, or if the converted value is too large to be represented by a object, or if the converted value is too small to be represented as a object.
/// 2
// Token: 0x06003D98 RID: 15768 RVA: 0x000D0D64 File Offset: 0x000CEF64
public DateTime ToLocalTime()
{
return TimeZone.CurrentTimeZone.ToLocalTime(this);
}
/// Converts the value of the current object to Coordinated Universal Time (UTC).
/// A object whose property is , and whose value is the UTC equivalent to the value of the current object, or if the converted value is too large to be represented by a object, or if the converted value is too small to be represented by a object.
/// 2
// Token: 0x06003D99 RID: 15769 RVA: 0x000D0D78 File Offset: 0x000CEF78
public DateTime ToUniversalTime()
{
return TimeZone.CurrentTimeZone.ToUniversalTime(this);
}
/// Adds a specified time interval to a specified date and time, yielding a new date and time.
/// A that is the sum of the values of and .
/// A .
/// A .
/// The resulting is less than or greater than .
/// 3
// Token: 0x06003D9A RID: 15770 RVA: 0x000D0D8C File Offset: 0x000CEF8C
public static DateTime operator +(DateTime d, TimeSpan t)
{
return new DateTime(true, d.ticks + t)
{
kind = d.kind
};
}
/// Determines whether two specified instances of are equal.
/// true if and represent the same date and time; otherwise, false.
/// A .
/// A .
/// 3
// Token: 0x06003D9B RID: 15771 RVA: 0x000D0DC0 File Offset: 0x000CEFC0
public static bool operator ==(DateTime d1, DateTime d2)
{
return d1.ticks == d2.ticks;
}
/// Determines whether one specified is greater than another specified .
/// true if is greater than ; otherwise, false.
/// A .
/// A .
/// 3
// Token: 0x06003D9C RID: 15772 RVA: 0x000D0DD8 File Offset: 0x000CEFD8
public static bool operator >(DateTime t1, DateTime t2)
{
return t1.ticks > t2.ticks;
}
/// Determines whether one specified is greater than or equal to another specified .
/// true if is greater than or equal to ; otherwise, false.
/// A .
/// A .
/// 3
// Token: 0x06003D9D RID: 15773 RVA: 0x000D0DF0 File Offset: 0x000CEFF0
public static bool operator >=(DateTime t1, DateTime t2)
{
return t1.ticks >= t2.ticks;
}
/// Determines whether two specified instances of are not equal.
/// true if and do not represent the same date and time; otherwise, false.
/// A .
/// A .
/// 3
// Token: 0x06003D9E RID: 15774 RVA: 0x000D0E08 File Offset: 0x000CF008
public static bool operator !=(DateTime d1, DateTime d2)
{
return d1.ticks != d2.ticks;
}
/// Determines whether one specified is less than another specified .
/// true if is less than ; otherwise, false.
/// A .
/// A .
/// 3
// Token: 0x06003D9F RID: 15775 RVA: 0x000D0E20 File Offset: 0x000CF020
public static bool operator <(DateTime t1, DateTime t2)
{
return t1.ticks < t2.ticks;
}
/// Determines whether one specified is less than or equal to another specified .
/// true if is less than or equal to ; otherwise, false.
/// A .
/// A .
/// 3
// Token: 0x06003DA0 RID: 15776 RVA: 0x000D0E38 File Offset: 0x000CF038
public static bool operator <=(DateTime t1, DateTime t2)
{
return t1.ticks <= t2.ticks;
}
/// Subtracts a specified date and time from another specified date and time and returns a time interval.
/// A that is the time interval between and ; that is, minus .
/// A (the minuend).
/// A (the subtrahend).
/// 3
// Token: 0x06003DA1 RID: 15777 RVA: 0x000D0E50 File Offset: 0x000CF050
public static TimeSpan operator -(DateTime d1, DateTime d2)
{
return new TimeSpan((d1.ticks - d2.ticks).Ticks);
}
/// Subtracts a specified time interval from a specified date and time and returns a new date and time.
/// A whose value is the value of minus the value of .
/// A .
/// A .
/// The resulting is less than or greater than .
/// 3
// Token: 0x06003DA2 RID: 15778 RVA: 0x000D0E80 File Offset: 0x000CF080
public static DateTime operator -(DateTime d, TimeSpan t)
{
return new DateTime(true, d.ticks - t)
{
kind = d.kind
};
}
// Token: 0x04001894 RID: 6292
private const int dp400 = 146097;
// Token: 0x04001895 RID: 6293
private const int dp100 = 36524;
// Token: 0x04001896 RID: 6294
private const int dp4 = 1461;
// Token: 0x04001897 RID: 6295
private const long w32file_epoch = 504911232000000000L;
// Token: 0x04001898 RID: 6296
private const long MAX_VALUE_TICKS = 3155378975999999999L;
// Token: 0x04001899 RID: 6297
internal const long UnixEpoch = 621355968000000000L;
// Token: 0x0400189A RID: 6298
private const long ticks18991230 = 599264352000000000L;
// Token: 0x0400189B RID: 6299
private const double OAMinValue = -657435.0;
// Token: 0x0400189C RID: 6300
private const double OAMaxValue = 2958466.0;
// Token: 0x0400189D RID: 6301
private const string formatExceptionMessage = "String was not recognized as a valid DateTime.";
// Token: 0x0400189E RID: 6302
private TimeSpan ticks;
// Token: 0x0400189F RID: 6303
private DateTimeKind kind;
/// Represents the largest possible value of . This field is read-only.
/// 1
// Token: 0x040018A0 RID: 6304
public static readonly DateTime MaxValue = new DateTime(false, new TimeSpan(3155378975999999999L));
/// Represents the smallest possible value of . This field is read-only.
/// 1
// Token: 0x040018A1 RID: 6305
public static readonly DateTime MinValue = new DateTime(false, new TimeSpan(0L));
// Token: 0x040018A2 RID: 6306
private static readonly string[] ParseTimeFormats = new string[] { "H:m:s.fffffffzzz", "H:m:s.fffffff", "H:m:s tt zzz", "H:m:szzz", "H:m:s", "H:mzzz", "H:m", "H tt", "H'時'm'分's'秒'" };
// Token: 0x040018A3 RID: 6307
private static readonly string[] ParseYearDayMonthFormats = new string[] { "yyyy/M/dT", "M/yyyy/dT", "yyyy'年'M'月'd'日", "yyyy/d/MMMM", "yyyy/MMM/d", "d/MMMM/yyyy", "MMM/d/yyyy", "d/yyyy/MMMM", "MMM/yyyy/d", "yy/d/M" };
// Token: 0x040018A4 RID: 6308
private static readonly string[] ParseYearMonthDayFormats = new string[]
{
"yyyy/M/dT", "M/yyyy/dT", "yyyy'年'M'月'd'日", "yyyy/MMMM/d", "yyyy/d/MMM", "MMMM/d/yyyy", "d/MMM/yyyy", "MMMM/yyyy/d", "d/yyyy/MMM", "yy/MMMM/d",
"yy/d/MMM", "MMM/yy/d"
};
// Token: 0x040018A5 RID: 6309
private static readonly string[] ParseDayMonthYearFormats = new string[]
{
"yyyy/M/dT", "M/yyyy/dT", "yyyy'年'M'月'd'日", "yyyy/MMMM/d", "yyyy/d/MMM", "d/MMMM/yyyy", "MMM/d/yyyy", "MMMM/yyyy/d", "d/yyyy/MMM", "d/MMMM/yy",
"yy/MMM/d", "d/yy/MMM", "yy/d/MMM", "MMM/d/yy", "MMM/yy/d"
};
// Token: 0x040018A6 RID: 6310
private static readonly string[] ParseMonthDayYearFormats = new string[]
{
"yyyy/M/dT", "M/yyyy/dT", "yyyy'年'M'月'd'日", "yyyy/MMMM/d", "yyyy/d/MMM", "MMMM/d/yyyy", "d/MMM/yyyy", "MMMM/yyyy/d", "d/yyyy/MMM", "MMMM/d/yy",
"MMM/yy/d", "d/MMM/yy", "yy/MMM/d", "d/yy/MMM", "yy/d/MMM"
};
// Token: 0x040018A7 RID: 6311
private static readonly string[] MonthDayShortFormats = new string[] { "MMMM/d", "d/MMM", "yyyy/MMMM" };
// Token: 0x040018A8 RID: 6312
private static readonly string[] DayMonthShortFormats = new string[] { "d/MMMM", "MMM/yy", "yyyy/MMMM" };
// Token: 0x040018A9 RID: 6313
private static readonly int[] daysmonth = new int[]
{
0, 31, 28, 31, 30, 31, 30, 31, 31, 30,
31, 30, 31
};
// Token: 0x040018AA RID: 6314
private static readonly int[] daysmonthleap = new int[]
{
0, 31, 29, 31, 30, 31, 30, 31, 31, 30,
31, 30, 31
};
// Token: 0x040018AB RID: 6315
private static object to_local_time_span_object;
// Token: 0x040018AC RID: 6316
private static long last_now;
// Token: 0x02000654 RID: 1620
private enum Which
{
// Token: 0x040018AE RID: 6318
Day,
// Token: 0x040018AF RID: 6319
DayYear,
// Token: 0x040018B0 RID: 6320
Month,
// Token: 0x040018B1 RID: 6321
Year
}
}
}