85 lines
3.6 KiB
C#
85 lines
3.6 KiB
C#
using System;
|
|
|
|
namespace System.Globalization
|
|
{
|
|
/// <summary>Represents the Taiwan lunisolar calendar. As for the Taiwan calendar, years are calculated using the Gregorian calendar, while days and months are calculated using the lunisolar calendar.</summary>
|
|
// Token: 0x02000198 RID: 408
|
|
[Serializable]
|
|
public class TaiwanLunisolarCalendar : EastAsianLunisolarCalendar
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class. </summary>
|
|
// Token: 0x060014CA RID: 5322 RVA: 0x0004FE98 File Offset: 0x0004E098
|
|
[MonoTODO]
|
|
public TaiwanLunisolarCalendar()
|
|
: base(TaiwanLunisolarCalendar.era_handler)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060014CB RID: 5323 RVA: 0x0004FEA8 File Offset: 0x0004E0A8
|
|
static TaiwanLunisolarCalendar()
|
|
{
|
|
TaiwanLunisolarCalendar.era_handler.appendEra(1, CCFixed.FromDateTime(TaiwanLunisolarCalendar.TaiwanMin), CCFixed.FromDateTime(TaiwanLunisolarCalendar.TaiwanMax));
|
|
}
|
|
|
|
/// <summary>Gets the eras that are relevant to the current <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> object.</summary>
|
|
/// <returns>An array that consists of a single element having a value that is always the current era.</returns>
|
|
// Token: 0x170003AC RID: 940
|
|
// (get) Token: 0x060014CC RID: 5324 RVA: 0x0004FF10 File Offset: 0x0004E110
|
|
public override int[] Eras
|
|
{
|
|
get
|
|
{
|
|
return (int[])TaiwanLunisolarCalendar.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: 0x060014CD RID: 5325 RVA: 0x0004FF28 File Offset: 0x0004E128
|
|
public override int GetEra(DateTime time)
|
|
{
|
|
int num = CCFixed.FromDateTime(time);
|
|
int num2;
|
|
TaiwanLunisolarCalendar.era_handler.EraYear(out num2, num);
|
|
return num2;
|
|
}
|
|
|
|
/// <summary>Gets the minimum date and time supported by the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class.</summary>
|
|
/// <returns>The earliest date and time supported by the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class, which is equivalent to the first moment of February 18, 1912 C.E. in the Gregorian calendar.</returns>
|
|
// Token: 0x170003AD RID: 941
|
|
// (get) Token: 0x060014CE RID: 5326 RVA: 0x0004FF4C File Offset: 0x0004E14C
|
|
public override DateTime MinSupportedDateTime
|
|
{
|
|
get
|
|
{
|
|
return TaiwanLunisolarCalendar.TaiwanMin;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the maximum date and time supported by the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class.</summary>
|
|
/// <returns>The latest date and time supported by the <see cref="T:System.Globalization.TaiwanLunisolarCalendar" /> class, which is equivalent to the last moment of February 10, 2051 C.E. in the Gregorian calendar.</returns>
|
|
// Token: 0x170003AE RID: 942
|
|
// (get) Token: 0x060014CF RID: 5327 RVA: 0x0004FF54 File Offset: 0x0004E154
|
|
public override DateTime MaxSupportedDateTime
|
|
{
|
|
get
|
|
{
|
|
return TaiwanLunisolarCalendar.TaiwanMax;
|
|
}
|
|
}
|
|
|
|
// Token: 0x040005DD RID: 1501
|
|
private const int TaiwanEra = 1;
|
|
|
|
// Token: 0x040005DE RID: 1502
|
|
internal static readonly CCEastAsianLunisolarEraHandler era_handler = new CCEastAsianLunisolarEraHandler();
|
|
|
|
// Token: 0x040005DF RID: 1503
|
|
private static DateTime TaiwanMin = new DateTime(1912, 2, 18);
|
|
|
|
// Token: 0x040005E0 RID: 1504
|
|
private static DateTime TaiwanMax = new DateTime(2051, 2, 10, 23, 59, 59, 999);
|
|
}
|
|
}
|