TaiwanLunisolarCalendar TaiwanLunisolarCalendar TaiwanLunisolarCalendar TaiwanLunisolarCalendar Class

定义

表示台湾日历。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.

public ref class TaiwanLunisolarCalendar : System::Globalization::EastAsianLunisolarCalendar
[System.Serializable]
public class TaiwanLunisolarCalendar : System.Globalization.EastAsianLunisolarCalendar
type TaiwanLunisolarCalendar = class
    inherit EastAsianLunisolarCalendar
Public Class TaiwanLunisolarCalendar
Inherits EastAsianLunisolarCalendar
继承
属性

注解

台湾阴阳历的工作方式与公历完全相同, 不同之处在于年和纪元不同。The Taiwan lunisolar calendar works exactly like the Gregorian calendar, except that the year and era are different. 类使用公历按公历、日期和月份EastAsianLunisolarCalendar计算年份, 并仅识别当前纪元。 TaiwanLunisolarCalendarThe TaiwanLunisolarCalendar class calculates years using the Gregorian calendar, days and months using the EastAsianLunisolarCalendar class, and recognizes only the current era.

备注

有关使用 .NET Framework 中的TaiwanLunisolarCalendar类和其他 calendar 类的信息, 请参阅使用日历For information about using the TaiwanLunisolarCalendar class and the other calendar classes in the .NET Framework, see Working with Calendars.

TaiwanLunisolarCalendar类派生EastAsianLunisolarCalendar自类, 该类表示阴阳历。The TaiwanLunisolarCalendar class is derived from the EastAsianLunisolarCalendar class, which represents the lunisolar calendar. 除了阳历年和农历月以外,类还支持甲子年循环(每隔60年重复一次)。EastAsianLunisolarCalendarThe EastAsianLunisolarCalendar class supports the sexagenary year cycle (which repeats every 60 years) in addition to solar years and lunar months. 日历中的每个阳历年都与甲子年、天体茎和陆地分支相关联, 并且这些日历在一年中的任何月份之后都可以有闰个月。Each solar year in the calendar is associated with a Sexagenary Year, a Celestial Stem, and a Terrestrial Branch, and these calendars can have leap months after any month of the year.

闰年可以在一年中的任意月份之后发生。A leap month can occur after any month in a year. 例如, EastAsianLunisolarCalendar.GetMonth(DateTime)方法返回1到13之间的一个数字, 用于指示与指定日期关联的月份。For example, the EastAsianLunisolarCalendar.GetMonth(DateTime) method returns a number between 1 and 13 that indicates the month associated with a specified date. 如果一年的第八个月和第九个月之间有一个闰月GetMonth , 则该方法将为第八个月返回 8, 为第八个月返回 9, 在第9个月返回10个月。If there is a leap month between the eighth and ninth months of the year, the GetMonth method returns 8 for the eighth month, 9 for the leap eighth month, and 10 for the ninth month.

目前, TaiwanLunisolarCalendar CultureInfo类所支持的任何区域性都不使用。Currently, the TaiwanLunisolarCalendar is not used by any of the cultures supported by the CultureInfo class. 因此, 此类只能用于计算台湾阴阳历中的日期。Therefore, this class can be used only to calculate dates in the Taiwan lunisolar calendar.

CultureInfo个对象都支持一组日历。Each CultureInfo object supports a set of calendars. 属性返回区域性的默认日历, OptionalCalendars属性返回一个数组, 该数组包含该区域性支持的所有日历。 CalendarThe Calendar property returns the default calendar for the culture, and the OptionalCalendars property returns an array containing all the calendars supported by the culture. CultureInfo若要更改使用的日历, 应用程序应Calendar将的属性CultureInfo.DateTimeFormat设置为新Calendar的。To change the calendar used by a CultureInfo, the application should set the Calendar property of CultureInfo.DateTimeFormat to a new Calendar.

构造函数

TaiwanLunisolarCalendar() TaiwanLunisolarCalendar() TaiwanLunisolarCalendar() TaiwanLunisolarCalendar()

初始化 TaiwanLunisolarCalendar 类的新实例。Initializes a new instance of the TaiwanLunisolarCalendar class.

属性

AlgorithmType AlgorithmType AlgorithmType AlgorithmType

获取一个值,该值指示当前日历是阳历、阴历还是二者的组合。Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of both.

(Inherited from EastAsianLunisolarCalendar)
DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear

获取 MinSupportedDateTime 属性指定的年份之前的年中天数。Gets the number of days in the year that precedes the year specified by the MinSupportedDateTime property.

Eras Eras Eras Eras

获取与当前 TaiwanLunisolarCalendar 对象相关的纪元。Gets the eras that are relevant to the current TaiwanLunisolarCalendar object.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

获取一个值,该值指示此 Calendar 对象是否为只读。Gets a value indicating whether this Calendar object is read-only.

(Inherited from Calendar)
MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime

获取 TaiwanLunisolarCalendar 类支持的最晚日期和时间。Gets the maximum date and time supported by the TaiwanLunisolarCalendar class.

MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime

获取 TaiwanLunisolarCalendar 类支持的最早日期和时间。Gets the minimum date and time supported by the TaiwanLunisolarCalendar class.

TwoDigitYearMax TwoDigitYearMax TwoDigitYearMax TwoDigitYearMax

获取或设置可以用两位数年份表示的 100 年范围内的最后一年。Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.

(Inherited from EastAsianLunisolarCalendar)

方法

AddDays(DateTime, Int32) AddDays(DateTime, Int32) AddDays(DateTime, Int32) AddDays(DateTime, Int32)

返回与指定 DateTime 相距指定天数的 DateTimeReturns a DateTime that is the specified number of days away from the specified DateTime.

(Inherited from Calendar)
AddHours(DateTime, Int32) AddHours(DateTime, Int32) AddHours(DateTime, Int32) AddHours(DateTime, Int32)

返回与指定 DateTime 相距指定小时数的 DateTimeReturns a DateTime that is the specified number of hours away from the specified DateTime.

(Inherited from Calendar)
AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double)

返回与指定 DateTime 相距指定毫秒数的 DateTimeReturns a DateTime that is the specified number of milliseconds away from the specified DateTime.

(Inherited from Calendar)
AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32)

返回与指定 DateTime 相距指定分钟数的 DateTimeReturns a DateTime that is the specified number of minutes away from the specified DateTime.

(Inherited from Calendar)
AddMonths(DateTime, Int32) AddMonths(DateTime, Int32) AddMonths(DateTime, Int32) AddMonths(DateTime, Int32)

计算与指定日期相距指定月数的日期。Calculates the date that is the specified number of months away from the specified date.

(Inherited from EastAsianLunisolarCalendar)
AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32)

返回与指定 DateTime 相距指定秒数的 DateTimeReturns a DateTime that is the specified number of seconds away from the specified DateTime.

(Inherited from Calendar)
AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32)

返回与指定 DateTime 相距指定周数的 DateTimeReturns a DateTime that is the specified number of weeks away from the specified DateTime.

(Inherited from Calendar)
AddYears(DateTime, Int32) AddYears(DateTime, Int32) AddYears(DateTime, Int32) AddYears(DateTime, Int32)

计算与指定日期相距指定年数的日期。Calculates the date that is the specified number of years away from the specified date.

(Inherited from EastAsianLunisolarCalendar)
Clone() Clone() Clone() Clone()

创建表示当前 Calendar 对象副本的新对象。Creates a new object that is a copy of the current Calendar object.

(Inherited from Calendar)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetCelestialStem(Int32) GetCelestialStem(Int32) GetCelestialStem(Int32) GetCelestialStem(Int32)

计算甲子(60 年)循环中指定年份的天干。Calculates the celestial stem of the specified year in the sexagenary (60-year) cycle.

(Inherited from EastAsianLunisolarCalendar)
GetDayOfMonth(DateTime) GetDayOfMonth(DateTime) GetDayOfMonth(DateTime) GetDayOfMonth(DateTime)

计算指定日期中的月中日期。Calculates the day of the month in the specified date.

(Inherited from EastAsianLunisolarCalendar)
GetDayOfWeek(DateTime) GetDayOfWeek(DateTime) GetDayOfWeek(DateTime) GetDayOfWeek(DateTime)

计算指定日期中的周中日期。Calculates the day of the week in the specified date.

(Inherited from EastAsianLunisolarCalendar)
GetDayOfYear(DateTime) GetDayOfYear(DateTime) GetDayOfYear(DateTime) GetDayOfYear(DateTime)

计算指定日期中的年中日期。Calculates the day of the year in the specified date.

(Inherited from EastAsianLunisolarCalendar)
GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32)

返回当前纪元的指定月份和年份中的天数。Returns the number of days in the specified month and year of the current era.

(Inherited from Calendar)
GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32)

计算指定纪元年份的指定月份中的天数。Calculates the number of days in the specified month of the specified year and era.

(Inherited from EastAsianLunisolarCalendar)
GetDaysInYear(Int32) GetDaysInYear(Int32) GetDaysInYear(Int32) GetDaysInYear(Int32)

返回当前纪元中指定年份的天数。Returns the number of days in the specified year of the current era.

(Inherited from Calendar)
GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32)

计算指定纪元年份中的天数。Calculates the number of days in the specified year and era.

(Inherited from EastAsianLunisolarCalendar)
GetEra(DateTime) GetEra(DateTime) GetEra(DateTime) GetEra(DateTime)

检索对应于指定 DateTime 的纪元。Retrieves the era that corresponds to the specified DateTime.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetHour(DateTime) GetHour(DateTime) GetHour(DateTime) GetHour(DateTime)

返回指定 DateTime 中的小时值。Returns the hours value in the specified DateTime.

(Inherited from Calendar)
GetLeapMonth(Int32) GetLeapMonth(Int32) GetLeapMonth(Int32) GetLeapMonth(Int32)

计算指定年份的闰月。Calculates the leap month for a specified year.

(Inherited from Calendar)
GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32)

计算指定纪元年份的闰月。Calculates the leap month for the specified year and era.

(Inherited from EastAsianLunisolarCalendar)
GetMilliseconds(DateTime) GetMilliseconds(DateTime) GetMilliseconds(DateTime) GetMilliseconds(DateTime)

返回指定 DateTime 中的毫秒值。Returns the milliseconds value in the specified DateTime.

(Inherited from Calendar)
GetMinute(DateTime) GetMinute(DateTime) GetMinute(DateTime) GetMinute(DateTime)

返回指定 DateTime 中的分钟值。Returns the minutes value in the specified DateTime.

(Inherited from Calendar)
GetMonth(DateTime) GetMonth(DateTime) GetMonth(DateTime) GetMonth(DateTime)

返回指定日期中的月份。Returns the month in the specified date.

(Inherited from EastAsianLunisolarCalendar)
GetMonthsInYear(Int32) GetMonthsInYear(Int32) GetMonthsInYear(Int32) GetMonthsInYear(Int32)

返回当前纪元中指定年份的月数。Returns the number of months in the specified year in the current era.

(Inherited from Calendar)
GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32)

计算指定纪元年份中的月数。Calculates the number of months in the specified year and era.

(Inherited from EastAsianLunisolarCalendar)
GetSecond(DateTime) GetSecond(DateTime) GetSecond(DateTime) GetSecond(DateTime)

返回指定 DateTime 中的秒值。Returns the seconds value in the specified DateTime.

(Inherited from Calendar)
GetSexagenaryYear(DateTime) GetSexagenaryYear(DateTime) GetSexagenaryYear(DateTime) GetSexagenaryYear(DateTime)

计算与指定日期对应的甲子(60 年)循环中的年份。Calculates the year in the sexagenary (60-year) cycle that corresponds to the specified date.

(Inherited from EastAsianLunisolarCalendar)
GetTerrestrialBranch(Int32) GetTerrestrialBranch(Int32) GetTerrestrialBranch(Int32) GetTerrestrialBranch(Int32)

计算甲子(60 年)循环中指定年份的地支。Calculates the terrestrial branch of the specified year in the sexagenary (60-year) cycle.

(Inherited from EastAsianLunisolarCalendar)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

返回一年中包含指定 DateTime 值中的日期的那个星期。Returns the week of the year that includes the date in the specified DateTime value.

(Inherited from Calendar)
GetYear(DateTime) GetYear(DateTime) GetYear(DateTime) GetYear(DateTime)

返回指定日期中的年份。Returns the year in the specified date.

(Inherited from EastAsianLunisolarCalendar)
IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32)

确定当前纪元中的指定日期是否为闰日。Determines whether the specified date in the current era is a leap day.

(Inherited from Calendar)
IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32)

确定指定纪元中的指定日期是否为闰日。Determines whether the specified date in the specified era is a leap day.

(Inherited from EastAsianLunisolarCalendar)
IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32)

确定当前纪元中指定年份的指定月份是否为闰月。Determines whether the specified month in the specified year in the current era is a leap month.

(Inherited from Calendar)
IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32)

确定指定纪元年份中的指定月份是否为闰月。Determines whether the specified month in the specified year and era is a leap month.

(Inherited from EastAsianLunisolarCalendar)
IsLeapYear(Int32) IsLeapYear(Int32) IsLeapYear(Int32) IsLeapYear(Int32)

确定当前纪元中的指定年份是否为闰年。Determines whether the specified year in the current era is a leap year.

(Inherited from Calendar)
IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32)

确定指定纪元中的指定年份是否为闰年。Determines whether the specified year in the specified era is a leap year.

(Inherited from EastAsianLunisolarCalendar)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

返回设置为当前纪元中指定日期和时间的 DateTimeReturns a DateTime that is set to the specified date and time in the current era.

(Inherited from Calendar)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)

返回设置为指定的日期、时间和纪元的 DateTimeReturns a DateTime that is set to the specified date, time, and era.

(Inherited from EastAsianLunisolarCalendar)
ToFourDigitYear(Int32) ToFourDigitYear(Int32) ToFourDigitYear(Int32) ToFourDigitYear(Int32)

将指定的年份转换为四位数的年份。Converts the specified year to a four-digit year.

(Inherited from EastAsianLunisolarCalendar)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

字段

CurrentEra CurrentEra CurrentEra CurrentEra

表示当前日历的当前纪元。Represents the current era of the current calendar. 字段的值为 0。The value of this field is 0.

(Inherited from Calendar)

适用于

另请参阅