TaiwanCalendar 类

定义

表示中国台湾日历。

public ref class TaiwanCalendar : System::Globalization::Calendar
public class TaiwanCalendar : System.Globalization.Calendar
[System.Serializable]
public class TaiwanCalendar : System.Globalization.Calendar
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class TaiwanCalendar : System.Globalization.Calendar
type TaiwanCalendar = class
    inherit Calendar
[<System.Serializable>]
type TaiwanCalendar = class
    inherit Calendar
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type TaiwanCalendar = class
    inherit Calendar
Public Class TaiwanCalendar
Inherits Calendar
继承
TaiwanCalendar
属性

注解

台湾日历的工作方式与公历完全相同,但年份和时代不同。 类 TaiwanCalendar 仅识别当前时代。

备注

有关在.NET Framework中使用TaiwanCalendar类和其他日历类的信息,请参阅“使用日历”。

台湾日历中的跃年对应于公历中的同一跃年。 公历中的一个跃年被定义为公历的公历年,该年被四个公历均匀地除以 100。 然而,被400分位的公历年是飞跃年。 普通年份有 365 天,跃年有 366 天。

台湾日历有12个月,每个月有28至31天:

GetMonth 值 Month 常见年份中的天数 飞跃年份中的天数
1 1 月 (1 月) 31 31
2 2 月 (2 月) 28 29
3 3 月 (3 月) 31 31
4 4 月 (4 月) 30 30
5 5 月 (5 月) 31 31
6 6 月 (6 月) 30 30
7 7 月 (7 月) 31 31
8 8月 (8月) 31 31
9 9 月 (9 月) 30 30
10 10 月 (10 月) 31 31
11 11 月 (11 月) 30 30
12 12 月 (12 月) 31 31

2 月在跳跃年份有 29 天,在普通年份有 28 天。

2001 年 1 月 1 日 C.E. 在公历中,相当于台湾日历中当前时代90年1月的第一天。

每个 CultureInfo 日历都支持一组日历。 该 Calendar 属性返回区域性的默认日历,该 OptionalCalendars 属性返回包含区域性支持的所有日历的数组。 若要更改 a CultureInfo使用的日历,应用程序应将属性CultureInfo.DateTimeFormat设置为CalendarCalendar日历。

调用方说明

构造函数

TaiwanCalendar()

初始化 TaiwanCalendar 类的新实例。

字段

CurrentEra

表示当前日历的当前纪元。 字段的值为 0。

(继承自 Calendar)

属性

AlgorithmType

获取一个值,该值指示当前日历是阳历、阴历还是二者的组合。

AlgorithmType

获取一个值,该值指示当前日历是阳历、阴历还是二者的组合。

(继承自 Calendar)
DaysInYearBeforeMinSupportedYear

获取 MinSupportedDateTime 属性指定的年份之前的年中天数。

(继承自 Calendar)
Eras

获取 TaiwanCalendar 中的纪元列表。

IsReadOnly

获取一个值,该值指示此 Calendar 对象是否为只读。

(继承自 Calendar)
MaxSupportedDateTime

获取 TaiwanCalendar 类支持的最晚日期和时间。

MaxSupportedDateTime

获取此 Calendar 对象支持的最晚日期和时间。

(继承自 Calendar)
MinSupportedDateTime

获取 TaiwanCalendar 类支持的最早日期和时间。

MinSupportedDateTime

获取此 Calendar 对象支持的最早日期和时间。

(继承自 Calendar)
TwoDigitYearMax

获取或设置可以用两位数年份表示的 100 年范围内的最后一年。

方法

AddDays(DateTime, Int32)

返回与指定 DateTime 相距指定天数的 DateTime

(继承自 Calendar)
AddHours(DateTime, Int32)

返回与指定 DateTime 相距指定小时数的 DateTime

(继承自 Calendar)
AddMilliseconds(DateTime, Double)

返回与指定 DateTime 相距指定毫秒数的 DateTime

(继承自 Calendar)
AddMinutes(DateTime, Int32)

返回与指定 DateTime 相距指定分钟数的 DateTime

(继承自 Calendar)
AddMonths(DateTime, Int32)

返回与指定 DateTime 相距指定月数的 DateTime

AddSeconds(DateTime, Int32)

返回与指定 DateTime 相距指定秒数的 DateTime

(继承自 Calendar)
AddWeeks(DateTime, Int32)

返回与指定 DateTime 相距指定周数的 DateTime

(继承自 Calendar)
AddYears(DateTime, Int32)

返回与指定 DateTime 相距指定年数的 DateTime

Clone()

创建表示当前 Calendar 对象副本的新对象。

(继承自 Calendar)
Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetDayOfMonth(DateTime)

返回指定 DateTime 中的月中日期。

GetDayOfWeek(DateTime)

返回指定 DateTime 中的周中日期。

GetDayOfYear(DateTime)

返回指定 DateTime 中的日期是该年中的第几天。

GetDaysInMonth(Int32, Int32)

返回当前纪元的指定月份和年份中的天数。

(继承自 Calendar)
GetDaysInMonth(Int32, Int32, Int32)

返回指定纪元中指定年份的指定月份中的天数。

GetDaysInYear(Int32)

返回当前纪元中指定年份的天数。

(继承自 Calendar)
GetDaysInYear(Int32, Int32)

返回指定纪元中指定年份的天数。

GetEra(DateTime)

返回指定 DateTime 中的纪元。

GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetHour(DateTime)

返回指定 DateTime 中的小时值。

(继承自 Calendar)
GetLeapMonth(Int32)

计算指定年份的闰月。

(继承自 Calendar)
GetLeapMonth(Int32, Int32)

计算指定纪元年份的闰月。

GetLeapMonth(Int32, Int32)

计算指定纪元年份的闰月。

(继承自 Calendar)
GetMilliseconds(DateTime)

返回指定 DateTime 中的毫秒值。

(继承自 Calendar)
GetMinute(DateTime)

返回指定 DateTime 中的分钟值。

(继承自 Calendar)
GetMonth(DateTime)

返回指定 DateTime 中的月份。

GetMonthsInYear(Int32)

返回当前纪元中指定年份的月数。

(继承自 Calendar)
GetMonthsInYear(Int32, Int32)

返回指定纪元中指定年份的月数。

GetSecond(DateTime)

返回指定 DateTime 中的秒值。

(继承自 Calendar)
GetType()

获取当前实例的 Type

(继承自 Object)
GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

返回一年中包含指定 DateTime 值中的日期的那个星期。

GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

返回一年中包含指定 DateTime 值中的日期的那个星期。

(继承自 Calendar)
GetYear(DateTime)

返回指定 DateTime 中的年份。

IsLeapDay(Int32, Int32, Int32)

确定当前纪元中的指定日期是否为闰日。

(继承自 Calendar)
IsLeapDay(Int32, Int32, Int32, Int32)

确定指定纪元中的指定日期是否为闰日。

IsLeapMonth(Int32, Int32)

确定当前纪元中指定年份的指定月份是否为闰月。

(继承自 Calendar)
IsLeapMonth(Int32, Int32, Int32)

确定指定纪元中指定年份的指定月份是否为闰月。

IsLeapYear(Int32)

确定当前纪元中的指定年份是否为闰年。

(继承自 Calendar)
IsLeapYear(Int32, Int32)

确定指定纪元中的指定年份是否为闰年。

MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

返回设置为当前纪元中指定日期和时间的 DateTime

(继承自 Calendar)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)

返回设置为指定纪元中指定日期和时间的 DateTime

ToFourDigitYear(Int32)

使用 TwoDigitYearMax 属性将指定的年份转换为四位数年份,以确定相应的纪元。

ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅