Skip to main content

@hebcal/core 6.0.0 release

We’re pleased to announce a major update to @hebcal/core, our TypeScript implementation of perpetual Jewish Calendar with holidays, Shabbat and holiday candle lighting and havdalah times, Torah readings, and more. The library targets both browser-based JavaScript and server-side Node.js.

Version 6.0.0 is a breaking change which removes support for CommonJS and Node.js 16.x, and includes the following small API changes:

1. ParshaEvent constructor now takes a single SedraResult argument.

Change this:

    const parsha = sedra.lookup(hdate);
    if (!parsha.chag) {
      const pe = new ParshaEvent(hdate, parsha.parsha, il, parsha.num);
    }

To this:

    const parsha = sedra.lookup(hdate);
    if (!parsha.chag) {
      const pe = new ParshaEvent(parsha);
    }


2. We have remove deprecated APIs:

  • Event.clone()
  • HolidayEvent.clone()
  • Sedra.get() – use Sedra.lookup().parsha
  • Sedra.getString() – use new ParshaEvent(Sedra.lookup()).render()
  • Sedra.isParsha() – use !Sedra.lookup().chag
  • Locale.useLocale() – removed concept of global “active” locale
  • Locale.getLocaleName() – removed concept of global “active” locale

Full API documentation is at hebcal.github.io/api/core/