ChineseLunisolarCalendar ChineseLunisolarCalendar ChineseLunisolarCalendar ChineseLunisolarCalendar Class

定義

表示劃分的時間,例如月、日和年。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.

public ref class ChineseLunisolarCalendar : System::Globalization::EastAsianLunisolarCalendar
[System.Serializable]
public class ChineseLunisolarCalendar : System.Globalization.EastAsianLunisolarCalendar
type ChineseLunisolarCalendar = class
    inherit EastAsianLunisolarCalendar
Public Class ChineseLunisolarCalendar
Inherits EastAsianLunisolarCalendar
繼承
屬性

備註

ChineseLunisolarCalendar類別衍生自EastAsianLunisolarCalendar類別,其代表陰陽曆。The ChineseLunisolarCalendar class is derived from the EastAsianLunisolarCalendar class, which represents the lunisolar calendar. EastAsianLunisolarCalendar類別支援以六十年的年度週期 (其會重複每隔 60 年) 除了太陽能年及農曆月。The EastAsianLunisolarCalendar class supports the sexagenary year cycle (which repeats every 60 years) in addition to solar years and lunar months. 在行事曆中 solar 逐年是以六十年為年、 天干糔礜惎纕分支相關聯,這些行事曆,只能有任何一年的月之後的閏月。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. ChineseLunisolarCalendar類別就會計算年根據太陽來計算,和幾個月和農曆計算為基礎的天數。The ChineseLunisolarCalendar class calculates years based on solar calculations, and months and days based on lunar calculations.

注意

如需有關使用資訊ChineseLunisolarCalendar類別和其他的行事曆 .NET Framework 中的類別,請參閱 < 使用行事曆For information about using the ChineseLunisolarCalendar class and the other calendar classes in the .NET Framework, see Working with Calendars.

一年中的任何每月之後,就可能發生的閏月。A leap month can occur after any month in a year. 比方說,GetMonth方法傳回的數字,介於 1 到 13,表示指定的日期與相關聯的月份。For example, the GetMonth method returns a number between 1 and 13 that indicates the month associated with a specified date. 如果年份的第八個和第九個月之間沒有閏月GetMonth方法會傳回 8,第八個月內,如呈獻第八個月的 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.

目前,ChineseLunisolarCalendar不會使用任何支援的文化特性CultureInfo類別。Currently, the ChineseLunisolarCalendar 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 Chinese lunisolar calendar.

每個CultureInfo物件支援一組的行事曆。Each CultureInfo object supports a set of calendars. Calendar屬性傳回的文化特性的預設月曆,OptionalCalendars屬性會傳回陣列,包含所有支援的文化特性的行事曆。The 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到新CalendarTo change the calendar used by a CultureInfo, the application should set the Calendar property of CultureInfo.DateTimeFormat to a new Calendar.

建構函式

ChineseLunisolarCalendar() ChineseLunisolarCalendar() ChineseLunisolarCalendar() ChineseLunisolarCalendar()

初始化 ChineseLunisolarCalendar 類別的新執行個體。Initializes a new instance of the ChineseLunisolarCalendar class.

欄位

ChineseEra ChineseEra ChineseEra ChineseEra

指定對應到目前 ChineseLunisolarCalendar 物件的紀元。Specifies the era that corresponds to the current ChineseLunisolarCalendar object.

CurrentEra CurrentEra CurrentEra CurrentEra

表示目前曆法的目前紀元。Represents the current era of the current calendar. 此欄位的值為 0。The value of this field is 0.

(Inherited from Calendar)

屬性

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 that is specified by the MinSupportedDateTime property.

Eras Eras Eras Eras

取得對應至目前 ChineseLunisolarCalendar 物件所支援之日期與時間範圍的紀元。Gets the eras that correspond to the range of dates and times supported by the current ChineseLunisolarCalendar object.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,指出 Calendar 物件是否為唯讀。Gets a value indicating whether this Calendar object is read-only.

(Inherited from Calendar)
MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime

取得受 ChineseLunisolarCalendar 類別所支援的日期和時間的最大值。Gets the maximum date and time supported by the ChineseLunisolarCalendar class.

MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime

取得受 ChineseLunisolarCalendar 類別所支援的日期和時間的最小值。Gets the minimum date and time supported by the ChineseLunisolarCalendar 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 type.

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)

傳回 DateTime 物件,其設定為指定日期、時間和紀元。Returns a DateTime that is set to the specified date, time, and era.

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

將指定的年份轉換成 4 位數年份。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)

適用於

另請參閱