Class Index | File Index

Classes


Class HebrewCal


Extends Calendar.
Construct a new Hebrew calendar object. This class encodes information about the Hebrew (Jewish) calendar. The Hebrew calendar is a tabular hebrew calendar where the dates are calculated by arithmetic rules. This differs from the religious Hebrew calendar which is used to mark the beginning of particular holidays. The religious calendar depends on the first sighting of the new crescent moon to determine the first day of the new month. Because humans and weather are both involved, the actual time of sighting varies, so it is not really possible to precalculate the religious calendar. Certain groups, such as the Hebrew Society of North America, decreed in in 2007 that they will use a calendar based on calculations rather than observations to determine the beginning of lunar months, and therefore the dates of holidays.


Defined in: ilib-full-dyn.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
HebrewCal.daysInYear(year)
Return the number of days in the given year.
 
getMonLength(month, year)
Return the number of days in a particular month in a particular year.
 
Return the number of months in the given year.
 
Return the type of this calendar.
 
isLeapYear(year)
Return true if the given year is a leap year in the Hebrew calendar.
 
lastDayOfMonth(month, year)
Return the date of the last day of the month for the given year.
<deprecated>  
newDateInstance(options)
Return a date instance for this calendar type using the given options.
Class Detail
HebrewCal()
Method Detail
<static> {number} HebrewCal.daysInYear(year)
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:
{number} year
the year for which the length is sought
Returns:
{number} number of days in the given year

{number} getMonLength(month, year)
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:
{number} month
the month for which the length is sought
{number} year
the year within which that month can be found
Returns:
{number} the number of days within the given month in the given year, or 0 for an invalid month in the year

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:
{number} year
a year for which the number of months is sought

{string} getType()
Return the type of this calendar.
Returns:
{string} the name of the type of this calendar

{boolean} isLeapYear(year)
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:
{number|Object} year
the year for which the leap year information is being sought
Returns:
{boolean} true if the given year is a leap year

{number} lastDayOfMonth(month, year)
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:
{number} month
the month for which the number of days is sought
{number} year
the year in which that month is
Returns:
{number} the number of days in the given month and year

<deprecated> {HebrewDate} newDateInstance(options)
Return a date instance for this calendar type using the given options.
Parameters:
{Object} options
options controlling the construction of the date instance
Deprecated:
Since 11.0.5. Use DateFactory({calendar: cal.getType(), ...}) instead
Returns:
{HebrewDate} a date appropriate for this calendar type

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Oct 21 2019 22:58:32 GMT-0700 (PDT)