mscorlib(4.0.0.0) API with additions
System.Globalization.HebrewCalendar Class Reference

Represents the Hebrew calendar. More...

Inheritance diagram for System.Globalization.HebrewCalendar:
[legend]
Collaboration diagram for System.Globalization.HebrewCalendar:
[legend]

Public Member Functions

override DateTime AddMonths (DateTime time, int months)
 Returns a T:System.DateTime that is the specified number of months away from the specified T:System.DateTime. More...
 
override DateTime AddYears (DateTime time, int years)
 Returns a T:System.DateTime that is the specified number of years away from the specified T:System.DateTime. More...
 
override int GetDayOfMonth (DateTime time)
 Returns the day of the month in the specified T:System.DateTime. More...
 
override DayOfWeek GetDayOfWeek (DateTime time)
 Returns the day of the week in the specified T:System.DateTime. More...
 
override int GetDayOfYear (DateTime time)
 Returns the day of the year in the specified T:System.DateTime. More...
 
override int GetDaysInMonth (int year, int month, int era)
 Returns the number of days in the specified month in the specified year in the specified era. More...
 
override int GetDaysInYear (int year, int era)
 Returns the number of days in the specified year in the specified era. More...
 
override int GetEra (DateTime time)
 Returns the era in the specified T:System.DateTime. More...
 
override int GetMonth (DateTime time)
 Returns the month in the specified T:System.DateTime. More...
 
override int GetMonthsInYear (int year, int era)
 Returns the number of months in the specified year in the specified era. More...
 
override int GetYear (DateTime time)
 Returns the year in the specified T:System.DateTime value. More...
 
override bool IsLeapDay (int year, int month, int day, int era)
 Determines whether the specified date in the specified era is a leap day. More...
 
override int GetLeapMonth (int year, int era)
 Calculates the leap month for a specified year and era. More...
 
override bool IsLeapMonth (int year, int month, int era)
 Determines whether the specified month in the specified year in the specified era is a leap month. More...
 
override bool IsLeapYear (int year, int era)
 Determines whether the specified year in the specified era is a leap year. More...
 
override DateTime ToDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
 Returns a T:System.DateTime that is set to the specified date and time in the specified era. More...
 
override int ToFourDigitYear (int year)
 Converts the specified year to a 4-digit year by using the P:System.Globalization.HebrewCalendar.TwoDigitYearMax property to determine the appropriate century. More...
 
- Public Member Functions inherited from System.Globalization.Calendar
virtual object Clone ()
 Creates a new object that is a copy of the current T:System.Globalization.Calendar object. More...
 
virtual DateTime AddMilliseconds (DateTime time, double milliseconds)
 Returns a T:System.DateTime that is the specified number of milliseconds away from the specified T:System.DateTime. More...
 
virtual DateTime AddDays (DateTime time, int days)
 Returns a T:System.DateTime that is the specified number of days away from the specified T:System.DateTime. More...
 
virtual DateTime AddHours (DateTime time, int hours)
 Returns a T:System.DateTime that is the specified number of hours away from the specified T:System.DateTime. More...
 
virtual DateTime AddMinutes (DateTime time, int minutes)
 Returns a T:System.DateTime that is the specified number of minutes away from the specified T:System.DateTime. More...
 
virtual DateTime AddSeconds (DateTime time, int seconds)
 Returns a T:System.DateTime that is the specified number of seconds away from the specified T:System.DateTime. More...
 
virtual DateTime AddWeeks (DateTime time, int weeks)
 Returns a T:System.DateTime that is the specified number of weeks away from the specified T:System.DateTime. More...
 
virtual int GetDaysInMonth (int year, int month)
 Returns the number of days in the specified month and year of the current era. More...
 
virtual int GetDaysInYear (int year)
 Returns the number of days in the specified year of the current era. More...
 
virtual int GetHour (DateTime time)
 Returns the hours value in the specified T:System.DateTime. More...
 
virtual double GetMilliseconds (DateTime time)
 Returns the milliseconds value in the specified T:System.DateTime. More...
 
virtual int GetMinute (DateTime time)
 Returns the minutes value in the specified T:System.DateTime. More...
 
virtual int GetMonthsInYear (int year)
 Returns the number of months in the specified year in the current era. More...
 
virtual int GetSecond (DateTime time)
 Returns the seconds value in the specified T:System.DateTime. More...
 
virtual int GetWeekOfYear (DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
 Returns the week of the year that includes the date in the specified T:System.DateTime value. More...
 
virtual bool IsLeapDay (int year, int month, int day)
 Determines whether the specified date in the current era is a leap day. More...
 
virtual bool IsLeapMonth (int year, int month)
 Determines whether the specified month in the specified year in the current era is a leap month. More...
 
virtual int GetLeapMonth (int year)
 Calculates the leap month for a specified year. More...
 
virtual bool IsLeapYear (int year)
 Determines whether the specified year in the current era is a leap year. More...
 
virtual DateTime ToDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond)
 Returns a T:System.DateTime that is set to the specified date and time in the current era. More...
 

Public Attributes

override DateTime MinSupportedDateTime => calendarMinValue
 Gets the earliest date and time supported by the T:System.Globalization.HebrewCalendar type. More...
 
override DateTime MaxSupportedDateTime => calendarMaxValue
 Gets the latest date and time supported by the T:System.Globalization.HebrewCalendar type. More...
 
override CalendarAlgorithmType AlgorithmType => CalendarAlgorithmType.LunisolarCalendar
 Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both. More...
 
override int [] Eras
 Gets the list of eras in the T:System.Globalization.HebrewCalendar. More...
 
- Public Attributes inherited from System.Globalization.Calendar
const int CurrentEra = 0
 Represents the current era of the current calendar. More...
 

Static Public Attributes

static readonly int HebrewEra = 1
 Represents the current era. This field is constant. More...
 

Properties

override int TwoDigitYearMax [get, set]
 Gets or sets the last year of a 100-year range that can be represented by a 2-digit year. More...
 
- Properties inherited from System.Globalization.Calendar
virtual DateTime MinSupportedDateTime [get]
 Gets the earliest date and time supported by this T:System.Globalization.Calendar object. More...
 
virtual DateTime MaxSupportedDateTime [get]
 Gets the latest date and time supported by this T:System.Globalization.Calendar object. More...
 
virtual CalendarAlgorithmType AlgorithmType [get]
 Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of both. More...
 
bool IsReadOnly [get]
 Gets a value indicating whether this T:System.Globalization.Calendar object is read-only. More...
 
abstract int [] Eras [get]
 When overridden in a derived class, gets the list of eras in the current calendar. More...
 
virtual int TwoDigitYearMax [get, set]
 Gets or sets the last year of a 100-year range that can be represented by a 2-digit year. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from System.Globalization.Calendar
static Calendar ReadOnly (Calendar calendar)
 Returns a read-only version of the specified T:System.Globalization.Calendar object. More...
 
- Protected Member Functions inherited from System.Globalization.Calendar
 Calendar ()
 Initializes a new instance of the T:System.Globalization.Calendar class. More...
 
- Protected Attributes inherited from System.Globalization.Calendar
virtual int DaysInYearBeforeMinSupportedYear => 365
 Gets the number of days in the year that precedes the year that is specified by the P:System.Globalization.Calendar.MinSupportedDateTime property. More...
 

Detailed Description

Represents the Hebrew calendar.

Definition at line 8 of file HebrewCalendar.cs.

Member Function Documentation

◆ AddMonths()

override DateTime System.Globalization.HebrewCalendar.AddMonths ( DateTime  time,
int  months 
)
virtual

Returns a T:System.DateTime that is the specified number of months away from the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to which to add months .
monthsThe number of months to add.
Returns
The T:System.DateTime that results from adding the specified number of months to the specified T:System.DateTime.
Exceptions
T:System.ArgumentExceptionThe resulting T:System.DateTime is outside the supported range.
T:System.ArgumentOutOfRangeExceptionmonths is less than -120,000 or greater than 120,000.

Implements System.Globalization.Calendar.

Definition at line 1680 of file HebrewCalendar.cs.

◆ AddYears()

override DateTime System.Globalization.HebrewCalendar.AddYears ( DateTime  time,
int  years 
)
virtual

Returns a T:System.DateTime that is the specified number of years away from the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to which to add years .
yearsThe number of years to add.
Returns
The T:System.DateTime that results from adding the specified number of years to the specified T:System.DateTime.
Exceptions
T:System.ArgumentExceptionThe resulting T:System.DateTime is outside the supported range.

Implements System.Globalization.Calendar.

Definition at line 1728 of file HebrewCalendar.cs.

◆ GetDayOfMonth()

override int System.Globalization.HebrewCalendar.GetDayOfMonth ( DateTime  time)
virtual

Returns the day of the month in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer from 1 to 30 that represents the day of the month in the specified T:System.DateTime.

Implements System.Globalization.Calendar.

Definition at line 1753 of file HebrewCalendar.cs.

◆ GetDayOfWeek()

override DayOfWeek System.Globalization.HebrewCalendar.GetDayOfWeek ( DateTime  time)
virtual

Returns the day of the week in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
A T:System.DayOfWeek value that represents the day of the week in the specified T:System.DateTime.

Implements System.Globalization.Calendar.

Definition at line 1761 of file HebrewCalendar.cs.

◆ GetDayOfYear()

override int System.Globalization.HebrewCalendar.GetDayOfYear ( DateTime  time)
virtual

Returns the day of the year in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer from 1 to 385 that represents the day of the year in the specified T:System.DateTime.
Exceptions
T:System.ArgumentOutOfRangeExceptiontime is earlier than September 17, 1583 in the Gregorian calendar, or greater than P:System.Globalization.HebrewCalendar.MaxSupportedDateTime.

Implements System.Globalization.Calendar.

Definition at line 1777 of file HebrewCalendar.cs.

◆ GetDaysInMonth()

override int System.Globalization.HebrewCalendar.GetDaysInMonth ( int  year,
int  month,
int  era 
)
virtual

Returns the number of days in the specified month in the specified year in the specified era.

Parameters
yearAn integer that represents the year.
monthAn integer from 1 to 13 that represents the month.
eraAn integer that represents the era. Specify either F:System.Globalization.HebrewCalendar.HebrewEra or Calendar.Eras[Calendar.CurrentEra].
Returns
The number of days in the specified month in the specified year in the specified era.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear , month , or era is outside the range supported by the current T:System.Globalization.HebrewCalendar object.

Implements System.Globalization.Calendar.

Definition at line 1791 of file HebrewCalendar.cs.

◆ GetDaysInYear()

override int System.Globalization.HebrewCalendar.GetDaysInYear ( int  year,
int  era 
)
virtual

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

Parameters
yearAn integer that represents the year.
eraAn integer that represents the era. Specify either F:System.Globalization.HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra].
Returns
The number of days in the specified year in the specified era.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear or era is outside the range supported by the current T:System.Globalization.HebrewCalendar object.

Implements System.Globalization.Calendar.

Definition at line 1810 of file HebrewCalendar.cs.

◆ GetEra()

override int System.Globalization.HebrewCalendar.GetEra ( DateTime  time)
virtual

Returns the era in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer that represents the era in the specified T:System.DateTime. The return value is always F:System.Globalization.HebrewCalendar.HebrewEra.

Implements System.Globalization.Calendar.

Definition at line 1824 of file HebrewCalendar.cs.

◆ GetLeapMonth()

override int System.Globalization.HebrewCalendar.GetLeapMonth ( int  year,
int  era 
)
virtual

Calculates the leap month for a specified year and era.

Parameters
yearA year.
eraAn era. Specify either F:System.Globalization.HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra].
Returns
A positive integer that indicates the leap month in the specified year and era. The return value is 7 if the year and era parameters specify a leap year, or 0 if the year is not a leap year.
Exceptions
T:System.ArgumentOutOfRangeExceptionera is not F:System.Globalization.HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra].-or- year is less than the Hebrew calendar year 5343 or greater than the Hebrew calendar year 5999.

Reimplemented from System.Globalization.Calendar.

Definition at line 1895 of file HebrewCalendar.cs.

◆ GetMonth()

override int System.Globalization.HebrewCalendar.GetMonth ( DateTime  time)
virtual

Returns the month in the specified T:System.DateTime.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer from 1 to 13 that represents the month in the specified T:System.DateTime.
Exceptions
T:System.ArgumentOutOfRangeExceptiontime is less than P:System.Globalization.HebrewCalendar.MinSupportedDateTime or greater than P:System.Globalization.HebrewCalendar.MaxSupportedDateTime.

Implements System.Globalization.Calendar.

Definition at line 1834 of file HebrewCalendar.cs.

◆ GetMonthsInYear()

override int System.Globalization.HebrewCalendar.GetMonthsInYear ( int  year,
int  era 
)
virtual

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

Parameters
yearAn integer that represents the year.
eraAn integer that represents the era. Specify either F:System.Globalization.HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra].
Returns
The number of months in the specified year in the specified era. The return value is either 12 in a common year, or 13 in a leap year.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear or era is outside the range supported by the current T:System.Globalization.HebrewCalendar object.

Implements System.Globalization.Calendar.

Definition at line 1845 of file HebrewCalendar.cs.

◆ GetYear()

override int System.Globalization.HebrewCalendar.GetYear ( DateTime  time)
virtual

Returns the year in the specified T:System.DateTime value.

Parameters
timeThe T:System.DateTime to read.
Returns
An integer that represents the year in the specified T:System.DateTime value.
Exceptions
T:System.ArgumentOutOfRangeExceptiontime is outside the range supported by the current T:System.Globalization.HebrewCalendar object.

Implements System.Globalization.Calendar.

Definition at line 1859 of file HebrewCalendar.cs.

◆ IsLeapDay()

override bool System.Globalization.HebrewCalendar.IsLeapDay ( int  year,
int  month,
int  day,
int  era 
)
virtual

Determines whether the specified date in the specified era is a leap day.

Parameters
yearAn integer that represents the year.
monthAn integer from 1 to 13 that represents the month.
dayAn integer from 1 to 30 that represents the day.
eraAn integer that represents the era. Specify either F:System.Globalization.HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra]..
Returns
true if the specified day is a leap day; otherwise, false.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear , month , day , or era is outside the range supported by this calendar.

Implements System.Globalization.Calendar.

Definition at line 1873 of file HebrewCalendar.cs.

◆ IsLeapMonth()

override bool System.Globalization.HebrewCalendar.IsLeapMonth ( int  year,
int  month,
int  era 
)
virtual

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

Parameters
yearAn integer that represents the year.
monthAn integer from 1 to 13 that represents the month.
eraAn integer that represents the era. Specify either F:System.Globalization.HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra].
Returns
true if the specified month is a leap month; otherwise, false.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear , month , or era is outside the range supported by this calendar.

Implements System.Globalization.Calendar.

Definition at line 1912 of file HebrewCalendar.cs.

◆ IsLeapYear()

override bool System.Globalization.HebrewCalendar.IsLeapYear ( int  year,
int  era 
)
virtual

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

Parameters
yearAn integer that represents the year.
eraAn integer that represents the era. Specify either F:System.Globalization.HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra].
Returns
true if the specified year is a leap year; otherwise, false.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear or era is outside the range supported by this calendar.

Implements System.Globalization.Calendar.

Definition at line 1930 of file HebrewCalendar.cs.

◆ ToDateTime()

override DateTime System.Globalization.HebrewCalendar.ToDateTime ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second,
int  millisecond,
int  era 
)
virtual

Returns a T:System.DateTime that is set to the specified date and time in the specified era.

Parameters
yearAn integer that represents the year.
monthAn integer from 1 to 13 that represents the month.
dayAn integer from 1 to 30 that represents the day.
hourAn integer from 0 to 23 that represents the hour.
minuteAn integer from 0 to 59 that represents the minute.
secondAn integer from 0 to 59 that represents the second.
millisecondAn integer from 0 to 999 that represents the millisecond.
eraAn integer that represents the era. Specify either F:System.Globalization.HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra].
Returns
The T:System.DateTime that is set to the specified date and time in the current era.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear , month , day or era is outside the range supported by the current T:System.Globalization.HebrewCalendar object.-or- hour is less than 0 or greater than 23.-or- minute is less than 0 or greater than 59.-or- second is less than 0 or greater than 59.-or- millisecond is less than 0 or greater than 999.

Implements System.Globalization.Calendar.

Definition at line 1995 of file HebrewCalendar.cs.

◆ ToFourDigitYear()

override int System.Globalization.HebrewCalendar.ToFourDigitYear ( int  year)
virtual

Converts the specified year to a 4-digit year by using the P:System.Globalization.HebrewCalendar.TwoDigitYearMax property to determine the appropriate century.

Parameters
yearA 2-digit year from 0 through 99, or a 4-digit Hebrew calendar year from 5343 through 5999.
Returns
If the year parameter is a 2-digit year, the return value is the corresponding 4-digit year. If the year parameter is a 4-digit year, the return value is the unchanged year parameter.
Exceptions
T:System.ArgumentOutOfRangeExceptionyear is less than 0.-or- year is less than P:System.Globalization.HebrewCalendar.MinSupportedDateTime or greater than P:System.Globalization.HebrewCalendar.MaxSupportedDateTime.

Reimplemented from System.Globalization.Calendar.

Definition at line 2011 of file HebrewCalendar.cs.

Member Data Documentation

◆ AlgorithmType

override CalendarAlgorithmType System.Globalization.HebrewCalendar.AlgorithmType => CalendarAlgorithmType.LunisolarCalendar

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

Returns
Always returns F:System.Globalization.CalendarAlgorithmType.LunisolarCalendar.

Definition at line 1496 of file HebrewCalendar.cs.

◆ Eras

override int [] System.Globalization.HebrewCalendar.Eras
Initial value:
=> new int[1]
{
}

Gets the list of eras in the T:System.Globalization.HebrewCalendar.

Returns
An array of integers that represents the eras in the T:System.Globalization.HebrewCalendar type. The return value is always an array containing one element equal to F:System.Globalization.HebrewCalendar.HebrewEra.

Definition at line 1502 of file HebrewCalendar.cs.

◆ HebrewEra

readonly int System.Globalization.HebrewCalendar.HebrewEra = 1
static

Represents the current era. This field is constant.

Definition at line 20 of file HebrewCalendar.cs.

◆ MaxSupportedDateTime

override DateTime System.Globalization.HebrewCalendar.MaxSupportedDateTime => calendarMaxValue

Gets the latest date and time supported by the T:System.Globalization.HebrewCalendar type.

Returns
The latest date and time supported by the T:System.Globalization.HebrewCalendar type, which is equivalent to the last moment of September, 29, 2239 C.E. in the Gregorian calendar.

Definition at line 1492 of file HebrewCalendar.cs.

◆ MinSupportedDateTime

override DateTime System.Globalization.HebrewCalendar.MinSupportedDateTime => calendarMinValue

Gets the earliest date and time supported by the T:System.Globalization.HebrewCalendar type.

Returns
The earliest date and time supported by the T:System.Globalization.HebrewCalendar type, which is equivalent to the first moment of January, 1, 1583 C.E. in the Gregorian calendar.

Definition at line 1488 of file HebrewCalendar.cs.

Property Documentation

◆ TwoDigitYearMax

override int System.Globalization.HebrewCalendar.TwoDigitYearMax
getset

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

Returns
The last year of a 100-year range that can be represented by a 2-digit year.
Exceptions
T:System.InvalidOperationExceptionThe current T:System.Globalization.HebrewCalendar object is read-only.
T:System.ArgumentOutOfRangeExceptionIn a set operation, the Hebrew calendar year value is less than 5343 but is not 99, or the year value is greater than 5999.

Definition at line 1512 of file HebrewCalendar.cs.


The documentation for this class was generated from the following file: