Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hebcal/core

Package Overview
Dependencies
Maintainers
1
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hebcal/core

A perpetual Jewish Calendar API

  • 1.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.1K
increased by120.65%
Maintainers
1
Weekly downloads
 
Created
Source

hebcal-es6

Hebcal, a perpetual Jewish Calendar (ES6)

Build Status

Installation

$ npm install @hebcal/core

Synopsis

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 = e.getDate();
  const date = hd.greg();
  console.log(date.toLocaleDateString(), e.render(), hd.toString());
}

Classes

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

Constants

cities

Interface to lookup cities

Functions

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

Typedefs

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

HDate

Class representing a Hebrew date

Kind: global class

new HDate([day], [month], [year])

Create a Hebrew date.

ParamTypeDescription
[day]number | Date | HDateDay of month (1-30)
[month]numberHebrew month of year (1=NISAN, 7=TISHREI)
[year]numberHebrew year

hDate.getFullYear() ⇒ number

Gets the Hebrew year of this Hebrew date

Kind: instance method of HDate

hDate.isLeapYear() ⇒ boolean

Tests if this date occurs during a leap year

Kind: instance method of HDate

hDate.getMonth() ⇒ number

Gets the Hebrew month (1=NISAN, 7=TISHREI) of this Hebrew date

Kind: instance method of HDate

hDate.getTishreiMonth() ⇒ number

Kind: instance method of HDate

hDate.daysInMonth() ⇒ number

Number of days in the month of this Hebrew date

Kind: instance method of HDate

hDate.getDate() ⇒ number

Gets the day within the month (1-30)

Kind: instance method of HDate

hDate.getDay() ⇒ number

Gets the day of the week, using local time.

Kind: instance method of HDate

hDate.setFullYear(year) ⇒ HDate

Kind: instance method of HDate

ParamType
yearnumber

hDate.setMonth(month) ⇒ HDate

Kind: instance method of HDate

ParamType
monthnumber

hDate.setTishreiMonth(month) ⇒ HDate

Kind: instance method of HDate

ParamType
monthnumber

hDate.setDate(date) ⇒ HDate

Kind: instance method of HDate

ParamType
datenumber

hDate.greg() ⇒ Date

Converts to Gregorian date

Kind: instance method of HDate

hDate.abs() ⇒ number

Returns Julian absolute days

Kind: instance method of HDate

hDate.getMonthName() ⇒ string

Returns untranslated Hebrew month name

Kind: instance method of HDate

hDate.render() ⇒ string

Returns translated/transliterated Hebrew date

Kind: instance method of HDate

hDate.before(day) ⇒ HDate

Kind: instance method of HDate

ParamTypeDescription
daynumberday of week

hDate.onOrBefore(day) ⇒ HDate

Kind: instance method of HDate

ParamTypeDescription
daynumberday of week

hDate.nearest(day) ⇒ HDate

Kind: instance method of HDate

ParamTypeDescription
daynumberday of week

hDate.onOrAfter(day) ⇒ HDate

Kind: instance method of HDate

ParamTypeDescription
daynumberday of week

hDate.after(day) ⇒ HDate

Kind: instance method of HDate

ParamTypeDescription
daynumberday of week

hDate.next() ⇒ HDate

Kind: instance method of HDate

hDate.prev() ⇒ HDate

Kind: instance method of HDate

hDate.isSameDate(other) ⇒ boolean

Kind: instance method of HDate

ParamTypeDescription
otherHDateHebrew date to compare

Event

Represents an Event with a title, date, and flags

Kind: global class

new Event(date, desc, [mask], [attrs])

Constructs Event

ParamTypeDefaultDescription
dateHDateHebrew date event occurs
descstringDescription (not translated)
[mask]number0optional holiday flags
[attrs]Object{}

event.getFlags() ⇒ number

Kind: instance method of Event

event.getAttrs() ⇒ Object

Kind: instance method of Event

event.observedInIsrael() ⇒ boolean

Is this event observed in Israel?

Kind: instance method of Event

event.observedInDiaspora() ⇒ boolean

Is this event observed in the Diaspora?

Kind: instance method of Event

event.render() ⇒ string

Returns (translated) description of this event

Kind: instance method of Event

event.getDesc() ⇒ string

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

OmerEvent

Represents a day 1-49 of counting the Omer from Pesach to Shavuot

Kind: global class

new OmerEvent(date, omerDay)

ParamType
dateHDate
omerDaynumber

omerEvent.render() ⇒ string

Kind: instance method of OmerEvent
Todo

  • use gettext()

DafYomiEvent

For a Daf Yomi, the name is already translated attrs.dafyomi.name contains the untranslated string

Kind: global class

new DafYomiEvent(date, desc, attrs)

ParamType
dateHDate
descstring
attrsObject

dafYomiEvent.render() ⇒ string

Kind: instance method of DafYomiEvent

HavdalahEvent

Havdalah after Shabbat or holiday

Kind: global class

new HavdalahEvent(date, mask, attrs, [havdalahMins])

ParamType
dateHDate
masknumber
attrsObject
[havdalahMins]number

havdalahEvent.render() ⇒ string

Kind: instance method of HavdalahEvent

CandleLightingEvent

Candle lighting before Shabbat or holiday

Kind: global class

new CandleLightingEvent(date, mask, attrs)

ParamType
dateHDate
masknumber
attrsObject

candleLightingEvent.render() ⇒ string

Kind: instance method of CandleLightingEvent

Location

Class representing Location

Kind: global class

new Location(latitude, longitude, il, tzid, cityName, countryCode, geoid)

Initialize a Location instance

ParamTypeDescription
latitudenumberLatitude as a decimal, valid range -90 thru +90 (e.g. 41.85003)
longitudenumberLongitude as a decimal, valid range -180 thru +180 (e.g. -87.65005)
ilbooleanin Israel (true) or Diaspora (false)
tzidstringOlson timezone ID, e.g. "America/Chicago"
cityNamestringoptional descriptive city name
countryCodestringISO 3166 alpha-2 country code (e.g. "FR")
geoidnumberoptional numeric geographic ID

location.suntime(hdate) ⇒ suncalc.GetTimesResult

Kind: instance method of Location

ParamType
hdateHDate

location.sunrise(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.sunset(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.hour(hdate) ⇒ number

Kind: instance method of Location

ParamType
hdateHDate

location.hourMins(hdate) ⇒ number

Kind: instance method of Location

ParamType
hdateHDate

location.gregEve(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.nightHour(hdate) ⇒ number

Kind: instance method of Location

ParamType
hdateHDate

location.nightHourMins(hdate) ⇒ number

Kind: instance method of Location

ParamType
hdateHDate

location.hourOffset(hdate, hours) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate
hoursnumber

location.chatzot(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.chatzotNight(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.alotHaShachar(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.misheyakir(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.misheyakirMachmir(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.sofZmanShma(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.sofZmanTfilla(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.minchaGedola(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.minchaKetana(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.plagHaMincha(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.tzeit(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.neitzHaChama(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

location.shkiah(hdate) ⇒ Date

Kind: instance method of Location

ParamType
hdateHDate

Location.newFromCity(city) ⇒ Location

Kind: static method of Location

ParamType
cityObject

Sedra

Represents Parashah HaShavua for an entire Hebrew year

Kind: global class

new Sedra(hebYr, il)

Caculates the Parashah HaShavua for an entire Hebrew year

ParamTypeDescription
hebYrnumberHebrew year (e.g. 5749)
ilbooleanUse Israel sedra schedule (false for Diaspora)

sedra.get(hDate) ⇒ Array.<string>

Returns the parsha (or parshiyot) read on Hebrew date

Kind: instance method of Sedra

ParamTypeDescription
hDateHDate | numberHebrew date or absolute days

sedra.getString(hDate) ⇒ string

Looks up parsha for the date, then returns a (translated) string

Kind: instance method of Sedra

ParamTypeDescription
hDateHDate | numberHebrew date or absolute days

sedra.lookup(hDate) ⇒ Object

Returns an object describing the parsha on the first Saturday on or after absdate

Kind: instance method of Sedra

ParamTypeDescription
hDateHDate | numberHebrew date or absolute days

sedra.isParsha(hDate) ⇒ boolean

Checks to see if this day would be a regular parasha HaShavua Torah reading or special holiday reading

Kind: instance method of Sedra

ParamTypeDescription
hDateHDate | numberHebrew date or absolute days

sedra.getSedraArray() ⇒ Array.<Object>

Kind: instance method of Sedra

sedra.getYear() ⇒ number

Kind: instance method of Sedra

Sedra.parshaToString(parsha) ⇒ string

Translates object describing the parsha to a string

Kind: static method of Sedra

ParamType
parshaArray.<string>

months : enum

Hebrew months of the year (NISAN=1, TISHREI=7)

Kind: global enum
Read only: true
Properties

NameTypeDefaultDescription
NISANnumber1Nissan / ניסן
IYYARnumber2Iyyar / אייר
SIVANnumber3Sivan / סיון
TAMUZnumber4Tamuz (sometimes Tammuz) / תמוז
AVnumber5Av / אב
ELULnumber6Elul / אלול
TISHREInumber7Tishrei / תִשְׁרֵי
CHESHVANnumber8Cheshvan / חשון
KISLEVnumber9Kislev / כסלו
TEVETnumber10Tevet / טבת
SHVATnumber11Sh'vat / שבט
ADAR_Inumber12Adar or Adar Rishon / אדר
ADAR_IInumber13Adar Sheini (only on leap years) / אדר ב׳

days : enum

Days of the week (SUN=0, SAT=6)

Kind: global enum
Read only: true
Properties

NameTypeDefaultDescription
SUNnumber0Sunday
MONnumber1Monday
TUEnumber2Tuesday
WEDnumber3Wednesday
THUnumber4Thursday
FRInumber5Friday
SATnumber6Saturday

flags : enum

Holiday flags for Event

Kind: global enum
Read only: true
Properties

NameTypeDefaultDescription
CHAGnumberCHAGChag, yontiff, yom tov
LIGHT_CANDLESnumberLIGHT_CANDLESLight candles before sundown
YOM_TOV_ENDSnumberYOM_TOV_ENDSEnd of holiday (end of Yom Tov)
CHUL_ONLYnumberCHUL_ONLY
IL_ONLYnumberIL_ONLY
LIGHT_CANDLES_TZEISnumberLIGHT_CANDLES_TZEIS
CHANUKAH_CANDLESnumberCHANUKAH_CANDLES
ROSH_CHODESHnumberROSH_CHODESH
MINOR_FASTnumberMINOR_FAST
SPECIAL_SHABBATnumberSPECIAL_SHABBAT
PARSHA_HASHAVUAnumberPARSHA_HASHAVUA
DAF_YOMInumberDAF_YOMI
OMER_COUNTnumberOMER_COUNT
MODERN_HOLIDAYnumberMODERN_HOLIDAY
MAJOR_FASTnumberMAJOR_FAST
SHABBAT_MEVARCHIMnumberSHABBAT_MEVARCHIM
MOLADnumberMOLAD
USER_EVENTnumberUSER_EVENT

cities

Interface to lookup cities

Kind: global constant

cities.getCity(str) ⇒ CityResult

Looks up a city

Kind: static method of cities

ParamTypeDescription
strstringcity name

hebLeapYear(x) ⇒ boolean

Returns true if Hebrew year is a leap year

Kind: global function

ParamTypeDescription
xnumberHebrew year

monthsInHebYear(x) ⇒ number

Number of months in Hebrew year

Kind: global function

ParamTypeDescription
xnumberHebrew year

daysInHebMonth(month, year) ⇒ number

Number of days in Hebrew month in a given year

Kind: global function

ParamTypeDescription
monthnumberHebrew month (e.g. months.TISHREI)
yearnumberHebrew year

getMonthName(month, year) ⇒ string

Returns an (untranslated) string name of Hebrew month in year

Kind: global function

ParamTypeDescription
monthnumberHebrew month (e.g. months.TISHREI)
yearnumberHebrew year

monthNum(month) ⇒ number

Returns the Hebrew month number

Kind: global function

ParamTypeDescription
monthnumber | stringA number, or Hebrew month name string

hebElapsedDays(hYear) ⇒ number

Days from sunday prior to start of Hebrew calendar to mean conjunction of Tishrei in Hebrew YEAR

Kind: global function

ParamTypeDescription
hYearnumberHebrew year

daysInYear(year) ⇒ number

Number of days in the hebrew YEAR

Kind: global function

ParamTypeDescription
yearnumberHebrew year

longCheshvan(year) ⇒ boolean

true if Cheshvan is long in Hebrew YEAR

Kind: global function

ParamTypeDescription
yearnumberHebrew year

shortKislev(year) ⇒ boolean

true if Kislev is short in Hebrew YEAR

Kind: global function

ParamTypeDescription
yearnumberHebrew year

monthFromName(c) ⇒ number

Converts Hebrew month string name to numeric

Kind: global function

ParamTypeDescription
cstringmonthName

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.

Kind: global function

ParamType
day_of_weeknumber
absdatenumber

range(start, end, [step]) ⇒ Array.<number>

Returns an array from start to end

Kind: global function

ParamTypeDefaultDescription
startnumberbeginning number, inclusive
endnumberending number, inclusive
[step]number1

gregLeapYear(year) ⇒ boolean

Returns true if the Gregorian year is a leap year

Kind: global function

ParamTypeDescription
yearnumberGregorian year

daysInGregMonth(month, year) ⇒ number

Number of days in the Gregorian month for given year

Kind: global function

ParamTypeDescription
monthnumberGregorian month (1=January, 12=December)
yearnumberGregorian year

dayOfYear(date) ⇒ number

Returns number of days since January 1 of that year

Kind: global function

ParamTypeDescription
dateDateGregorian date

greg2abs(date) ⇒ number

Converts Gregorian date to Julian Day Count

Kind: global function

ParamTypeDescription
dateDateGregorian date

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.

Kind: global function

ParamTypeDescription
theDatenumberabsolute Julian days

onOrBefore(day, t, offset) ⇒ HDate

Kind: global function

ParamType
daynumber
tHDate
offsetnumber

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.

Kind: global function

ParamTypeDescription
dHDate | SimpleHebrewDateHebrew Date

abs2hebrew(d) ⇒ SimpleHebrewDate

Converts Julian days to Hebrew date to absolute Julian days

Kind: global function

ParamTypeDescription
dnumberabsolute Julian days

getMolad(year, month) ⇒ Molad

Calculates the molad for a Hebrew month

Kind: global function

ParamType
yearnumber
monthnumber

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

ParamTypeDescription
hyearnumberHebrew year
gdateDate | HDateGregorian 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

ParamTypeDescription
hyearnumberHebrew year
gdateDate | HDateGregorian 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

ParamTypeDescription
gregdateDateGregorian date

dafname(daf) ⇒ string

Formats (with translation) the dafyomi result as a string like "Pesachim 34"

Kind: global function

ParamTypeDescription
dafDafYomiResultthe Daf Yomi

D(p) ⇒ number

parsha doubler/undoubler

Kind: global function

ParamType
pnumber

abs(year, absDate) ⇒ Object

Returns an object describing the parsha on the first Saturday on or after absdate

Kind: global function

ParamType
yearnumber
absDatenumber

chanukah(day) ⇒ string

Kind: global function

ParamType
daynumber

getHolidaysForYear(year) ⇒ Map.<string, Array.<Event>>

Returns a Map for the year indexed by HDate.toString()

Kind: global function

ParamTypeDescription
yearnumberHebrew year

getHolidaysForYear~addEvents(year, arr)

Kind: inner method of getHolidaysForYear

ParamType
yearnumber
arrArray.<Object>

getHolidaysOnDate(date) ⇒ Array.<Event>

Returns an array of Events on this date (or undefined if no events)

Kind: global function

ParamTypeDescription
dateHDate | Date | numberHebrew Date, Gregorian date, or absolute Julian date

formatTime(timeFormat, dt) ⇒ string

Kind: global function

ParamType
timeFormatIntl.DateTimeFormat
dtDate

sunsetTime(hd, location, timeFormat, offset) ⇒ Array.<Object>

Kind: global function

ParamType
hdHDate
locationLocation
timeFormatIntl.DateTimeFormat
offsetnumber

tzeitTime(hd, location, timeFormat) ⇒ Array.<Object>

Kind: global function

ParamType
hdHDate
locationLocation
timeFormatIntl.DateTimeFormat

candleEvent(e, hd, dow, location, timeFormat, candlesOffset, havdalahOffset) ⇒ Event

Kind: global function

ParamType
eEvent
hdHDate
downumber
locationLocation
timeFormatIntl.DateTimeFormat
candlesOffsetnumber
havdalahOffsetnumber

getCandleLightingMinutes(options) ⇒ number

Kind: global function

ParamType
optionsHebcalOptions

getStartAndEnd(options) ⇒ Array.<number>

Parse options object to determine start & end days

Kind: global function

ParamType
optionsHebcalOptions

getOmerStartAndEnd(hyear) ⇒ Array.<number>

Kind: global function

ParamType
hyearnumber

getMaskFromOptions(options) ⇒ number

Mask to filter Holiday array

Kind: global function

ParamType
optionsHebcalOptions

hebcalEvents(options) ⇒ Array.<Event>

Generates a list of holidays

Kind: global function

ParamType
optionsHebcalOptions

SimpleHebrewDate : Object

A simple Hebrew date

Kind: global typedef
Properties

NameTypeDescription
yynumberHebrew year
mmnumberHebrew month of year (1=NISAN, 7=TISHREI)
ddnumberDay of month (1-30)

Molad : Object

Represents an Molad

Kind: global typedef
Properties

NameTypeDescription
downumberDay of Week (0=Sunday, 6=Saturday)
hournumberhour of day (0-23)
minutesnumberminutes past hour (0-59)
chalakimnumberparts of a minute (0-17)

CityResult : Object

A City result

Kind: global typedef
Properties

NameTypeDescription
namestringShort city name
latitudenumber
longitudenumber
tzidstringTimezone Identifier (for tzdata/Olson tzdb)
ccstringISO 3166 two-letter country code
cityNamestringlonger city name with US State or country code
[state]stringU.S. State name (only if cc='US')
[geoid]numberoptional numerical geoid

DafYomiResult : Object

A Daf Yomi result

Kind: global typedef
Properties

NameTypeDescription
namestringTractate name
blattnumberPage number

HebcalOptions : Object

Options to configure which events are returned

Kind: global typedef
Properties

NameTypeDescription
locationLocationlatitude/longitude/tzid used for candle-lighting
yearnumberGregorian or Hebrew year
isHebrewYearbooleanto interpret year as Hebrew year
monthnumberGregorian or Hebrew month (to filter results to a single month)
numYearsnumbergenerate calendar for multiple years (default 1)
candlelightingbooleancalculate candle-lighting and havdalah times
candleLightingMinsnumberminutes before sundown to light candles (default 18)
havdalahMinsnumberminutes after sundown for Havdalah (typical values are 42, 50, or 72)
havdalahTzeitbooleancalculate 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
sedrotbooleancalculate parashah hashavua on Saturdays
ilbooleanIsraeli holiday and sedra schedule
noMinorFastbooleansuppress minor fasts
noModernbooleansuppress modern holidays
noRoshChodeshbooleansuppress Rosh Chodesh & Shabbat Mevarchim
noSpecialShabbatbooleansuppress Special Shabbat
noHolidaysbooleansuppress regular holidays
dafyomibooleaninclude Daf Yomi
omerbooleaninclude Days of the Omer
moladbooleaninclude event announcing the molad
ashkenazibooleanuse Ashkenazi transliterations for event titles (default Sephardi transliterations)
localestringtranslate event titles according to a locale (one of fi, fr, he, hu, pl, ru, ashkenazi, ashkenazi_litvish, ashkenazi_poylish, ashkenazi_standard)
hour12booleanuse 12-hour time (1-12) instead of default 24-hour time (0-23)

Keywords

FAQs

Package last updated on 02 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc