@hebcal/core
    Preparing search index...

    Function getSedra

    • Convenience function to create an instance of Sedra or reuse a previously created and cached instance for the same year and schedule.

      Prefer this over new Sedra(...) when calling repeatedly — an internal LRU cache (~120 entries) avoids recomputing the keviyah-specific schedule.

      Parameters

      • hyear: number

        Hebrew year

      • il: boolean

        Use Israel sedra schedule (false for Diaspora)

      Returns Sedra

      import {getSedra, HDate, months} from '@hebcal/core';
      const sedra = getSedra(5784, false);
      const {parsha} = sedra.lookup(new HDate(15, months.CHESHVAN, 5784));
      console.log(parsha); // ['Lech-Lecha']