Hebcal, a perpetual Jewish Calendar (ES6)
$ npm install @hebcal/core
import {hebcal, HDate, cities, Location, Event} from '@hebcal/core';
cities.init();
const options = {
year: 1981,
isHebrewYear: false,
candlelighting: true,
location: Location.newFromCity(cities.getCity('San Francisco')),
sedrot: true,
omer: true,
};
const events = hebcal.hebrewCalendar(options);
for (const ev of events) {
const hd = ev.getDate();
const date = hd.greg();
console.log(date.toLocaleDateString(), ev.render(), hd.toString());
}
- HDate
Class representing a Hebrew date
- Event
Represents an Event with a title, date, and flags
- OmerEvent
Represents a day 1-49 of counting the Omer from Pesach to Shavuot
- DafYomiEvent
For a Daf Yomi, the name is already translated attrs.dafyomi.name contains the untranslated string
- HavdalahEvent
Havdalah after Shabbat or holiday
- CandleLightingEvent
Candle lighting before Shabbat or holiday
- Location
Class representing Location
- Sedra
Represents Parashah HaShavua for an entire Hebrew year
- cities
Interface to lookup cities
- hebLeapYear(x) ⇒
boolean
Returns true if Hebrew year is a leap year
- monthsInHebYear(x) ⇒
number
Number of months in Hebrew year
- daysInHebMonth(month, year) ⇒
number
Number of days in Hebrew month in a given year
- getMonthName(month, year) ⇒
string
Returns an (untranslated) string name of Hebrew month in year
- monthNum(month) ⇒
number
Returns the Hebrew month number
- hebElapsedDays(hYear) ⇒
number
Days from sunday prior to start of Hebrew calendar to mean conjunction of Tishrei in Hebrew YEAR
- daysInYear(year) ⇒
number
Number of days in the hebrew YEAR
- longCheshvan(year) ⇒
boolean
true if Cheshvan is long in Hebrew YEAR
- shortKislev(year) ⇒
boolean
true if Kislev is short in Hebrew YEAR
- monthFromName(c) ⇒
number
Converts Hebrew month string name to numeric
- dayOnOrBefore(day_of_week, absdate) ⇒
number
Note: Applying this function to d+6 gives us the DAYNAME on or after an absolute day d. Similarly, applying it to d+3 gives the DAYNAME nearest to absolute date d, applying it to d-1 gives the DAYNAME previous to absolute date d, and applying it to d+7 gives the DAYNAME following absolute date d.
- range(start, end, [step]) ⇒
Array.<number>
Returns an array from start to end
- gregLeapYear(year) ⇒
boolean
Returns true if the Gregorian year is a leap year
- daysInGregMonth(month, year) ⇒
number
Number of days in the Gregorian month for given year
- dayOfYear(date) ⇒
number
Returns number of days since January 1 of that year
- greg2abs(date) ⇒
number
Converts Gregorian date to Julian Day Count
- abs2greg(theDate) ⇒
Date
Converts from Julian Day Count to Gregorian date. See the footnote on page 384 of ``Calendrical Calculations, Part II: Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and Experience, Volume 23, Number 4 (April, 1993), pages 383-404 for an explanation.
- onOrBefore(day, t, offset) ⇒
HDate
- hebrew2abs(d) ⇒
number
Converts Hebrew date to absolute Julian days. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC.
- abs2hebrew(d) ⇒
SimpleHebrewDate
Converts Julian days to Hebrew date to absolute Julian days
- getMolad(year, month) ⇒
Molad
Calculates the molad for a Hebrew month
- getBirthdayOrAnniversary(hyear, gdate) ⇒
HDate
Calculates a birthday or anniversary (non-yahrzeit). Year must be after original date of anniversary. Returns undefined when requested year preceeds or is same as original year.
- getYahrzeit(hyear, gdate) ⇒
HDate
Calculates yahrzeit. Year must be after original date of death. Returns undefined when requested year preceeds or is same as original year.
- dafyomi(gregdate) ⇒
DafYomiResult
Returns the Daf Yomi for given date
- dafname(daf) ⇒
string
Formats (with translation) the dafyomi result as a string like "Pesachim 34"
- D(p) ⇒
number
parsha doubler/undoubler
- abs(year, absDate) ⇒
Object
Returns an object describing the parsha on the first Saturday on or after absdate
- chanukah(day) ⇒
string
- getHolidaysForYear(year) ⇒
Map.<string, Array.<Event>>
Returns a Map for the year indexed by HDate.toString()
- getHolidaysOnDate(date) ⇒
Array.<Event>
Returns an array of Events on this date (or undefined if no events)
- formatTime(timeFormat, dt) ⇒
string
- sunsetTime(hd, location, timeFormat, offset) ⇒
Array.<Object>
- tzeitTime(hd, location, timeFormat) ⇒
Array.<Object>
- candleEvent(e, hd, dow, location, timeFormat, candlesOffset, havdalahOffset) ⇒
Event
- getCandleLightingMinutes(options) ⇒
number
- getStartAndEnd(options) ⇒
Array.<number>
Parse options object to determine start & end days
- getOmerStartAndEnd(hyear) ⇒
Array.<number>
- getMaskFromOptions(options) ⇒
number
Mask to filter Holiday array
- hebcalEvents(options) ⇒
Array.<Event>
Generates a list of holidays
- SimpleHebrewDate :
Object
A simple Hebrew date
- Molad :
Object
Represents an Molad
- CityResult :
Object
A City result
- DafYomiResult :
Object
A Daf Yomi result
- HebcalOptions :
Object
Options to configure which events are returned
Class representing a Hebrew date
Kind: global class
- HDate
- new HDate([day], [month], [year])
- .getFullYear() ⇒
number
- .isLeapYear() ⇒
boolean
- .getMonth() ⇒
number
- .getTishreiMonth() ⇒
number
- .daysInMonth() ⇒
number
- .getDate() ⇒
number
- .getDay() ⇒
number
- .setFullYear(year) ⇒
HDate
- .setMonth(month) ⇒
HDate
- .setTishreiMonth(month) ⇒
HDate
- .setDate(date) ⇒
HDate
- .greg() ⇒
Date
- .abs() ⇒
number
- .getMonthName() ⇒
string
- .render() ⇒
string
- .before(day) ⇒
HDate
- .onOrBefore(day) ⇒
HDate
- .nearest(day) ⇒
HDate
- .onOrAfter(day) ⇒
HDate
- .after(day) ⇒
HDate
- .next() ⇒
HDate
- .prev() ⇒
HDate
- .isSameDate(other) ⇒
boolean
Create a Hebrew date.
Param | Type | Description |
---|---|---|
[day] | number | Date | HDate |
Day of month (1-30) |
[month] | number |
Hebrew month of year (1=NISAN, 7=TISHREI) |
[year] | number |
Hebrew year |
Gets the Hebrew year of this Hebrew date
Kind: instance method of HDate
Tests if this date occurs during a leap year
Kind: instance method of HDate
Gets the Hebrew month (1=NISAN, 7=TISHREI) of this Hebrew date
Kind: instance method of HDate
Kind: instance method of HDate
Number of days in the month of this Hebrew date
Kind: instance method of HDate
Gets the day within the month (1-30)
Kind: instance method of HDate
Gets the day of the week, using local time.
Kind: instance method of HDate
hDate.setFullYear(year) ⇒ HDate
Kind: instance method of HDate
Param | Type |
---|---|
year | number |
hDate.setMonth(month) ⇒ HDate
Kind: instance method of HDate
Param | Type |
---|---|
month | number |
hDate.setTishreiMonth(month) ⇒ HDate
Kind: instance method of HDate
Param | Type |
---|---|
month | number |
hDate.setDate(date) ⇒ HDate
Kind: instance method of HDate
Param | Type |
---|---|
date | number |
Converts to Gregorian date
Kind: instance method of HDate
Returns Julian absolute days
Kind: instance method of HDate
Returns untranslated Hebrew month name
Kind: instance method of HDate
Returns translated/transliterated Hebrew date
Kind: instance method of HDate
hDate.before(day) ⇒ HDate
Kind: instance method of HDate
Param | Type | Description |
---|---|---|
day | number |
day of week |
hDate.onOrBefore(day) ⇒ HDate
Kind: instance method of HDate
Param | Type | Description |
---|---|---|
day | number |
day of week |
hDate.nearest(day) ⇒ HDate
Kind: instance method of HDate
Param | Type | Description |
---|---|---|
day | number |
day of week |
hDate.onOrAfter(day) ⇒ HDate
Kind: instance method of HDate
Param | Type | Description |
---|---|---|
day | number |
day of week |
hDate.after(day) ⇒ HDate
Kind: instance method of HDate
Param | Type | Description |
---|---|---|
day | number |
day of week |
hDate.next() ⇒ HDate
Kind: instance method of HDate
hDate.prev() ⇒ HDate
Kind: instance method of HDate
Kind: instance method of HDate
Param | Type | Description |
---|---|---|
other | HDate |
Hebrew date to compare |
Represents an Event with a title, date, and flags
Kind: global class
- Event
- new Event(date, desc, [mask], [attrs])
- .getFlags() ⇒
number
- .getAttrs() ⇒
Object
- .observedInIsrael() ⇒
boolean
- .observedInDiaspora() ⇒
boolean
- .render() ⇒
string
- .getDesc() ⇒
string
- .getDate() ⇒
HDate
Constructs Event
Param | Type | Default | Description |
---|---|---|---|
date | HDate |
Hebrew date event occurs | |
desc | string |
Description (not translated) | |
[mask] | number |
0 |
optional holiday flags |
[attrs] | Object |
{} |
Kind: instance method of Event
Kind: instance method of Event
Is this event observed in Israel?
Kind: instance method of Event
Is this event observed in the Diaspora?
Kind: instance method of Event
Returns (translated) description of this event
Kind: instance method of Event
Returns untranslated description of this event
Kind: instance method of Event
event.getDate() ⇒ HDate
Returns Hebrew date of this event
Kind: instance method of Event
Represents a day 1-49 of counting the Omer from Pesach to Shavuot
Kind: global class
Param | Type |
---|---|
date | HDate |
omerDay | number |
Kind: instance method of OmerEvent
Todo
- use gettext()
For a Daf Yomi, the name is already translated attrs.dafyomi.name contains the untranslated string
Kind: global class
Param | Type |
---|---|
date | HDate |
desc | string |
attrs | Object |
Kind: instance method of DafYomiEvent
Havdalah after Shabbat or holiday
Kind: global class
Param | Type |
---|---|
date | HDate |
mask | number |
attrs | Object |
[havdalahMins] | number |
Kind: instance method of HavdalahEvent
Candle lighting before Shabbat or holiday
Kind: global class
Param | Type |
---|---|
date | HDate |
mask | number |
attrs | Object |
Kind: instance method of CandleLightingEvent
Class representing Location
Kind: global class
- Location
- new Location(latitude, longitude, il, tzid, cityName, countryCode, geoid)
- instance
- .suntime(hdate) ⇒
suncalc.GetTimesResult
- .sunrise(hdate) ⇒
Date
- .sunset(hdate) ⇒
Date
- .hour(hdate) ⇒
number
- .hourMins(hdate) ⇒
number
- .gregEve(hdate) ⇒
Date
- .nightHour(hdate) ⇒
number
- .nightHourMins(hdate) ⇒
number
- .hourOffset(hdate, hours) ⇒
Date
- .chatzot(hdate) ⇒
Date
- .chatzotNight(hdate) ⇒
Date
- .alotHaShachar(hdate) ⇒
Date
- .misheyakir(hdate) ⇒
Date
- .misheyakirMachmir(hdate) ⇒
Date
- .sofZmanShma(hdate) ⇒
Date
- .sofZmanTfilla(hdate) ⇒
Date
- .minchaGedola(hdate) ⇒
Date
- .minchaKetana(hdate) ⇒
Date
- .plagHaMincha(hdate) ⇒
Date
- .tzeit(hdate) ⇒
Date
- .neitzHaChama(hdate) ⇒
Date
- .shkiah(hdate) ⇒
Date
- .suntime(hdate) ⇒
- static
Initialize a Location instance
Param | Type | Description |
---|---|---|
latitude | number |
Latitude as a decimal, valid range -90 thru +90 (e.g. 41.85003) |
longitude | number |
Longitude as a decimal, valid range -180 thru +180 (e.g. -87.65005) |
il | boolean |
in Israel (true) or Diaspora (false) |
tzid | string |
Olson timezone ID, e.g. "America/Chicago" |
cityName | string |
optional descriptive city name |
countryCode | string |
ISO 3166 alpha-2 country code (e.g. "FR") |
geoid | number |
optional numeric geographic ID |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
hours | number |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Kind: instance method of Location
Param | Type |
---|---|
hdate | HDate |
Location.newFromCity(city) ⇒ Location
Kind: static method of Location
Param | Type |
---|---|
city | Object |
Represents Parashah HaShavua for an entire Hebrew year
Kind: global class
- Sedra
- new Sedra(hebYr, il)
- instance
- .get(hDate) ⇒
Array.<string>
- .getString(hDate) ⇒
string
- .lookup(hDate) ⇒
Object
- .isParsha(hDate) ⇒
boolean
- .getSedraArray() ⇒
Array.<Object>
- .getYear() ⇒
number
- .get(hDate) ⇒
- static
- .parshaToString(parsha) ⇒
string
- .parshaToString(parsha) ⇒
Caculates the Parashah HaShavua for an entire Hebrew year
Param | Type | Description |
---|---|---|
hebYr | number |
Hebrew year (e.g. 5749) |
il | boolean |
Use Israel sedra schedule (false for Diaspora) |
Returns the parsha (or parshiyot) read on Hebrew date
Kind: instance method of Sedra
Param | Type | Description |
---|---|---|
hDate | HDate | number |
Hebrew date or absolute days |
Looks up parsha for the date, then returns a (translated) string
Kind: instance method of Sedra
Param | Type | Description |
---|---|---|
hDate | HDate | number |
Hebrew date or absolute days |
Returns an object describing the parsha on the first Saturday on or after absdate
Kind: instance method of Sedra
Param | Type | Description |
---|---|---|
hDate | HDate | number |
Hebrew date or absolute days |
Checks to see if this day would be a regular parasha HaShavua Torah reading or special holiday reading
Kind: instance method of Sedra
Param | Type | Description |
---|---|---|
hDate | HDate | number |
Hebrew date or absolute days |
Kind: instance method of Sedra
Kind: instance method of Sedra
Translates object describing the parsha to a string
Kind: static method of Sedra
Param | Type |
---|---|
parsha | Array.<string> |
Hebrew months of the year (NISAN=1, TISHREI=7)
Kind: global enum
Read only: true
Properties
Name | Type | Default | Description |
---|---|---|---|
NISAN | number |
1 |
Nissan / ניסן |
IYYAR | number |
2 |
Iyyar / אייר |
SIVAN | number |
3 |
Sivan / סיון |
TAMUZ | number |
4 |
Tamuz (sometimes Tammuz) / תמוז |
AV | number |
5 |
Av / אב |
ELUL | number |
6 |
Elul / אלול |
TISHREI | number |
7 |
Tishrei / תִשְׁרֵי |
CHESHVAN | number |
8 |
Cheshvan / חשון |
KISLEV | number |
9 |
Kislev / כסלו |
TEVET | number |
10 |
Tevet / טבת |
SHVAT | number |
11 |
Sh'vat / שבט |
ADAR_I | number |
12 |
Adar or Adar Rishon / אדר |
ADAR_II | number |
13 |
Adar Sheini (only on leap years) / אדר ב׳ |
Days of the week (SUN=0, SAT=6)
Kind: global enum
Read only: true
Properties
Name | Type | Default | Description |
---|---|---|---|
SUN | number |
0 |
Sunday |
MON | number |
1 |
Monday |
TUE | number |
2 |
Tuesday |
WED | number |
3 |
Wednesday |
THU | number |
4 |
Thursday |
FRI | number |
5 |
Friday |
SAT | number |
6 |
Saturday |
Holiday flags for Event
Kind: global enum
Read only: true
Properties
Name | Type | Default | Description |
---|---|---|---|
CHAG | number |
CHAG |
Chag, yontiff, yom tov |
LIGHT_CANDLES | number |
LIGHT_CANDLES |
Light candles before sundown |
YOM_TOV_ENDS | number |
YOM_TOV_ENDS |
End of holiday (end of Yom Tov) |
CHUL_ONLY | number |
CHUL_ONLY |
|
IL_ONLY | number |
IL_ONLY |
|
LIGHT_CANDLES_TZEIS | number |
LIGHT_CANDLES_TZEIS |
|
CHANUKAH_CANDLES | number |
CHANUKAH_CANDLES |
|
ROSH_CHODESH | number |
ROSH_CHODESH |
|
MINOR_FAST | number |
MINOR_FAST |
|
SPECIAL_SHABBAT | number |
SPECIAL_SHABBAT |
|
PARSHA_HASHAVUA | number |
PARSHA_HASHAVUA |
|
DAF_YOMI | number |
DAF_YOMI |
|
OMER_COUNT | number |
OMER_COUNT |
|
MODERN_HOLIDAY | number |
MODERN_HOLIDAY |
|
MAJOR_FAST | number |
MAJOR_FAST |
|
SHABBAT_MEVARCHIM | number |
SHABBAT_MEVARCHIM |
|
MOLAD | number |
MOLAD |
|
USER_EVENT | number |
USER_EVENT |
Interface to lookup cities
cities.getCity(str) ⇒ CityResult
Looks up a city
Kind: static method of cities
Param | Type | Description |
---|---|---|
str | string |
city name |
Returns true if Hebrew year is a leap year
Kind: global function
Param | Type | Description |
---|---|---|
x | number |
Hebrew year |
Number of months in Hebrew year
Kind: global function
Param | Type | Description |
---|---|---|
x | number |
Hebrew year |
Number of days in Hebrew month in a given year
Kind: global function
Param | Type | Description |
---|---|---|
month | number |
Hebrew month (e.g. months.TISHREI) |
year | number |
Hebrew year |
Returns an (untranslated) string name of Hebrew month in year
Kind: global function
Param | Type | Description |
---|---|---|
month | number |
Hebrew month (e.g. months.TISHREI) |
year | number |
Hebrew year |
Returns the Hebrew month number
Kind: global function
Param | Type | Description |
---|---|---|
month | number | string |
A number, or Hebrew month name string |
Days from sunday prior to start of Hebrew calendar to mean conjunction of Tishrei in Hebrew YEAR
Kind: global function
Param | Type | Description |
---|---|---|
hYear | number |
Hebrew year |
Number of days in the hebrew YEAR
Kind: global function
Param | Type | Description |
---|---|---|
year | number |
Hebrew year |
true if Cheshvan is long in Hebrew YEAR
Kind: global function
Param | Type | Description |
---|---|---|
year | number |
Hebrew year |
true if Kislev is short in Hebrew YEAR
Kind: global function
Param | Type | Description |
---|---|---|
year | number |
Hebrew year |
Converts Hebrew month string name to numeric
Kind: global function
Param | Type | Description |
---|---|---|
c | string |
monthName |
Note: Applying this function to d+6 gives us the DAYNAME on or after an absolute day d. Similarly, applying it to d+3 gives the DAYNAME nearest to absolute date d, applying it to d-1 gives the DAYNAME previous to absolute date d, and applying it to d+7 gives the DAYNAME following absolute date d.
Kind: global function
Param | Type |
---|---|
day_of_week | number |
absdate | number |
Returns an array from start to end
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
start | number |
beginning number, inclusive | |
end | number |
ending number, inclusive | |
[step] | number |
1 |
Returns true if the Gregorian year is a leap year
Kind: global function
Param | Type | Description |
---|---|---|
year | number |
Gregorian year |
Number of days in the Gregorian month for given year
Kind: global function
Param | Type | Description |
---|---|---|
month | number |
Gregorian month (1=January, 12=December) |
year | number |
Gregorian year |
Returns number of days since January 1 of that year
Kind: global function
Param | Type | Description |
---|---|---|
date | Date |
Gregorian date |
Converts Gregorian date to Julian Day Count
Kind: global function
Param | Type | Description |
---|---|---|
date | Date |
Gregorian date |
Converts from Julian Day Count to Gregorian date. See the footnote on page 384 of ``Calendrical Calculations, Part II: Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and Experience, Volume 23, Number 4 (April, 1993), pages 383-404 for an explanation.
Kind: global function
Param | Type | Description |
---|---|---|
theDate | number |
absolute Julian days |
onOrBefore(day, t, offset) ⇒ HDate
Kind: global function
Param | Type |
---|---|
day | number |
t | HDate |
offset | number |
Converts Hebrew date to absolute Julian days. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC.
Kind: global function
Param | Type | Description |
---|---|---|
d | HDate | SimpleHebrewDate |
Hebrew Date |
abs2hebrew(d) ⇒ SimpleHebrewDate
Converts Julian days to Hebrew date to absolute Julian days
Kind: global function
Param | Type | Description |
---|---|---|
d | number |
absolute Julian days |
getMolad(year, month) ⇒ Molad
Calculates the molad for a Hebrew month
Kind: global function
Param | Type |
---|---|
year | number |
month | number |
getBirthdayOrAnniversary(hyear, gdate) ⇒ HDate
Calculates a birthday or anniversary (non-yahrzeit). Year must be after original date of anniversary. Returns undefined when requested year preceeds or is same as original year.
Kind: global function
Returns: HDate
- anniversary occurring in hyear
Param | Type | Description |
---|---|---|
hyear | number |
Hebrew year |
gdate | Date | HDate |
Gregorian or Hebrew date of event |
getYahrzeit(hyear, gdate) ⇒ HDate
Calculates yahrzeit. Year must be after original date of death. Returns undefined when requested year preceeds or is same as original year.
Kind: global function
Returns: HDate
- anniversary occurring in hyear
Param | Type | Description |
---|---|---|
hyear | number |
Hebrew year |
gdate | Date | HDate |
Gregorian or Hebrew date of death |
dafyomi(gregdate) ⇒ DafYomiResult
Returns the Daf Yomi for given date
Kind: global function
Returns: DafYomiResult
- Tractact name and page number
Param | Type | Description |
---|---|---|
gregdate | Date |
Gregorian date |
Formats (with translation) the dafyomi result as a string like "Pesachim 34"
Kind: global function
Param | Type | Description |
---|---|---|
daf | DafYomiResult |
the Daf Yomi |
parsha doubler/undoubler
Kind: global function
Param | Type |
---|---|
p | number |
Returns an object describing the parsha on the first Saturday on or after absdate
Kind: global function
Param | Type |
---|---|
year | number |
absDate | number |
Kind: global function
Param | Type |
---|---|
day | number |
Returns a Map for the year indexed by HDate.toString()
Kind: global function
Param | Type | Description |
---|---|---|
year | number |
Hebrew year |
Kind: inner method of getHolidaysForYear
Param | Type |
---|---|
year | number |
arr | Array.<Object> |
getHolidaysOnDate(date) ⇒ Array.<Event>
Returns an array of Events on this date (or undefined if no events)
Kind: global function
Param | Type | Description |
---|---|---|
date | HDate | Date | number |
Hebrew Date, Gregorian date, or absolute Julian date |
Kind: global function
Param | Type |
---|---|
timeFormat | Intl.DateTimeFormat |
dt | Date |
Kind: global function
Param | Type |
---|---|
hd | HDate |
location | Location |
timeFormat | Intl.DateTimeFormat |
offset | number |
Kind: global function
Param | Type |
---|---|
hd | HDate |
location | Location |
timeFormat | Intl.DateTimeFormat |
candleEvent(e, hd, dow, location, timeFormat, candlesOffset, havdalahOffset) ⇒ Event
Kind: global function
Param | Type |
---|---|
e | Event |
hd | HDate |
dow | number |
location | Location |
timeFormat | Intl.DateTimeFormat |
candlesOffset | number |
havdalahOffset | number |
Kind: global function
Param | Type |
---|---|
options | HebcalOptions |
Parse options object to determine start & end days
Kind: global function
Param | Type |
---|---|
options | HebcalOptions |
Kind: global function
Param | Type |
---|---|
hyear | number |
Mask to filter Holiday array
Kind: global function
Param | Type |
---|---|
options | HebcalOptions |
hebcalEvents(options) ⇒ Array.<Event>
Generates a list of holidays
Kind: global function
Param | Type |
---|---|
options | HebcalOptions |
A simple Hebrew date
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
yy | number |
Hebrew year |
mm | number |
Hebrew month of year (1=NISAN, 7=TISHREI) |
dd | number |
Day of month (1-30) |
Represents an Molad
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
dow | number |
Day of Week (0=Sunday, 6=Saturday) |
hour | number |
hour of day (0-23) |
minutes | number |
minutes past hour (0-59) |
chalakim | number |
parts of a minute (0-17) |
A City result
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
name | string |
Short city name |
latitude | number |
|
longitude | number |
|
tzid | string |
Timezone Identifier (for tzdata/Olson tzdb) |
cc | string |
ISO 3166 two-letter country code |
cityName | string |
longer city name with US State or country code |
[state] | string |
U.S. State name (only if cc='US') |
[geoid] | number |
optional numerical geoid |
A Daf Yomi result
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
name | string |
Tractate name |
blatt | number |
Page number |
Options to configure which events are returned
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
location | Location |
latitude/longitude/tzid used for candle-lighting |
year | number |
Gregorian or Hebrew year |
isHebrewYear | boolean |
to interpret year as Hebrew year |
month | number |
Gregorian or Hebrew month (to filter results to a single month) |
numYears | number |
generate calendar for multiple years (default 1) |
candlelighting | boolean |
calculate candle-lighting and havdalah times |
candleLightingMins | number |
minutes before sundown to light candles (default 18) |
havdalahMins | number |
minutes after sundown for Havdalah (typical values are 42, 50, or 72) |
havdalahTzeit | boolean |
calculate Havdalah according to Tzeit Hakochavim - Nightfall (the point when 3 small stars are observable in the night time sky with the naked eye). Defaults to true unless havdalahMins is specified |
sedrot | boolean |
calculate parashah hashavua on Saturdays |
il | boolean |
Israeli holiday and sedra schedule |
noMinorFast | boolean |
suppress minor fasts |
noModern | boolean |
suppress modern holidays |
noRoshChodesh | boolean |
suppress Rosh Chodesh & Shabbat Mevarchim |
noSpecialShabbat | boolean |
suppress Special Shabbat |
noHolidays | boolean |
suppress regular holidays |
dafyomi | boolean |
include Daf Yomi |
omer | boolean |
include Days of the Omer |
molad | boolean |
include event announcing the molad |
ashkenazi | boolean |
use Ashkenazi transliterations for event titles (default Sephardi transliterations) |
locale | string |
translate event titles according to a locale (one of fi , fr , he , hu , pl , ru , ashkenazi , ashkenazi_litvish , ashkenazi_poylish , ashkenazi_standard ) |
hour12 | boolean |
use 12-hour time (1-12) instead of default 24-hour time (0-23) |