# new HebrewCal(optionsopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object
|
<optional> |
Options governing the construction of this instance |
Extends
Methods
# getMonLength(month, year) → {number}
Return the number of days in a particular month in a particular year. This function can return a different number for a month depending on the year because of leap years.
Parameters:
Name | Type | Description |
---|---|---|
month |
number
|
the month for which the length is sought |
year |
number
|
the year within which that month can be found |
- Overrides:
the number of days within the given month in the given year, or 0 for an invalid month in the year
number
# getNumMonths(year)
Return the number of months in the given year. The number of months in a year varies for luni-solar calendars because in some years, an extra month is needed to extend the days in a year to an entire solar year. The month is represented as a 1-based number where 1=first month, 2=second month, etc.
Parameters:
Name | Type | Description |
---|---|---|
year |
number
|
a year for which the number of months is sought |
- Overrides:
# getType() → {string}
Return the type of this calendar.
- Overrides:
the name of the type of this calendar
string
# isLeapYear(year) → {boolean}
Return true if the given year is a leap year in the Hebrew calendar. The year parameter may be given as a number, or as a HebrewDate object.
Parameters:
Name | Type | Description |
---|---|---|
year |
number
|
Object
|
the year for which the leap year information is being sought |
- Overrides:
true if the given year is a leap year
boolean
# lastDayOfMonth(month, year) → {number}
Return the date of the last day of the month for the given year. The date of the last day of the month is variable because a number of months gain an extra day in leap years, and it is variable which months gain a day for each leap year and which do not.
Parameters:
Name | Type | Description |
---|---|---|
month |
number
|
the month for which the number of days is sought |
year |
number
|
the year in which that month is |
the number of days in the given month and year
number
# static daysInYear(year) → {number}
Return the number of days in the given year. Years contain a variable number of days because the date of Rosh HaShanah (New Year's) changes so that it doesn't fall on particular days of the week. Days are added to the months of Heshvan and/or Kislev in the previous year in order to prevent the current year's New Year from being on Sunday, Wednesday, or Friday.
Parameters:
Name | Type | Description |
---|---|---|
year |
number
|
the year for which the length is sought |
number of days in the given year
number