Files
Dec2017-Script-Dump/mscorlib/System/Globalization/ChineseLunisolarCalendar.cs
T
2026-06-04 11:42:34 +02:00

93 lines
4.3 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace System.Globalization
{
/// <summary>Represents time in divisions, such as months, days, and years. Years are calculated using the Chinese calendar, while days and months are calculated using the lunisolar calendar.</summary>
// Token: 0x0200017A RID: 378
[Serializable]
public class ChineseLunisolarCalendar : EastAsianLunisolarCalendar
{
/// <summary>Initializes a new instance of the <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> class. </summary>
// Token: 0x0600123A RID: 4666 RVA: 0x00047E84 File Offset: 0x00046084
[MonoTODO]
public ChineseLunisolarCalendar()
: base(ChineseLunisolarCalendar.era_handler)
{
}
// Token: 0x0600123B RID: 4667 RVA: 0x00047E94 File Offset: 0x00046094
static ChineseLunisolarCalendar()
{
ChineseLunisolarCalendar.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.ChineseLunisolarCalendar" /> 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.ChineseLunisolarCalendar" /> object is always an array containing one element equal to the <see cref="F:System.Globalization.ChineseLunisolarCalendar.ChineseEra" /> value.</returns>
// Token: 0x17000309 RID: 777
// (get) Token: 0x0600123C RID: 4668 RVA: 0x00047EF4 File Offset: 0x000460F4
[ComVisible(false)]
public override int[] Eras
{
get
{
return (int[])ChineseLunisolarCalendar.era_handler.Eras.Clone();
}
}
/// <summary>Retrieves the era that corresponds to the specified <see cref="T:System.DateTime" /> type.</summary>
/// <returns>An integer that represents the era in the <paramref name="time" /> parameter.</returns>
/// <param name="time">The <see cref="T:System.DateTime" /> type to read. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="time" /> is less than <see cref="P:System.Globalization.ChineseLunisolarCalendar.MinSupportedDateTime" /> or greater than <see cref="P:System.Globalization.ChineseLunisolarCalendar.MaxSupportedDateTime" />.</exception>
// Token: 0x0600123D RID: 4669 RVA: 0x00047F0C File Offset: 0x0004610C
[ComVisible(false)]
public override int GetEra(DateTime time)
{
int num = CCFixed.FromDateTime(time);
int num2;
ChineseLunisolarCalendar.era_handler.EraYear(out num2, num);
return num2;
}
/// <summary>Gets the minimum date and time supported by the <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> class.</summary>
/// <returns>A <see cref="T:System.DateTime" /> type that represents February 19, 1901 in the Gregorian calendar, which is equivalent to the constructor, DateTime(1901, 2, 19).</returns>
// Token: 0x1700030A RID: 778
// (get) Token: 0x0600123E RID: 4670 RVA: 0x00047F30 File Offset: 0x00046130
[ComVisible(false)]
public override DateTime MinSupportedDateTime
{
get
{
return ChineseLunisolarCalendar.ChineseMin;
}
}
/// <summary>Gets the maximum date and time supported by the <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> class.</summary>
/// <returns>A <see cref="T:System.DateTime" /> type that represents the last moment on January 28, 2101 in the Gregorian calendar, which is approximately equal to the constructor DateTime(2101, 1, 28, 23, 59, 59, 999).</returns>
// Token: 0x1700030B RID: 779
// (get) Token: 0x0600123F RID: 4671 RVA: 0x00047F38 File Offset: 0x00046138
[ComVisible(false)]
public override DateTime MaxSupportedDateTime
{
get
{
return ChineseLunisolarCalendar.ChineseMax;
}
}
/// <summary>Specifies the era that corresponds to the current <see cref="T:System.Globalization.ChineseLunisolarCalendar" /> object.</summary>
// Token: 0x040004B6 RID: 1206
public const int ChineseEra = 1;
// Token: 0x040004B7 RID: 1207
internal static readonly CCEastAsianLunisolarEraHandler era_handler = new CCEastAsianLunisolarEraHandler();
// Token: 0x040004B8 RID: 1208
private static DateTime ChineseMin = new DateTime(1901, 2, 19);
// Token: 0x040004B9 RID: 1209
private static DateTime ChineseMax = new DateTime(2101, 1, 28, 23, 59, 59, 999);
}
}