Class Index | File Index

Classes


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:

If called with another Hebrew date argument, the date components of the given date are copied into the current 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.

Class Summary
Constructor Attributes Constructor Name and Description
 
HebrewDate(params)
Field Summary
Field Attributes Field Name and Description
 
day
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 Summary
Method Attributes Method Name and Description
 
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.
 
Return the era for this date as a number.
 
Get the Halaqim (parts) of an hour.
 
Return the ordinal number of the week within the month.
Class Detail
HebrewDate(params)
Parameters:
{Object=} params
parameters that govern the settings and behaviour of this Hebrew date
Field Detail
{number} day
The day of the month. This ranges from 1 to 30.

{number} dayOfYear
The day of the year. Ranges from 1 to 383.

{number} hour
The hour of the day. This can be a number from 0 to 23, as times are stored unambiguously in the 24-hour clock.

{number} millisecond
The millisecond of the second. Ranges from 0 to 999.

{number} minute
The minute of the hours. Ranges from 0 to 59.

{number} month
The month number, ranging from 1 to 13.

{number} parts
The parts (halaqim) of the hour. This can be a number from 0 to 1079.

{number} second
The second of the minute. Ranges from 0 to 59.

{number} year
Year in the Hebrew calendar.
Method Detail
firstSunday(year)
Return the rd number of the first Sunday of the given ISO year.
Parameters:
year
Returns:
the rd of the first Sunday of the ISO year

{string} getCalendar()
Return the name of the calendar that governs this date.
Returns:
{string} a string giving the name of the calendar

{number} getDayOfWeek()
Return the day of the week of this date. The day of the week is encoded as number from 0 to 6, with 0=Sunday, 1=Monday, etc., until 6=Saturday.
Returns:
{number} the day of the week

{number} getDayOfYear()
Return the ordinal day of the year. Days are counted from 1 and proceed linearly up to 385, regardless of months or weeks, etc. That is, Tishri 1st is day 1, and Elul 29 is 385 for a leap year with a long Heshvan and long Kislev.
Returns:
{number} the ordinal day of the year

{number} getEra()
Return the era for this date as a number. The value for the era for Hebrew calendars is -1 for "before the Hebrew era" and 1 for "the Hebrew era". Hebrew era dates are any date after Tishri 1, 1, which is the same as September 7, 3760 BC in the Gregorian calendar.
Returns:
{number} 1 if this date is in the Hebrew era, -1 if it is before the Hebrew era

{number} getHalaqim()
Get the Halaqim (parts) of an hour. There are 1080 parts in an hour, which means each part is 3.33333333 seconds long. This means the number returned may not be an integer.
Returns:
{number} the halaqim parts of the current hour

{number} getWeekOfMonth(locale)
Return the ordinal number of the week within the month. The first week of a month is the first one that contains 4 or more days in that month. If any days precede this first week, they are marked as being in week 0. This function returns values from 0 through 6.

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

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Feb 02 2016 15:53:55 GMT-0800 (PST)