KoreanLunisolarCalendar 類別

定義

表示劃分的時間,例如月、日和年。Represents time in divisions, such as months, days, and years. 年份是使用西曆計算,而日期和月份則是使用陰陽曆計算。Years are calculated using the Gregorian calendar, while days and months are calculated using the lunisolar calendar.

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

備註

KoreanLunisolarCalendar 類別衍生自 EastAsianLunisolarCalendar 類別,這代表陰陽曆的行事曆。The KoreanLunisolarCalendar 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. 行事曆中的每個日光年度都會與一個甲子年、一個著天體的莖和一個地面分支相關聯,而這些行事曆在一年的任何月份之後可能會有閏月。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.

注意

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

KoreanLunisolarCalendar 類別會使用西曆來計算年份,以及使用 EastAsianLunisolarCalendar 類別來計算日和月數。The KoreanLunisolarCalendar class calculates years using the Gregorian calendar, and days and months using the EastAsianLunisolarCalendar class.

閏月可以在一年的任何月份之後發生。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個,而第九個月則會傳回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.

目前,CultureInfo 類別所支援的任何文化特性都不會使用 KoreanLunisolarCalendarCurrently, the KoreanLunisolarCalendar 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 Korean lunisolar calendar.

每個 CultureInfo 都支援一組行事曆。Each CultureInfo 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所使用的行事曆,應用程式應該將 CultureInfo.DateTimeFormatCalendar 屬性設定為新的 CalendarTo change the calendar used by a CultureInfo, the application should set the Calendar property of CultureInfo.DateTimeFormat to a new Calendar.

建構函式

KoreanLunisolarCalendar()

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

欄位

CurrentEra

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

(繼承來源 Calendar)
GregorianEra

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

屬性

AlgorithmType

取得值,指出目前的月曆是以陽曆為主、以陰曆為主,還是同時包含兩種曆法。Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of both.

(繼承來源 EastAsianLunisolarCalendar)
DaysInYearBeforeMinSupportedYear

取得 MinSupportedDateTime 屬性指定之年的前一年的天數。Gets the number of days in the year that precedes the year specified by the MinSupportedDateTime property.

Eras

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

IsReadOnly

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

(繼承來源 Calendar)
MaxSupportedDateTime

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

MinSupportedDateTime

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

TwoDigitYearMax

取得或設定以二位數年份表示時,該 100 年範圍的最後一年。Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.

(繼承來源 EastAsianLunisolarCalendar)

方法

AddDays(DateTime, Int32)

傳回與指定 DateTime 相差指定日數的 DateTimeReturns a DateTime that is the specified number of days away from the specified DateTime.

(繼承來源 Calendar)
AddHours(DateTime, Int32)

傳回與指定 DateTime 相差指定時數的 DateTimeReturns a DateTime that is the specified number of hours away from the specified DateTime.

(繼承來源 Calendar)
AddMilliseconds(DateTime, Double)

傳回與指定 DateTime 相差指定毫秒數的 DateTimeReturns a DateTime that is the specified number of milliseconds away from the specified DateTime.

(繼承來源 Calendar)
AddMinutes(DateTime, Int32)

傳回與指定 DateTime 相差指定分鐘數的 DateTimeReturns a DateTime that is the specified number of minutes away from the specified DateTime.

(繼承來源 Calendar)
AddMonths(DateTime, Int32)

計算與指定日期相差指定月數的日期。Calculates the date that is the specified number of months away from the specified date.

(繼承來源 EastAsianLunisolarCalendar)
AddSeconds(DateTime, Int32)

傳回與指定 DateTime 相差指定秒數的 DateTimeReturns a DateTime that is the specified number of seconds away from the specified DateTime.

(繼承來源 Calendar)
AddWeeks(DateTime, Int32)

傳回與指定 DateTime 相差指定週數的 DateTimeReturns a DateTime that is the specified number of weeks away from the specified DateTime.

(繼承來源 Calendar)
AddYears(DateTime, Int32)

計算與指定日期相差指定年份的日期。Calculates the date that is the specified number of years away from the specified date.

(繼承來源 EastAsianLunisolarCalendar)
Clone()

建立目前 Calendar 物件複本的新物件。Creates a new object that is a copy of the current Calendar object.

(繼承來源 Calendar)
Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetCelestialStem(Int32)

計算以六十年 (60 年) 為週期中指定年份的天干。Calculates the celestial stem of the specified year in the sexagenary (60-year) cycle.

(繼承來源 EastAsianLunisolarCalendar)
GetDayOfMonth(DateTime)

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

(繼承來源 EastAsianLunisolarCalendar)
GetDayOfWeek(DateTime)

計算指定日期中一週的日期。Calculates the day of the week in the specified date.

(繼承來源 EastAsianLunisolarCalendar)
GetDayOfYear(DateTime)

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

(繼承來源 EastAsianLunisolarCalendar)
GetDaysInMonth(Int32, Int32)

傳回目前紀元之指定月份和年份中的天數。Returns the number of days in the specified month and year of the current era.

(繼承來源 Calendar)
GetDaysInMonth(Int32, Int32, Int32)

計算指定年份和紀元的指定月份中的天數。Calculates the number of days in the specified month of the specified year and era.

(繼承來源 EastAsianLunisolarCalendar)
GetDaysInYear(Int32)

傳回目前紀元之指定年份中的天數。Returns the number of days in the specified year of the current era.

(繼承來源 Calendar)
GetDaysInYear(Int32, Int32)

計算指定年份和紀元中的天數。Calculates the number of days in the specified year and era.

(繼承來源 EastAsianLunisolarCalendar)
GetEra(DateTime)

擷取對應於指定的 DateTime 之紀元。Retrieves the era that corresponds to the specified DateTime.

GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetHour(DateTime)

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

(繼承來源 Calendar)
GetLeapMonth(Int32)

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

(繼承來源 Calendar)
GetLeapMonth(Int32, Int32)

計算指定年份和紀元的閏月。Calculates the leap month for the specified year and era.

(繼承來源 EastAsianLunisolarCalendar)
GetMilliseconds(DateTime)

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

(繼承來源 Calendar)
GetMinute(DateTime)

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

(繼承來源 Calendar)
GetMonth(DateTime)

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

(繼承來源 EastAsianLunisolarCalendar)
GetMonthsInYear(Int32)

傳回目前紀元的指定年份中的月數。Returns the number of months in the specified year in the current era.

(繼承來源 Calendar)
GetMonthsInYear(Int32, Int32)

計算指定年份和紀元中的月數。Calculates the number of months in the specified year and era.

(繼承來源 EastAsianLunisolarCalendar)
GetSecond(DateTime)

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

(繼承來源 Calendar)
GetSexagenaryYear(DateTime)

計算以六十年 (60 年) 為週期中對應至指定日期的年份。Calculates the year in the sexagenary (60-year) cycle that corresponds to the specified date.

(繼承來源 EastAsianLunisolarCalendar)
GetTerrestrialBranch(Int32)

計算以六十年 (60 年) 為週期中指定年份的地支。Calculates the terrestrial branch of the specified year in the sexagenary (60-year) cycle.

(繼承來源 EastAsianLunisolarCalendar)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

傳回年份中的週,其中包含指定之 DateTime 值中的日期。Returns the week of the year that includes the date in the specified DateTime value.

(繼承來源 Calendar)
GetYear(DateTime)

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

(繼承來源 EastAsianLunisolarCalendar)
IsLeapDay(Int32, Int32, Int32)

判斷目前紀元中指定日期是否為閏日。Determines whether the specified date in the current era is a leap day.

(繼承來源 Calendar)
IsLeapDay(Int32, Int32, Int32, Int32)

判斷指定紀元中指定的日期是否為閏日。Determines whether the specified date in the specified era is a leap day.

(繼承來源 EastAsianLunisolarCalendar)
IsLeapMonth(Int32, Int32)

判斷目前紀元的指定年份中指定的月份是否為閏月。Determines whether the specified month in the specified year in the current era is a leap month.

(繼承來源 Calendar)
IsLeapMonth(Int32, Int32, Int32)

判斷指定年份和紀元中的指定月份是否為閏月。Determines whether the specified month in the specified year and era is a leap month.

(繼承來源 EastAsianLunisolarCalendar)
IsLeapYear(Int32)

判斷目前紀元中指定的年份是否為閏年。Determines whether the specified year in the current era is a leap year.

(繼承來源 Calendar)
IsLeapYear(Int32, Int32)

判斷指定紀元中指定的年份是否為閏年。Determines whether the specified year in the specified era is a leap year.

(繼承來源 EastAsianLunisolarCalendar)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

傳回設定為目前紀元中指定日期和時間的 DateTimeReturns a DateTime that is set to the specified date and time in the current era.

(繼承來源 Calendar)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)

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

(繼承來源 EastAsianLunisolarCalendar)
ToFourDigitYear(Int32)

將指定的年份轉換成 4 位數年份。Converts the specified year to a four-digit year.

(繼承來源 EastAsianLunisolarCalendar)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於

另請參閱