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",这意味着"year 的迁移后,"迁移的 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、 第二次、 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.

在伊斯兰日历具有 12 个月 29 到 30 天内使用: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) 2929 2929
1111 ذو القعدة (Zulkadah)ذو القعدة (Zulkadah) 3030 3030
1212 ذو الحجة (闰年)ذو الحجة (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.

日期公元 2001 年 1 月 1 日The date January 1, 2001 A.D. 在公历日历是大致相当于中等 A.H.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类通过增加或减少值从 0 到 2 天以适应开始和结束斋月的方差和满足国家/地区之间的日期差异调整日历日期。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

获取或设置要在日历中添加或减去的天数,以适应斋月的开头和结尾的差异以及国家/地区间的日期差别。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 的浅表副本。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.

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

使用 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)

适用于

另请参阅