HijriCalendar 類別

定義

代表回曆。

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

備註

Hijri 行事歷可辨識一個紀元:A.H. (拉丁文 “Anno Hegirae”,這表示「移轉年份」,參考從 Mecca) 移轉 Muhammad (PBUH) 。

注意

如需在 .NET Framework 中使用 HijriCalendar 類別和其他行事曆類別的相關信息,請參閱使用行事曆

每 30 年週期的結尾是平均除以 30 的年份,第 2nd、5th、7th、10th、13th、16th、18th、21st、24th、26th 和 29 年都是閏年。 一般年份有 354 天,而閏年有 355 天。

Hijri 行事曆有 12 個月,每個月 29 到 30 天:

GetMonth 值 Month 常見年份的天數 閏年天數
1 محرم (Muharram) 30 30
2 صفر (Safar) 29 29
3 ربيع الاول (Rabi I) 30 30
4 ربيع الثاني (Rabi II) 29 29
5 جمادى الاولى (Jumada I) 30 30
6 جمادى الثانية (Jumada II) 29 29
7 رجب (Rajab) 30 30
8 شعبان (Shaban) 29 29
9 رمضان () ) 30 30
10 شوال () 29 29
11 ذو القعدة (Zulkadah) 30 30
12 ذو الحجة (Zulhijjah) 29 30

根據新月的觀測基礎,正式開始和結束於新月的快取世界月。它正式開始和結束。 因此,Shaban 中的天數,以及[管理] 中的天數會有所不同。

公曆中的日期 2001 年 1 月 1 日 A.D 大致相當於 1421 A.H 年 Ceptwal 的第六天。

這個 類別的實作 HijriCalendar 會藉由將值從零加減至兩天來調整行事曆日期,以容納一開始和結束的一些差異,以及容納國家/地區之間的日期差異。 該值會儲存在屬性中 HijriAdjustment 。 如果未HijriAdjustment明確設定,它會從 控制台 地區和語言選項部分的設定衍生其值,並儲存在登錄值 HKEY_CURRENT_USER\Control Panel\International\AddHijriDate 中。 不過,該資訊在的 AppDomain存留期間可能會變更。 類別 HijriCalendar 不會自動偵測系統設定中的變更。

每個都 CultureInfo 支援一組行事曆。 屬性 Calendar 會傳回文化特性的預設行事曆,而 OptionalCalendars 屬性會傳回陣列,其中包含文化特性支援的所有行事曆。 若要變更 所使用的 CultureInfo行事曆,應用程式應該將 CalendarCultureInfo.DateTimeFormat 屬性設定為新的 Calendar

建構函式

HijriCalendar()

初始化 HijriCalendar 類別的新執行個體。

欄位

CurrentEra

表示目前曆法的目前紀元。 此欄位的值為 0。

(繼承來源 Calendar)
HijriEra

代表目前的紀元。 這個欄位為常數。

屬性

AlgorithmType

取得值,指出目前的月曆是以陽曆為主、以陰曆為主,還是同時包含兩種曆法。

AlgorithmType

取得值,指出目前的月曆是以陽曆為主、以陰曆為主,還是同時包含兩種曆法。

(繼承來源 Calendar)
DaysInYearBeforeMinSupportedYear

取得 MinSupportedDateTime 屬性指定之年的前一年的天數。

DaysInYearBeforeMinSupportedYear

取得 MinSupportedDateTime 屬性指定之年的前一年的天數。

(繼承來源 Calendar)
Eras

取得 HijriCalendar 中的紀元清單。

HijriAdjustment

取得或設定要在曆法中加減的日數,因應 Ramadan 始末之間的變動和各國家/區域之間的日期差距。

IsReadOnly

取得值,指出 Calendar 物件是否為唯讀。

(繼承來源 Calendar)
MaxSupportedDateTime

取得受此曆法所支援的最晚日期和時間。

MaxSupportedDateTime

取得受 Calendar 物件所支援的最晚日期和時間。

(繼承來源 Calendar)
MinSupportedDateTime

取得此曆法所支援的最早日期和時間。

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 值中的日期。

(繼承來源 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)

將指定的年份轉換為 4 位數年份,方法是使用 TwoDigitYearMax 屬性以判斷適當的世紀。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱