@hebcal/learning
    Preparing search index...

    Class DailyLearningEventAbstract

    Abstract base class for all daily-learning events produced by this package (Daf Yomi, Mishna Yomi, Daily Rambam, 929, etc.).

    Concrete subclasses are returned by DailyLearning.lookup(name, hdate) once the corresponding calendar has been registered (either via the top-level import '@hebcal/learning' or a per-calendar import such as import '@hebcal/learning/dafYomi'). Subclasses extend the hebcal Event API with calendar-specific fields (e.g. daf, reading, readings, mishnaYomi) and typically override render(locale) and url().

    Events created by this package have alarm set to false (these are study readings, not appointments) and carry the DAILY_LEARNING event flag — some subclasses use a more specific flag (DAF_YOMI, NACH_YOMI, MISHNA_YOMI, YERUSHALMI_YOMI) instead.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    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

    Accessors

    • get category(): string | undefined

      Category name used as the location field in iCalendar event feeds. Subclasses override this with their calendar's display name (e.g. "Daf Yomi", "Daily Rambam", "929").

      Returns string | undefined

    Methods

    • 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'
    • 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']
    • Hebrew date of this event

      Returns HDate

    • 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

    • Bitmask of optional event flags. See flags

      Returns number

    • Gregorian date of this event

      Returns Date

    • 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
    • Returns (translated) description of this event

      Parameters

      • Optionallocale: string

        Optional locale name (defaults to empty locale)

      Returns string

      const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
      ev.render('en'); // 'Shavuot'
      ev.render('he'); // 'שָׁבוּעוֹת'
      ev.render('ashkenazi'); // 'Shavuos'
    • Returns a brief (translated) description of this event.

      For most events this is the same as render. Some subclasses (e.g. CandleLightingEvent, HavdalahEvent, OmerEvent) produce shorter text without an attached time or extra qualifier — useful for compact UI display.

      Parameters

      • Optionallocale: string

        Optional locale name (defaults to empty locale)

      Returns string

      import {CandleLightingEvent} from '@hebcal/core';
      // For a regular Event, renderBrief() == render():
      const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
      ev.renderBrief('en'); // 'Shavuot'
    • 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.

      Returns string | undefined