@hebcal/core
    Preparing search index...

    Class HebrewDateEvent

    Daily Hebrew date ("11th of Sivan, 5780")

    Hierarchy (View Summary)

    Index
    alarm?: string | boolean | Date

    Alarms are used by iCalendar feeds

    date: HDate

    Hebrew date of this event

    desc: string

    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.

    emoji?: string

    Optional emoji character such as ✡️, 🕯️, 🕎, 🕍, 🌒

    mask: number

    Bitmask of optional event flags. See flags

    memo?: string

    Optional 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.

      Returns string

      import {HolidayEvent, HDate, months, flags} from '@hebcal/core';
      const ev = new HolidayEvent(
      new HDate(14, months.NISAN, 5784), 'Erev Pesach', flags.EREV);
      ev.getDesc(); // 'Erev Pesach'
      ev.basename(); // 'Pesach'
    • Names of all flags set on this event, in ascending bit order. Returns an empty array for an event with no flags.

      Returns (
          | "CHAG"
          | "LIGHT_CANDLES"
          | "YOM_TOV_ENDS"
          | "CHUL_ONLY"
          | "IL_ONLY"
          | "LIGHT_CANDLES_TZEIS"
          | "CHANUKAH_CANDLES"
          | "ROSH_CHODESH"
          | "MINOR_FAST"
          | "SPECIAL_SHABBAT"
          | "PARSHA_HASHAVUA"
          | "DAF_YOMI"
          | "OMER_COUNT"
          | "MODERN_HOLIDAY"
          | "MAJOR_FAST"
          | "SHABBAT_MEVARCHIM"
          | "MOLAD"
          | "USER_EVENT"
          | "HEBREW_DATE"
          | "MINOR_HOLIDAY"
          | "EREV"
          | "CHOL_HAMOED"
          | "MISHNA_YOMI"
          | "YOM_KIPPUR_KATAN"
          | "YERUSHALMI_YOMI"
          | "NACH_YOMI"
          | "DAILY_LEARNING"
          | "YIZKOR"
          | "BEHAB"
          | "KIDDUSH_LEVANA"
      )[]

      import {Event, HDate, flags} from '@hebcal/core';
      const ev = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II',
      flags.CHAG | flags.CHUL_ONLY);
      ev.flagNames(); // ['CHAG', 'CHUL_ONLY']
    • 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.

      Returns string[]

      import {Event, HDate, flags} from '@hebcal/core';
      new Event(new HDate(10, 'Tishrei', 5784), 'Yom Kippur', flags.MAJOR_FAST)
      .getCategories(); // ['holiday', 'major', 'fast']
      new Event(new HDate(1, 'Shvat', 5784), 'Rosh Chodesh Sh\'vat', flags.ROSH_CHODESH)
      .getCategories(); // ['roshchodesh']
    • 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 string

    • 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.

      Returns string | null

    • Does this event have at least one of the given flags?

      Returns false when called with no arguments.

      Parameters

      • ...names: (
            | "CHAG"
            | "LIGHT_CANDLES"
            | "YOM_TOV_ENDS"
            | "CHUL_ONLY"
            | "IL_ONLY"
            | "LIGHT_CANDLES_TZEIS"
            | "CHANUKAH_CANDLES"
            | "ROSH_CHODESH"
            | "MINOR_FAST"
            | "SPECIAL_SHABBAT"
            | "PARSHA_HASHAVUA"
            | "DAF_YOMI"
            | "OMER_COUNT"
            | "MODERN_HOLIDAY"
            | "MAJOR_FAST"
            | "SHABBAT_MEVARCHIM"
            | "MOLAD"
            | "USER_EVENT"
            | "HEBREW_DATE"
            | "MINOR_HOLIDAY"
            | "EREV"
            | "CHOL_HAMOED"
            | "MISHNA_YOMI"
            | "YOM_KIPPUR_KATAN"
            | "YERUSHALMI_YOMI"
            | "NACH_YOMI"
            | "DAILY_LEARNING"
            | "YIZKOR"
            | "BEHAB"
            | "KIDDUSH_LEVANA"
        )[]

        flag names, each one of the keys of flags

      Returns boolean

      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 &.

      Parameters

      • name:
            | "CHAG"
            | "LIGHT_CANDLES"
            | "YOM_TOV_ENDS"
            | "CHUL_ONLY"
            | "IL_ONLY"
            | "LIGHT_CANDLES_TZEIS"
            | "CHANUKAH_CANDLES"
            | "ROSH_CHODESH"
            | "MINOR_FAST"
            | "SPECIAL_SHABBAT"
            | "PARSHA_HASHAVUA"
            | "DAF_YOMI"
            | "OMER_COUNT"
            | "MODERN_HOLIDAY"
            | "MAJOR_FAST"
            | "SHABBAT_MEVARCHIM"
            | "MOLAD"
            | "USER_EVENT"
            | "HEBREW_DATE"
            | "MINOR_HOLIDAY"
            | "EREV"
            | "CHOL_HAMOED"
            | "MISHNA_YOMI"
            | "YOM_KIPPUR_KATAN"
            | "YERUSHALMI_YOMI"
            | "NACH_YOMI"
            | "DAILY_LEARNING"
            | "YIZKOR"
            | "BEHAB"
            | "KIDDUSH_LEVANA"

        flag name, one of the keys of flags

      Returns boolean

      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?

      Parameters

      • il: boolean

      Returns boolean

      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?

      Returns boolean

      const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
      ev1.observedInDiaspora(); // true
      const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
      ev2.observedInDiaspora(); // true
    • Is this event observed in Israel?

      Returns boolean

      const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
      ev1.observedInIsrael(); // false
      const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
      ev2.observedInIsrael(); // true
    • Parameters

      • Optionallocale: string

        Optional locale name (defaults to empty locale)

      Returns string

      import {HDate, HebrewDateEvent, months} from '@hebcal/core';

      const hd = new HDate(15, months.CHESHVAN, 5769);
      const ev = new HebrewDateEvent(hd);
      console.log(ev.render('en')); // '15th of Cheshvan, 5769'
      console.log(ev.render('he')); // 'ט״ו חֶשְׁוָן תשס״ט'
    • Parameters

      • Optionallocale: string

        Optional locale name (defaults to empty locale)

      Returns string

      import {HDate, HebrewDateEvent, months} from '@hebcal/core';

      const hd = new HDate(15, months.CHESHVAN, 5769);
      const ev = new HebrewDateEvent(hd);
      console.log(ev.renderBrief()); // '15th of Cheshvan'
      console.log(ev.renderBrief('he')); // 'ט״ו חֶשְׁוָן'