mscorlib 2.0.0.0 2.0.0.0 4.0.0.0 System.Globalization.Calendar

The class is nearly identical to the class, except the Um Al Qura calendar uses a table-based algorithm licensed from the Saudi government to calculate dates, can express dates to the year 1500 A.H., and does not support the property.

For information about using the class and the other calendar classes in the .NET Framework, see Working with Calendars.

For the class, each month has either 29 or 30 days, but usually in no discernible order. Whereas the documentation for the Hijri Calendar gives a table that shows the corresponding days in each month, no such general table can be produced for the Um Al Qura calendar.

For more information about the Hijri calendar, see the class.

Note The class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date).

Represents the Saudi Hijri (Um Al Qura) calendar.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Method
  2.0.0.0
  4.0.0.0
  System.DateTime `` ``

  The day part of the resulting is affected if the resulting day is not a valid day in the resulting month of the resulting year. It is changed to the last valid day in the resulting month of the resulting year. The year part of the resulting is affected if the resulting month is outside the year of the specified . This implementation supports only the current era. Therefore, an exception is thrown if the resulting year is outside the era of the specified . The time-of-day part of the resulting remains the same as the specified .

  For example, if the specified month is Zulkadah, which has 30 days, the specified day is the 30th day of that month, and the value of the parameter is 3, the resulting year is one more than the specified year, the resulting month is Safar, and the resulting day is the 29th day, which is the last day in Safar.

  If the value of the parameter is negative, the resulting is earlier than the specified .

  The property of the returned value always equals . You can preserve the property of the parameter by calling the method, as the following example shows.

  code reference: System.Globalization.Calendar.AddMethods#5

  Calculates a date that is a specified number of months away from a specified initial date.

  The date yielded by adding the number of months specified by the parameter to the date specified by the parameter.

  The date to which to add months. The class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date). The positive or negative number of months to add.
- Method
  2.0.0.0
  4.0.0.0
  System.DateTime `` ``

  The day part of the resulting is affected if the resulting day is not a valid day in the resulting month of the resulting year. It is changed to the last valid day in the resulting month of the resulting year. The month part of the resulting remains the same as the specified . This implementation supports only the current era. Therefore, an exception is thrown if the resulting year is outside the era of the specified . The time-of-day part of the resulting remains the same as the specified .

  For example, Zulhijjah has 29 days, except during leap years when it has 30 days. If the specified date is the 30th day of Zulhijjah in a leap year and the value of the parameter is 1, the resulting date is the 29th day of Zulhijjah in the following year.

  If is negative, the resulting is earlier than the specified .

  The property of the returned value always equals . You can preserve the property of the parameter by calling the method, as the following example shows.

  code reference: System.Globalization.Calendar.AddMethods#8

  Calculates a date that is a specified number of years away from a specified initial date.

  The date yielded by adding the number of years specified by the parameter to the date specified by the parameter.

  The date to which to add years. The class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date). The positive or negative number of years to add.
- Property
  2.0.0.0
  4.0.0.0
  System.Globalization.CalendarAlgorithmType To be added. To be added.

  Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of both.

- Property
  4.0.0.0
  System.Int32 To be added.

  This property returns a constant value of 384.

  Gets the number of days in the year that precedes the year that is specified by the property.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32[] To be added.

  The Hijri calendar recognizes one era: A.H. (Latin "Anno Hegirae", which means "the year of the migration," in reference to the migration of Muhammad (PBUH) from Mecca). This property always returns an array with only one element.

  Gets a list of the eras that are supported by the current .

- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added.

  Calculates the day of the month on which a specified date occurs.

  An integer from 1 through 30 that represents the day of the month specified by the parameter.

  The date value to read. The class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date).
- Method
  2.0.0.0
  4.0.0.0
  System.DayOfWeek ``

  The values are as follows:

  DayOfWeek value

  which indicates

  Sunday

  الاحد (Al-Ahad)

  Monday

  الاثنين (Al-Ithnayn)

  Tuesday

  الثلاثاء (At-Thulaathaa')

  Wednesday

  الاربعاء (Al-Arbi'aa')

  Thursday

  الخميس (Al-Khamiis)

  Friday

  الجمعة (Al-Jumu'ah)

  Saturday

  السبت (As-Sabt)

  Calculates the day of the week on which a specified date occurs.

  A value that represents the day of the week specified by the parameter.

  The date value to read. The class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date).
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  The day of the year is defined as the number of days from the first day of the year. For example, the method returns 1 for the first day of the first month of the year, and the total number of days in the year for the last day of the last month.

  Calculates the day of the year on which a specified date occurs.

  An integer from 1 through 355 that represents the day of the year specified by the parameter.

  The date value to read. The class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date).
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` ``

  This method returns a different number of days in a specified month for a common year versus a leap year. For example, this method returns 29 or 30 for Zulhijjah ( = 12), depending on whether is a leap year.

  Calculates the number of days in the specified month of the specified year and era.

  The number of days in the specified month in the specified year and era. The return value is 29 in a common year and 30 in a leap year.

  A year. An integer from 1 through 12 that represents a month. An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or .
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` To be added.

  Calculates the number of days in the specified year of the specified era.

  The number of days in the specified year and era. The number of days is 354 in a common year or 355 in a leap year.

  A year. An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or .
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  The Um Al Qura calendar recognizes one era: A.H. (Latin "Anno Hegirae", which means "the year of the migration," in reference to the migration of Muhammad (PBUH) from Mecca).

  Calculates the era in which a specified date occurs.

  Always returns the value.

  The date value to read.
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` ``

  In a calendar that supports the notion of a leap month, the leap month can occur either after a particular month or after any month in a year. For example, the method returns a number between 1 and 13 that indicates the month associated with a specified date. If there is a leap month between the eighth and ninth months of the year, the method returns 8 for the eighth month, 9 for the leap eighth month, and 10 for the ninth month.

  Calculates the leap month for a specified year and era.

  Always 0 because the class does not support leap months.

  A year. An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or .
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added.

  Calculates the month in which a specified date occurs.

  An integer from 1 through 12 that represents the month in the date specified by the parameter.

  The date value to read. The class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date).
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` To be added.

  Calculates the number of months in the specified year of the specified era.

  Always 12.

  A year. An era. Specify UmAlQuaraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or .
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added.

  Calculates the year of a date represented by a specified .

  An integer that represents the year specified by the parameter.

  The date value to read. The class supports only dates from 04/30/1900 00.00.00 (Gregorian date) through 11/16/2077 23:59:59 (Gregorian date).
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` `` ``

  A leap day is a day that occurs only in a leap year.

  Determines whether the specified date is a leap day.

  true if the specified day is a leap day; otherwise, false. The return value is always false because the class does not support leap days.

  A year. An integer from 1 through 12 that represents a month. An integer from 1 through 30 that represents a day. An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or .
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` ``

  A leap month is an entire month that occurs only in a leap year.

  Determines whether the specified month in the specified year and era is a leap month.

  Always false because the class does not support leap months.

  A year. An integer from 1 through 12 that represents a month. An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or .
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean `` ``

  A common year has 354 days and a leap year has 355 days.

  Determines whether the specified year in the specified era is a leap year.

  true if the specified year is a leap year; otherwise, false.

  A year. An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or .
- Property
  2.0.0.0
  4.0.0.0
  System.DateTime To be added.

  Starting with the net_v45, the value of the property is 11/16/2077. In previous versions of the .NET Framework, its value is the last moment of May 13, 2029 C.E. in the Gregorian calendar.

  Gets the latest date and time supported by this calendar.

- Property
  2.0.0.0
  4.0.0.0
  System.DateTime To be added. To be added.

  Gets the earliest date and time supported by this calendar.

- Method
  2.0.0.0
  4.0.0.0
  System.DateTime `` `` `` `` `` `` `` ``

  The method is useful because it can convert any date in the current calendar to a Gregorian calendar date. The Gregorian date can subsequently be used, for example, to compare dates in different calendars or create an equivalent date in a particular calendar.

  Returns a that is set to the specified date, time, and era.

  The that is set to the specified date and time in the current era.

  A year. An integer from 1 through 12 that represents a month. An integer from 1 through 29 that represents a day. An integer from 0 through 23 that represents an hour. An integer from 0 through 59 that represents a minute. An integer from 0 through 59 that represents a second. An integer from 0 through 999 that represents a millisecond. An era. Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or .
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  The method uses the parameter, the property, and a year to calculate a 4-digit year. The century is determined by finding the sole occurrence of the 2-digit parameter within that 100-year range. For example, if is set to 1429, the 100-year range is from 1330 through 1429. Therefore, a 2-digit value of 30 is interpreted as 1330, while a 2-digit value of 29 is interpreted as 1429.

  If the property is the special value 99, the method ignores the settings in the regional and language options in Control Panel and returns the parameter unchanged.

  supports either a two-digit year or a four-digit year. Passing a two-digit year value (less than 100) causes the method to convert the value to a four-digit value according to the value representing the appropriate century. If the application supplies a four-digit year value that is within the supported calendar range to , the method returns the actual input value. If the application supplies a four-digit value that is outside the supported calendar range, or if it supplies a negative value, the method throws an exception.

  Converts the specified year to a four-digit year by using the property to determine the appropriate century.

  If the parameter is a 2-digit year, the return value is the corresponding 4-digit year. If the parameter is a 4-digit year, the return value is the unchanged parameter.

  A 2-digit year from 0 through 99, or a 4-digit Um Al Qura calendar year from 1318 through 1450.
- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  This property allows a 2-digit year to be properly translated to a 4-digit year. For example, if this property is set to 1429, the 100-year range is from 1330 through 1429. Therefore, a 2-digit value of 30 is interpreted as 1330, while a 2-digit value of 29 is interpreted as 1429.

  The initial value of this property is derived from the settings in the regional and language options portion of Control Panel. However, that information can change during the life of the . The class does not detect changes in the system settings automatically.

  The special value 99 causes the method to ignore the system settings and return the specified year unchanged.

  Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.

- Field
  2.0.0.0
  4.0.0.0
  System.Int32 1

  The value of the field is 1.

  The Um Al Qura calendar recognizes one era: A.H. (Latin "Anno Hegirae", which means "the year of the migration," in reference to the migration of Muhammad (PBUH) from Mecca).

  Represents the current era. This field is constant.