HijriCalendar HijriCalendar HijriCalendar HijriCalendar Class

定義

表示回曆。Represents the Hijri calendar.

public ref class HijriCalendar : System::Globalization::Calendar
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class HijriCalendar : System.Globalization.Calendar
type HijriCalendar = class
    inherit Calendar
Public Class HijriCalendar
Inherits Calendar
繼承
HijriCalendarHijriCalendarHijriCalendarHijriCalendar
屬性

備註

回曆會辨識一個紀元:紀元The Hijri calendar recognizes one era: A.H. (拉丁文"Anno Hegirae 」,這表示 「 年的移轉,」 參考移轉的 Muhammad (PBUH) 從一)。(Latin "Anno Hegirae", which means "the year of the migration," in reference to the migration of Muhammad (PBUH) from Mecca).

注意

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

在 結尾的年份,可由 30、 第 2、 5 日、 7、 10 日、 13、 16、 18、 21、 24 每 30 年循環,26 和 29 年來都是閏年。In every 30-year cycle that ends with a year that is evenly divisible by 30, the 2nd, 5th, 7th, 10th, 13th, 16th, 18th, 21st, 24th, 26th, and 29th years are leap years. 一般年份有 354 天,閏年有 355 天。A common year has 354 days and a leap year has 355 days.

回曆有 29 到 30 天每個 12 個月:The Hijri calendar has 12 months with 29 to 30 days each:

GetMonth 值GetMonth value 月份Month 一般年份中的天數Days in common years 閏年的天數Days in leap years
11 محرم (Muharram)محرم (Muharram) 3030 3030
22 صفر (Safar)صفر (Safar) 2929 2929
33 ربيع الاول (Rabi 我)‏ربيع الاول (Rabi I) 3030 3030
44 ‏ربيع الثاني (Rabi II)‏ربيع الثاني (Rabi II) 2929 2929
55 جمادى الاولى (Jumada 我)جمادى الاولى (Jumada I) 3030 3030
66 جمادى الثانية (Jumada II)جمادى الثانية (Jumada II) 2929 2929
77 رجب (Rajab)رجب (Rajab) 3030 3030
88 شعبان (Shaban)شعبان (Shaban) 2929 2929
99 رمضان (開幕)رمضان (Ramadan) 3030 3030
1010 شوال shawwal (月)شوال (Shawwal) 2929 2929
1111 ذو القعدة (Zulkadah)ذو القعدة (Zulkadah) 3030 3030
1212 ذو الحجة (Zulhijjah)ذو الحجة (Zulhijjah) 2929 3030

開幕,齋戒在法令來的世界裡,月正式開始和結束根據根據協議判決新月觀察為基礎。Ramadan, the month of fasting in the Muslim world, officially starts and ends according to a decree that is based on the observation of the new moon. 因此,Shaban 中的日數和天數開幕而有所不同。Therefore, the number of days in Shaban and the number of days in Ramadan vary.

日期年 1 月 1,2001 A.D.The date January 1, 2001 A.D. 西曆中大約會等於 shawwal 月 1421 年紀元中的第六個天in the Gregorian calendar is roughly equivalent to the sixth day of Shawwal in the year 1421 A.H. 在 回曆。in the Hijri calendar.

這個實作HijriCalendar類別調整行事曆日期加上或減去的值從零到兩天,以容納在開頭和結尾開幕變異並適應國家/地區之間的日期差距。This implementation of the HijriCalendar class adjusts the calendar date by adding or subtracting a value from zero to two days to accommodate the variances in the start and the end of Ramadan and to accommodate the date difference between countries/regions. 值會儲存在HijriAdjustment屬性。That value is stored in the HijriAdjustment property. 如果HijriAdjustment未明確地從 [控制台] 的 [地區及語言選項] 部分中的設定中衍生其值,並儲存在登錄值 HKEY_CURRENT_USER\Control Panel\International\AddHijriDate 設定。If HijriAdjustment is not set explicitly, it derives its value from the settings in the regional and language options portion of Control Panel and is stored in the registry value HKEY_CURRENT_USER\Control Panel\International\AddHijriDate. 不過,這項資訊可以變更的存留期間AppDomainHowever, that information can change during the life of the AppDomain. HijriCalendar類別不會偵測系統設定 中的變更會自動。The HijriCalendar class does not detect changes in the system settings automatically.

每個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,設定應用程式應該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.

建構函式

HijriCalendar() HijriCalendar() HijriCalendar() HijriCalendar()

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

欄位

CurrentEra CurrentEra CurrentEra CurrentEra

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

(Inherited from Calendar)
HijriEra HijriEra HijriEra HijriEra

代表目前的紀元。Represents the current era. 這個欄位是常數。This field is constant.

屬性

AlgorithmType AlgorithmType AlgorithmType AlgorithmType

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

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

取得 HijriCalendar 中的紀元清單。Gets the list of eras in the HijriCalendar.

HijriAdjustment HijriAdjustment HijriAdjustment HijriAdjustment

取得或設定要在曆法中加減的日數,因應 Ramadan 始末之間的變動和各國家/區域之間的日期差距。Gets or sets the number of days to add or subtract from the calendar to accommodate the variances in the start and the end of Ramadan and to accommodate the date difference between countries/regions.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

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

(Inherited from Calendar)
MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime

取得受此曆法所支援的最晚日期和時間。Gets the latest date and time supported by this calendar.

MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime

取得受此曆法所支援的最早日期和時間。Gets the earliest date and time supported by this calendar.

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.

方法

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)

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

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)

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

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)
GetDayOfMonth(DateTime) GetDayOfMonth(DateTime) GetDayOfMonth(DateTime) GetDayOfMonth(DateTime)

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

GetDayOfWeek(DateTime) GetDayOfWeek(DateTime) GetDayOfWeek(DateTime) GetDayOfWeek(DateTime)

傳回指定 DateTime 中的星期。Returns the day of the week in the specified DateTime.

GetDayOfYear(DateTime) GetDayOfYear(DateTime) GetDayOfYear(DateTime) GetDayOfYear(DateTime)

傳回指定之 DateTime 中一年中的日期。Returns the day of the year in the specified DateTime.

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)

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

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)

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

GetEra(DateTime) GetEra(DateTime) GetEra(DateTime) GetEra(DateTime)

傳回指定 DateTime 中的紀元。Returns the era in 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 a specified year and era.

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)

傳回指定 DateTime 中的月份。Returns the month in the specified DateTime.

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)

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

GetSecond(DateTime) GetSecond(DateTime) GetSecond(DateTime) GetSecond(DateTime)

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

(Inherited from Calendar)
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)

傳回指定 DateTime 中的年份。Returns the year in the specified DateTime.

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 is a leap day.

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.

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.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。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.

ToFourDigitYear(Int32) ToFourDigitYear(Int32) ToFourDigitYear(Int32) ToFourDigitYear(Int32)

將指定的年份轉換為 4 位數年份,方法是使用 TwoDigitYearMax 屬性以判斷適當的世紀。Converts the specified year to a four-digit year by using the TwoDigitYearMax property to determine the appropriate century.

ToString() ToString() ToString() ToString()

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

(Inherited from Object)

適用於

另請參閱