Class HebrewDate
Extends
IDate.
Construct a new civil Hebrew date object. The constructor can be called
with a params object that can contain the following properties:
- julianday - the Julian Day to set into this date
- year - any integer except 0. Years go from -1 (BCE) to 1 (CE), skipping the zero year
- month - 1 to 12, where 1 means Nisan, 2 means Iyyar, etc.
- day - 1 to 30
- hour - 0 to 23. A formatter is used to display 12 hour clocks, but this representation is always done with an unambiguous 24 hour representation
- parts - 0 to 1079. Specify the halaqim parts of an hour. Either specify the parts or specify the minutes, seconds, and milliseconds, but not both.
- minute - 0 to 59
- second - 0 to 59
- millisecond - 0 to 999
- locale - the TimeZone instance or time zone name as a string of this julian date. The date/time is kept in the local time. The time zone is used later if this date is formatted according to a different time zone and the difference has to be calculated, or when the date format has a time zone component in it.
- timezone - the time zone of this instance. If the time zone is not given, it can be inferred from this locale. For locales that span multiple time zones, the one with the largest population is chosen as the one that represents the locale.
- date - use the given intrinsic Javascript date to initialize this one.
If the constructor is called with no arguments at all or if none of the properties listed above from julianday through millisecond are present, then the date components are filled in with the current date at the time of instantiation. Note that if you do not give the time zone when defaulting to the current time and the time zone for all of ilib was not set with ilib.setTimeZone(), then the time zone will default to UTC ("Universal Time, Coordinated" or "Greenwich Mean Time").
Defined in: ilib-full-dyn.js.
Constructor Attributes | Constructor Name and Description |
---|---|
HebrewDate(params)
|
Field Attributes | Field Name and Description |
---|---|
The day of the month.
|
|
The day of the year.
|
|
The hour of the day.
|
|
The millisecond of the second.
|
|
The minute of the hours.
|
|
The month number, ranging from 1 to 13.
|
|
The parts (halaqim) of the hour.
|
|
The second of the minute.
|
|
Year in the Hebrew calendar.
|
Method Attributes | Method Name and Description |
---|---|
firstSunday(year)
Return the rd number of the first Sunday of the given ISO year.
|
|
Return the name of the calendar that governs this date.
|
|
Return the day of the week of this date.
|
|
Return the ordinal day of the year.
|
|
getEra()
Return the era for this date as a number.
|
|
Get the Halaqim (parts) of an hour.
|
|
getWeekOfMonth(locale)
Return the ordinal number of the week within the month.
|
- Parameters:
- {Object=} params
- parameters that govern the settings and behaviour of this Hebrew date
- Parameters:
- year
- Returns:
- the rd of the first Sunday of the ISO year
- Returns:
- {string} a string giving the name of the calendar
- Returns:
- {number} the day of the week
- Returns:
- {number} the ordinal day of the year
- Returns:
- {number} 1 if this date is in the Hebrew era, -1 if it is before the Hebrew era
- Returns:
- {number} the halaqim parts of the current hour
The locale is a required parameter because different locales that use the same Hebrew calendar consider different days of the week to be the beginning of the week. This can affect the week of the month in which some days are located.
- Parameters:
- {Locale|string} locale
- the locale or locale spec to use when figuring out the first day of the week
- Returns:
- {number} the ordinal number of the week within the current month