OptionalhavdalahMins: numberOptionallinkedEvent: EventOptionaloptions: CalOptionsOptionalalarmAlarms are used by iCalendar feeds
ReadonlydateHebrew date of this event
ReadonlydescUntranslated title of this event. Note that these description
strings are always in English and will remain stable across releases.
To get the title of the event in another language, use the
render() method.
OptionaldurationOptional length of the event in minutes. Not computed or validated by
this class; it's a plain count of minutes for downstream renderers
(e.g. @hebcal/icalendar) to add to the event's start wall-clock time
when producing a non-zero-duration DTEND. Undefined means no
duration was specified.
OptionalemojiOptional emoji character such as ✡️, 🕯️, 🕎, 🕍, 🌒
ReadonlyeventThe exact moment of the event, rounded to the nearest minute
Readonlyevent24-hour formatted time string in the location's timezone (e.g. "19:42")
ReadonlyfmtLocale-aware formatted time string (e.g. "7:42pm" in US locale)
Optional ReadonlylinkedOptional event this time is associated with (e.g. the Yom Tov being lit for)
ReadonlylocationGeographic location used to compute eventTime
ReadonlymaskBitmask of optional event flags. See flags
OptionalmemoOptional longer description or memo text
Returns a simplified (untranslated) description for this event, suitable for grouping related events under a single name.
For example, HolidayEvent strips qualifiers so that
"Erev Pesach" → "Pesach" and "Sukkot III (CH''M)" → "Sukkot".
For many events the basename and the event description are identical.
Names of all flags set on this event, in ascending bit order. Returns an empty array for an event with no flags.
Returns an array of category strings classifying this event, derived
from its flags bitmask. The first element is the broad category
(e.g. 'holiday', 'roshchodesh', 'parashat', 'omer'), followed
by zero or more refinements (e.g. 'major', 'minor', 'fast').
Returns ['unknown'] if no flag maps to a known category.
Hebrew date of this event
Untranslated title of this event. Note that these description
strings are always in English and will remain stable across releases.
To get the title of the event in another language, use the
render() method.
Returns the event's emoji character (e.g. 🕯️, 🕎, 🇮🇱, 🍏🍯),
or null if no emoji is associated with this event.
Subclasses override this to provide holiday-specific emoji.
Bitmask of optional event flags. See flags
Use Event.hasFlag to test for a flag, or Event.flagNames to list them. Code that genuinely needs the raw bitmask can read Event.mask.
Gregorian date of this event
Does this event have at least one of the given flags?
Returns false when called with no arguments.
flag names, each one of the keys of flags
import {Event, HDate, flags} from '@hebcal/core';
const ev = new Event(new HDate(10, 'Tishrei', 5784), 'Yom Kippur',
flags.CHAG | flags.MAJOR_FAST);
ev.hasAnyFlag('MAJOR_FAST', 'MINOR_FAST'); // true
ev.hasAnyFlag('ROSH_CHODESH', 'MINOR_FAST'); // false
if any name is not a key of flags
Does this event have the given flag?
A readable alternative to testing the bitmask with &.
flag name, one of the keys of flags
import {Event, HDate, flags} from '@hebcal/core';
const ev = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II',
flags.CHAG | flags.CHUL_ONLY);
ev.hasFlag('CHAG'); // true
ev.hasFlag('CHUL_ONLY'); // true
ev.hasFlag('MINOR_FAST'); // false
if name is not a key of flags
Is this event observed in Israel/Diaspora?
const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
ev1.observedIn(false); // true
ev1.observedIn(true); // false
const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
ev2.observedIn(false); // true
ev2.observedIn(true); // true
Is this event observed in the Diaspora?
Optionallocale: string
Optional locale name (defaults to empty locale)
Returns translation of "Havdalah" without the time.
Optionallocale: string
Optional locale name (defaults to empty locale)
Returns a URL to hebcal.com or sefaria.org for more detail on the event,
or undefined for events with no detail page.
Subclasses such as HolidayEvent, ChanukahEvent, AsaraBTevetEvent, ParshaEvent, and OmerEvent override this with their own URL patterns.
Havdalah event marking the end of Shabbat or a Yom Tov.
Generated by calendar when
options.candlelightingistrueandoptions.locationis provided. By default Havdalah is calculated by tzeit hakochavim (8.5° solar depression); passoptions.havdalahMinsto use a fixed minute offset instead, oroptions.havdalahDegto use a different degree.