@hebcal/core
    Preparing search index...

    Class DailyLearning

    Plug-in registry for daily learning calendars such as Daf Yomi (Bavli), Yerushalmi Yomi, Mishna Yomi, Nach Yomi, etc.

    @hebcal/core itself contains no learning schedules — they are provided by the @hebcal/learning package, which calls DailyLearning.addCalendar on import. After @hebcal/learning is loaded, HebrewCalendar.calendar() will emit learning events when the corresponding options.dailyLearning flag is set.

    import '@hebcal/learning';
    import {DailyLearning, HDate} from '@hebcal/core';

    const ev = DailyLearning.lookup('dafYomi', new HDate(), false);
    console.log(ev?.render('en')); // e.g. 'Berakhot 2'
    Index

    Constructors

    Methods

    • Registers a new learning calendar.

      The provided function is called whenever a caller asks for an event from this calendar; if no learning occurs that day (e.g. the date is before the cycle's start) it should return null.

      Parameters

      • name: string

        case insensitive

      • calendar: (hd: HDate, il: boolean) => Event | null

        a function that returns an Event or null

      • OptionalstartDate: HDate

        the first date for which this calendar is valid

      Returns void

      DailyLearning.addCalendar(
      'myCalendar',
      (hd, il) => new Event(hd, 'Today\'s learning', 0),
      new HDate(1, 'Tishrei', 5780),
      );
    • Returns the (lower-cased) names of all currently-registered learning calendars.

      Returns string[]

    • Returns the first Hebrew date for which the named learning calendar is valid (as registered by addCalendar), or undefined if the calendar was not registered with a start date or is not registered at all.

      Parameters

      • name: string

        case insensitive

      Returns HDate | undefined

    • Returns true if a learning calendar with the given name has been registered via addCalendar.

      Parameters

      • name: string

        case insensitive

      Returns boolean

    • Returns the learning event for the given date from the named calendar, or null if there is no learning that day (or the named calendar is not registered).

      Parameters

      • name: string

        case insensitive

      • hd: HDate

        Hebrew Date

      • il: boolean

        true for Israel, false for Diaspora

      Returns Event | null

      import '@hebcal/learning';
      import {DailyLearning, HDate} from '@hebcal/core';
      DailyLearning.lookup('dafYomi', new HDate(2024, 1, 15), false);