97 lines
3.9 KiB
C#
97 lines
3.9 KiB
C#
using System;
|
|
|
|
namespace System.Globalization
|
|
{
|
|
/// <summary>Represents time in divisions, such as months, days, and years. Years are calculated as for the Japanese calendar, while days and months are calculated using the lunisolar calendar.</summary>
|
|
// Token: 0x0200018E RID: 398
|
|
[Serializable]
|
|
public class JapaneseLunisolarCalendar : EastAsianLunisolarCalendar
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class. </summary>
|
|
// Token: 0x060013D8 RID: 5080 RVA: 0x0004D22C File Offset: 0x0004B42C
|
|
[MonoTODO]
|
|
public JapaneseLunisolarCalendar()
|
|
: base(JapaneseLunisolarCalendar.era_handler)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060013D9 RID: 5081 RVA: 0x0004D23C File Offset: 0x0004B43C
|
|
static JapaneseLunisolarCalendar()
|
|
{
|
|
JapaneseLunisolarCalendar.era_handler.appendEra(3, CCGregorianCalendar.fixed_from_dmy(25, 12, 1926), CCGregorianCalendar.fixed_from_dmy(7, 1, 1989));
|
|
JapaneseLunisolarCalendar.era_handler.appendEra(4, CCGregorianCalendar.fixed_from_dmy(8, 1, 1989));
|
|
}
|
|
|
|
// Token: 0x17000364 RID: 868
|
|
// (get) Token: 0x060013DA RID: 5082 RVA: 0x0004D2BC File Offset: 0x0004B4BC
|
|
internal override int ActualCurrentEra
|
|
{
|
|
get
|
|
{
|
|
return 4;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the eras that are relevant to the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> object.</summary>
|
|
/// <returns>An array of 32-bit signed integers that specify the relevant eras.</returns>
|
|
// Token: 0x17000365 RID: 869
|
|
// (get) Token: 0x060013DB RID: 5083 RVA: 0x0004D2C0 File Offset: 0x0004B4C0
|
|
public override int[] Eras
|
|
{
|
|
get
|
|
{
|
|
return (int[])JapaneseLunisolarCalendar.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 in the <paramref name="time" /> parameter.</returns>
|
|
/// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
|
|
// Token: 0x060013DC RID: 5084 RVA: 0x0004D2D8 File Offset: 0x0004B4D8
|
|
public override int GetEra(DateTime time)
|
|
{
|
|
int num = CCFixed.FromDateTime(time);
|
|
int num2;
|
|
JapaneseLunisolarCalendar.era_handler.EraYear(out num2, num);
|
|
return num2;
|
|
}
|
|
|
|
/// <summary>Gets the minimum date and time supported by the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class.</summary>
|
|
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class, which is equivalent to the first moment of January 28, 1960 C.E. in the Gregorian calendar.</returns>
|
|
// Token: 0x17000366 RID: 870
|
|
// (get) Token: 0x060013DD RID: 5085 RVA: 0x0004D2FC File Offset: 0x0004B4FC
|
|
public override DateTime MinSupportedDateTime
|
|
{
|
|
get
|
|
{
|
|
return JapaneseLunisolarCalendar.JapanMin;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the maximum date and time supported by the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class.</summary>
|
|
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.JapaneseLunisolarCalendar" /> class, which is equivalent to the last moment of January 22, 2050 C.E. in the Gregorian calendar.</returns>
|
|
// Token: 0x17000367 RID: 871
|
|
// (get) Token: 0x060013DE RID: 5086 RVA: 0x0004D304 File Offset: 0x0004B504
|
|
public override DateTime MaxSupportedDateTime
|
|
{
|
|
get
|
|
{
|
|
return JapaneseLunisolarCalendar.JapanMax;
|
|
}
|
|
}
|
|
|
|
/// <summary>Specifies the current era.</summary>
|
|
// Token: 0x0400057F RID: 1407
|
|
public const int JapaneseEra = 1;
|
|
|
|
// Token: 0x04000580 RID: 1408
|
|
internal static readonly CCEastAsianLunisolarEraHandler era_handler = new CCEastAsianLunisolarEraHandler();
|
|
|
|
// Token: 0x04000581 RID: 1409
|
|
private static DateTime JapanMin = new DateTime(1960, 1, 28, 0, 0, 0);
|
|
|
|
// Token: 0x04000582 RID: 1410
|
|
private static DateTime JapanMax = new DateTime(2050, 1, 22, 23, 59, 59);
|
|
}
|
|
}
|