[Serializable] |
In every 19-year cycle that ends with a year that is evenly divisible by 19, the 3rd, 6th, 8th, 11th, 14th, 17th, and 19th years are leap years. A common year can have from 353 to 355 days, depending on the placement of Jewish holidays. A leap year can have from 383 to 385 days.
The Hebrew calendar has 12 months during common years and 13 months during leap years:
GetMonth value (common year) | GetMonth value (leap year) | Month | Days in common years | Days in leap years |
---|---|---|---|---|
1 | 1 | תשרי (Tishrei) | 30 | 30 |
2 | 2 | חשון (Cheshvan) | 29/30 | 29/30 |
3 | 3 | כסלו (Kislev) | 29/30 | 29/30 |
4 | 4 | טבת (Tevet) | 29 | 29 |
5 | 5 | שבט (Shevat) | 30 | 30 |
6 | - | אדר (Adar) | 29 | - |
- | 6 | אדר א (Adar Alef ) | - | 30 |
- | 7 | אדר ב (Adar Beit) | - | 29 |
7 | 8 | ניסן (Nissan) | 30 | 30 |
8 | 9 | אייר (Iyar) | 29 | 29 |
9 | 10 | סיון (Sivan) | 30 | 30 |
10 | 11 | תמוז (Tamuz) | 29 | 29 |
11 | 12 | אב (Av) | 30 | 30 |
12 | 13 | אלול (Elul) | 29 | 29 |
The days in Cheshvan and Kislev vary depending on the placement of Jewish holidays. During leap years, Adar is replaced by Adar Alef with 30 days and Adar Beit with 29 days. Adar Beit is considered the leap month. The last day of Adar Alef and all the days in Adar Beit are considered leap days.
The date January 1, 2001 A.D. in the Gregorian calendar is equivalent to the sixth day of Tevet in the year 5761 A.M. in the Hebrew calendar.
ctor #1 | Default constructor. This constructor is called by derived class constructors to initialize state in this type. Initializes a new instance of the HebrewCalendar class. |
HebrewEra | Represents the current era. This field is constant. |
Eras | Read-only Overridden: Gets the list of eras in the HebrewCalendar. |
TwoDigitYearMax | Read-write Overridden: Gets or sets the last year of a 100-year range that can be represented by a 2-digit year. |
AddDays (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.AddDays Returns a DateTime that is the specified number of days away from the specified DateTime. |
AddHours (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.AddHours Returns a DateTime that is the specified number of hours away from the specified DateTime. |
AddMilliseconds (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.AddMilliseconds Returns a DateTime that is the specified number of milliseconds away from the specified DateTime. |
AddMinutes (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.AddMinutes Returns a DateTime that is the specified number of minutes away from the specified DateTime. |
AddMonths | Overridden: Returns a DateTime that is the specified number of months away from the specified DateTime. |
AddSeconds (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.AddSeconds Returns a DateTime that is the specified number of seconds away from the specified DateTime. |
AddWeeks (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.AddWeeks Returns a DateTime that is the specified number of weeks away from the specified DateTime. |
AddYears | Overridden: Returns a DateTime that is the specified number of years away from the specified DateTime. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetDayOfMonth | Overridden: Returns the day of the month in the specified DateTime. |
GetDayOfWeek | Overridden: Returns the day of the week in the specified DateTime. |
GetDayOfYear | Overridden: Returns the day of the year in the specified DateTime. |
GetDaysInMonth (inherited from System.Globalization.Calendar) |
Overloaded:GetDaysInMonth(int year, int month) See base class member description: System.Globalization.Calendar.GetDaysInMonthReturns the number of days in the specified month in the specified year in the current era. |
GetDaysInMonth | Overloaded:GetDaysInMonth(int year, int month, int era) Overridden: Returns the number of days in the specified month in the specified year in the specified era. |
GetDaysInYear (inherited from System.Globalization.Calendar) |
Overloaded:GetDaysInYear(int year) See base class member description: System.Globalization.Calendar.GetDaysInYearReturns the number of days in the specified year in the current era. |
GetDaysInYear | Overloaded:GetDaysInYear(int year, int era) Overridden: Returns the number of days in the specified year in the specified era. |
GetEra | Overridden: Returns the era in the specified DateTime. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetHour (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.GetHour Returns the hours value in the specified DateTime. |
GetMilliseconds (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.GetMilliseconds Returns the milliseconds value in the specified DateTime. |
GetMinute (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.GetMinute Returns the minutes value in the specified DateTime. |
GetMonth | Overridden: Returns the month in the specified DateTime. |
GetMonthsInYear (inherited from System.Globalization.Calendar) |
Overloaded:GetMonthsInYear(int year) See base class member description: System.Globalization.Calendar.GetMonthsInYearReturns the number of months in the specified year in the current era. |
GetMonthsInYear | Overloaded:GetMonthsInYear(int year, int era) Overridden: Returns the number of months in the specified year in the specified era. |
GetSecond (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.GetSecond Returns the seconds value in the specified DateTime. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
GetWeekOfYear (inherited from System.Globalization.Calendar) |
See base class member description: System.Globalization.Calendar.GetWeekOfYear Returns the week of the year that includes the date in the specified DateTime. |
GetYear | Overridden: Returns the year in the specified DateTime. |
IsLeapDay (inherited from System.Globalization.Calendar) |
Overloaded:IsLeapDay(int year, int month, int day) See base class member description: System.Globalization.Calendar.IsLeapDayDetermines whether the specified date in the current era is a leap day. |
IsLeapDay | Overloaded:IsLeapDay(int year, int month, int day, int era) Overridden: Determines whether the specified date in the specified era is a leap day. |
IsLeapMonth (inherited from System.Globalization.Calendar) |
Overloaded:IsLeapMonth(int year, int month) See base class member description: System.Globalization.Calendar.IsLeapMonthDetermines whether the specified month in the specified year in the current era is a leap month. |
IsLeapMonth | Overloaded:IsLeapMonth(int year, int month, int era) Overridden: Determines whether the specified month in the specified year in the specified era is a leap month. |
IsLeapYear (inherited from System.Globalization.Calendar) |
Overloaded:IsLeapYear(int year) See base class member description: System.Globalization.Calendar.IsLeapYearDetermines whether the specified year in the current era is a leap year. |
IsLeapYear | Overloaded:IsLeapYear(int year, int era) Overridden: Determines whether the specified year in the specified era is a leap year. |
ToDateTime (inherited from System.Globalization.Calendar) |
Overloaded:ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond) See base class member description: System.Globalization.Calendar.ToDateTimeReturns a DateTime that is set to the specified date and time in the current era. |
ToDateTime | Overloaded:ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) Overridden: Returns a DateTime that is set to the specified date and time in the specified era. |
ToFourDigitYear | Overridden: Converts the specified two-digit year to a four-digit year by using the HebrewCalendar.TwoDigitYearMax property to determine the appropriate century. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public HebrewCalendar(); |
public static readonly int HebrewEra;
|
public override int[] Eras {get;}
|
public override int TwoDigitYearMax {get; set;}
|
This property allows a 2-digit year to be properly translated to a 4-digit year. For example, if this property is set to 5729, the 100-year range is from 5630 to 5729; therefore, a 2-digit value of 30 is interpreted as 5630, while a 2-digit value of 29 is interpreted as 5729.
The initial value of this property is derived from the settings in Regional and Language Options (or Regional Options or Regional Settings) in Control Panel in Windows. However, that information can change during the life of the AppDomain. The HebrewCalendar class does not detect changes in the system settings automatically.
time
days
Exception Type | Condition |
---|---|
ArgumentException | The resulting DateTime is outside the supported range. |
time
hours
Exception Type | Condition |
---|---|
ArgumentException | The resulting DateTime is outside the supported range. |
time
milliseconds
Exception Type | Condition |
---|---|
ArgumentException | The resulting DateTime is outside the supported range. |
time
minutes
Exception Type | Condition |
---|---|
ArgumentException | The resulting DateTime is outside the supported range. |
time
months
Exception Type | Condition |
---|---|
ArgumentException | The resulting DateTime is outside the supported range. |
ArgumentOutOfRangeException | months is less than -120000. -or- months is greater than 120000. |
The year part of the resulting DateTime is affected if the resulting month is beyond the last month of the current year. The day part of the resulting DateTime is also 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 time-of-day part of the resulting DateTime remains the same as the specified DateTime.
For example, if the specified month is Av, which has 30 days, the specified day is the 30th day of that month, and the value of the months parameter is 5, the resulting year is one more than the specified year, the resulting month is Tevet, and the resulting day is the 29th day, which is the last day in Tevet.
If the value of the months parameter is negative, the resulting DateTime is earlier than the specified DateTime.
time
seconds
Exception Type | Condition |
---|---|
ArgumentException | The resulting DateTime is outside the supported range. |
time
weeks
Exception Type | Condition |
---|---|
ArgumentException | The resulting DateTime is outside the supported range. |
In all .NET Framework classes derived from the Calendar class, a week is defined as seven days, except the first and last weeks of the year which might have less than seven days.
time
years
Exception Type | Condition |
---|---|
ArgumentException | The resulting DateTime is outside the supported range. |
The month part of the resulting DateTime is affected if the resulting month is not a valid month in the resulting year; it is changed to the last valid month in the resulting year. For example, if the month in the time parameter is the 13th month of a leap year and the value of years is 1, the month in the resulting DateTime is the 12th month of the following year, which is a non-leap year.
Note that although the month part of DateTime does not change, it might still refer to a different month. For example, Adar Beit is the 7th month in leap years, but Nissan is the 7th month in common years.
The day part of the resulting DateTime is also 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. For example, Cheshvan can have 29 or 30 days, depending on the placement of Jewish holidays. Suppose that Cheshvan has 30 days in the current year and 29 in the following year. If the specified date is the 30th day of Cheshvan in the current year and the value of years is 1, the resulting date will be the 29th day of Cheshvan in the following year.
The time-of-day part of the resulting DateTime remains the same as the specified DateTime.
If years is negative, the resulting DateTime is earlier than the specified DateTime.
~HebrewCalendar(); |
time
time
DayOfWeek value | which indicates |
---|---|
Sunday | יום ראשון (Yom Rishon) |
Monday | יום שני (Yom Sheni) |
Tuesday | יום שלישי (Yom Shlishi) |
Wednesday | יום רביעי (Yom Reviee) |
Thursday | יום חמישי (Yom Chamishi) |
Friday | יום שישי (Yom Shishi) |
Saturday | שבת (Shabat) |
time
year
month
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- month is outside the range supported by the calendar. |
year
month
era
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- month is outside the range supported by the calendar. -or- era is outside the range supported by the calendar. |
This implementation of the HebrewCalendar class recognizes only the Hebrew years 5343 to 6000 (1582 to 2240 in the Gregorian calendar).
year
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. |
year
era
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- era is outside the range supported by the calendar. |
This implementation of the HebrewCalendar class recognizes only the Hebrew years 5343 to 6000 (1582 to 2240 in the Gregorian calendar).
time
public virtual int GetHashCode(); |
time
time
time
time
year
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. |
year
era
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- era is outside the range supported by the calendar. |
This implementation of the HebrewCalendar class recognizes only the Hebrew years 5343 to 6000 (1582 to 2240 in the Gregorian calendar).
time
public Type GetType(); |
public virtual int GetWeekOfYear( |
time
rule
firstDayOfWeek
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | firstDayOfWeek is outside the range supported by the calendar. -or- rule is not a valid CalendarWeekRule value. |
DateTimeFormatInfo.CalendarWeekRule of CultureInfo.DateTimeFormat contains the default CalendarWeekRule value that defines a calendar week for a specific culture.
This method can also be used to determine the number of weeks in the year by setting time to the last day of the year.
time
year
month
day
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- month is outside the range supported by the calendar. -or- day is outside the range supported by the calendar. |
A leap day is a day that occurs only in a leap year. For example, in the Gregorian calendar, the 29th day of February is the only leap day.
year
month
day
era
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- month is outside the range supported by the calendar. -or- day is outside the range supported by the calendar. -or- era is outside the range supported by the calendar. |
In every 19-year cycle that ends with a year that is evenly divisible by 19, the 3rd, 6th, 8th, 11th, 14th, 17th, and 19th years are leap years. A common year can have from 353 to 355 days, depending on the placement of Jewish holidays. A leap year can have from 383 to 385 days.
A leap day is a day that occurs only in a leap year. In the Hebrew calendar, the last day of Adar Alef and all the days in Adar Beit are considered leap days.
year
month
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- month is outside the range supported by the calendar. |
A leap month is an entire month that occurs only in a leap year. For example, in the Hebrew calendar, Veadar is the only leap month.
year
month
era
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- month is outside the range supported by the calendar. -or- era is outside the range supported by the calendar. |
In every 19-year cycle that ends with a year that is evenly divisible by 19, the 3rd, 6th, 8th, 11th, 14th, 17th, and 19th years are leap years. A common year can have from 353 to 355 days, depending on the placement of Jewish holidays. A leap year can have from 383 to 385 days.
A leap month is an entire month that occurs only in a leap year. In the Hebrew calendar, Adar Beit is the only leap month.
year
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. |
year
era
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- era is outside the range supported by the calendar. |
In every 19-year cycle that ends with a year that is evenly divisible by 19, the 3rd, 6th, 8th, 11th, 14th, 17th, and 19th years are leap years. A common year can have from 353 to 355 days, depending on the placement of Jewish holidays. A leap year can have from 383 to 385 days.
protected object MemberwiseClone(); |
public virtual DateTime ToDateTime( |
year
month
day
hour
minute
second
millisecond
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- month is outside the range supported by the calendar. -or- day is outside the range supported by the calendar. -or- hour is less than zero or greater than 23. -or- minute is less than zero or greater than 59. -or- second is less than zero or greater than 59. -or- millisecond is less than zero or greater than 999. |
public override DateTime ToDateTime( |
year
month
day
hour
minute
second
millisecond
era
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. -or- month is outside the range supported by the calendar. -or- day is outside the range supported by the calendar. -or- hour is less than zero or greater than 23. -or- minute is less than zero or greater than 59. -or- second is less than zero or greater than 59. -or- millisecond is less than zero or greater than 999. -or- era is outside the range supported by the calendar. |
year
Exception Type | Condition |
---|---|
ArgumentException | year is outside the range supported by the calendar. |
HebrewCalendar.TwoDigitYearMax is the last year in the 100-year range that can be represented by a two-digit year. The century is determined by finding the sole occurrence of the two-digit year within that 100-year range. For example, if HebrewCalendar.TwoDigitYearMax is set to 5729, the 100-year range is from 5630 to 5729; therefore, a 2-digit value of 30 is interpreted as 5630, while a 2-digit value of 29 is interpreted as 5729.
public virtual string ToString(); |