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()– useSedra.lookup().parshaSedra.getString()– usenew ParshaEvent(Sedra.lookup()).render()Sedra.isParsha()– use!Sedra.lookup().chagLocale.useLocale()– removed concept of global “active” localeLocale.getLocaleName()– removed concept of global “active” locale
Full API documentation is at hebcal.github.io/api/core/