88 lines
4.4 KiB
C#
88 lines
4.4 KiB
C#
using System;
|
|
|
|
namespace System.Globalization
|
|
{
|
|
/// <summary>Represents time in divisions, such as months, days, and years. Years are calculated using the Gregorian calendar, while days and months are calculated using the lunisolar calendar.</summary>
|
|
// Token: 0x02000191 RID: 401
|
|
[Serializable]
|
|
public class KoreanLunisolarCalendar : EastAsianLunisolarCalendar
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class. </summary>
|
|
// Token: 0x0600141A RID: 5146 RVA: 0x0004DA78 File Offset: 0x0004BC78
|
|
[MonoTODO]
|
|
public KoreanLunisolarCalendar()
|
|
: base(KoreanLunisolarCalendar.era_handler)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600141B RID: 5147 RVA: 0x0004DA88 File Offset: 0x0004BC88
|
|
static KoreanLunisolarCalendar()
|
|
{
|
|
KoreanLunisolarCalendar.era_handler.appendEra(1, CCFixed.FromDateTime(new DateTime(1, 1, 1)));
|
|
}
|
|
|
|
/// <summary>Gets the eras that correspond to the range of dates and times supported by the current <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> object.</summary>
|
|
/// <returns>An array of 32-bit signed integers that specify the relevant eras. The return value for a <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> object is always an array containing one element equal to the <see cref="F:System.Globalization.KoreanLunisolarCalendar.GregorianEra" /> value.</returns>
|
|
// Token: 0x17000371 RID: 881
|
|
// (get) Token: 0x0600141C RID: 5148 RVA: 0x0004DAE4 File Offset: 0x0004BCE4
|
|
public override int[] Eras
|
|
{
|
|
get
|
|
{
|
|
return (int[])KoreanLunisolarCalendar.era_handler.Eras.Clone();
|
|
}
|
|
}
|
|
|
|
/// <summary>Retrieves the era that corresponds to the specified <see cref="T:System.DateTime" />.</summary>
|
|
/// <returns>An integer that represents the era specified by the <paramref name="time" /> parameter. The return value for a <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> object is always the <see cref="F:System.Globalization.KoreanLunisolarCalendar.GregorianEra" /> value.</returns>
|
|
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="time" /> represents a date and time less than <see cref="P:System.Globalization.KoreanLunisolarCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.KoreanLunisolarCalendar.MaxSupportedDateTime" />.</exception>
|
|
// Token: 0x0600141D RID: 5149 RVA: 0x0004DAFC File Offset: 0x0004BCFC
|
|
public override int GetEra(DateTime time)
|
|
{
|
|
int num = CCFixed.FromDateTime(time);
|
|
int num2;
|
|
KoreanLunisolarCalendar.era_handler.EraYear(out num2, num);
|
|
return num2;
|
|
}
|
|
|
|
/// <summary>Gets the minimum date and time supported by the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class.</summary>
|
|
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class, which is equivalent to the first moment of February 14, 918 C.E. in the Gregorian calendar.</returns>
|
|
// Token: 0x17000372 RID: 882
|
|
// (get) Token: 0x0600141E RID: 5150 RVA: 0x0004DB20 File Offset: 0x0004BD20
|
|
public override DateTime MinSupportedDateTime
|
|
{
|
|
get
|
|
{
|
|
return KoreanLunisolarCalendar.KoreanMin;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the maximum date and time supported by the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class.</summary>
|
|
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> class, which is equivalent to the last moment of February 10, 2051 C.E. in the Gregorian calendar.</returns>
|
|
// Token: 0x17000373 RID: 883
|
|
// (get) Token: 0x0600141F RID: 5151 RVA: 0x0004DB28 File Offset: 0x0004BD28
|
|
public override DateTime MaxSupportedDateTime
|
|
{
|
|
get
|
|
{
|
|
return KoreanLunisolarCalendar.KoreanMax;
|
|
}
|
|
}
|
|
|
|
/// <summary>Specifies the Gregorian era that corresponds to the current <see cref="T:System.Globalization.KoreanLunisolarCalendar" /> object.</summary>
|
|
// Token: 0x0400058A RID: 1418
|
|
public const int GregorianEra = 1;
|
|
|
|
// Token: 0x0400058B RID: 1419
|
|
internal static readonly CCEastAsianLunisolarEraHandler era_handler = new CCEastAsianLunisolarEraHandler();
|
|
|
|
// Token: 0x0400058C RID: 1420
|
|
private static DateTime KoreanMin = new DateTime(918, 2, 14, 0, 0, 0);
|
|
|
|
// Token: 0x0400058D RID: 1421
|
|
private static DateTime KoreanMax = new DateTime(2051, 2, 10, 23, 59, 59);
|
|
}
|
|
}
|