@hebcal/core 6.15.0 → 6.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/bundle.js +106 -54
  2. package/dist/bundle.js.map +1 -1
  3. package/dist/bundle.min.js +5 -5
  4. package/dist/bundle.min.js.map +1 -1
  5. package/dist/esm/DailyLearning.js +1 -1
  6. package/dist/esm/HebrewDateEvent.js +1 -1
  7. package/dist/esm/HolidayEvent.d.ts +1 -1
  8. package/dist/esm/HolidayEvent.js +3 -3
  9. package/dist/esm/HolidayEvent.js.map +1 -1
  10. package/dist/esm/KiddushLevanaEvent.js +1 -1
  11. package/dist/esm/MevarchimChodeshEvent.js +1 -1
  12. package/dist/esm/ParshaEvent.js +2 -2
  13. package/dist/esm/ParshaEvent.js.map +1 -1
  14. package/dist/esm/TimedEvent.js +1 -1
  15. package/dist/esm/YomKippurKatanEvent.js +1 -1
  16. package/dist/esm/ashkenazi.po.js +1 -1
  17. package/dist/esm/calendar.js +1 -1
  18. package/dist/esm/candles.js +1 -1
  19. package/dist/esm/cities.json.js +1 -1
  20. package/dist/esm/event.js +1 -1
  21. package/dist/esm/getStartAndEnd.js +1 -1
  22. package/dist/esm/hallel.d.ts +26 -3
  23. package/dist/esm/hallel.js +86 -29
  24. package/dist/esm/hallel.js.map +1 -1
  25. package/dist/esm/he-x-NoNikud.po.js +1 -1
  26. package/dist/esm/he.po.js +1 -1
  27. package/dist/esm/hebcal.d.ts +3 -9
  28. package/dist/esm/hebcal.js +6 -16
  29. package/dist/esm/hebcal.js.map +1 -1
  30. package/dist/esm/holidays.js +1 -1
  31. package/dist/esm/horizon.js +1 -1
  32. package/dist/esm/index.d.ts +1 -0
  33. package/dist/esm/index.js +2 -1
  34. package/dist/esm/index.js.map +1 -1
  35. package/dist/esm/isAssurBemlacha.js +1 -1
  36. package/dist/esm/isAveilut.js +1 -1
  37. package/dist/esm/isFastDay.js +1 -1
  38. package/dist/esm/locale.js +1 -1
  39. package/dist/esm/location.js +1 -1
  40. package/dist/esm/modern.js +1 -1
  41. package/dist/esm/molad.js +1 -1
  42. package/dist/esm/moladBase.js +1 -1
  43. package/dist/esm/moladDate.js +1 -1
  44. package/dist/esm/omer.d.ts +4 -0
  45. package/dist/esm/omer.js +6 -2
  46. package/dist/esm/omer.js.map +1 -1
  47. package/dist/esm/parshaName.js +1 -1
  48. package/dist/esm/parshaYear.js +1 -1
  49. package/dist/esm/pkgVersion.d.ts +1 -1
  50. package/dist/esm/pkgVersion.js +2 -2
  51. package/dist/esm/pkgVersion.js.map +1 -1
  52. package/dist/esm/reformatTimeStr.js +1 -1
  53. package/dist/esm/sedra.js +1 -1
  54. package/dist/esm/sefira.json.js +1 -1
  55. package/dist/esm/staticHolidays.js +1 -1
  56. package/dist/esm/string.js +1 -1
  57. package/dist/esm/tachanun.js +1 -1
  58. package/dist/esm/zenith.js +1 -1
  59. package/dist/esm/zmanim.js +1 -1
  60. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"hebcal.js","sources":["../../../src/hebcal.ts"],"sourcesContent":["/*\n Hebcal - A Jewish Calendar Generator\n Copyright (c) 1994-2020 Danny Sadinoff\n Portions copyright Eyal Schachter and Michael J. Radwin\n\n https://github.com/hebcal/hebcal-es6\n\n This program is free software; you can redistribute it and/or\n modify it under the terms of the GNU General Public License\n as published by the Free Software Foundation; either version 2\n of the License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {birthdayOrAnniversary, yahrzeit, HDate} from '@hebcal/hdate';\nimport './locale.js'; // Adds Hebrew and Ashkenazic translations\nimport {CalOptions} from './CalOptions.js';\nimport {version as pkgVersion} from './pkgVersion.js';\nimport {Event} from './event.js';\nimport {Sedra, getSedra} from './sedra.js';\nimport {hallel_} from './hallel.js';\nimport {\n getHolidaysForYear_,\n getHolidaysForYearArray,\n getHolidaysOnDate,\n HolidayYearMap,\n} from './holidays.js';\nimport {HolidayEvent} from './HolidayEvent.js';\nimport {reformatTimeStr} from './reformatTimeStr.js';\nimport {TachanunResult, tachanun} from './tachanun.js';\nimport {calendar} from './calendar.js';\n\n/**\n * HebrewCalendar is the main interface to the `@hebcal/core` library.\n * This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,\n * Parashat HaShavua, Daf Yomi, days of the omer, and the molad.\n * Event names can be rendered in several languges using the `locale` option.\n */\nexport class HebrewCalendar {\n private constructor() {}\n /**\n * Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.\n *\n * Each holiday is represented by an {@link Event} object which includes a date,\n * a description, flags and optional attributes.\n * If given no options, returns holidays for the Diaspora for the current Gregorian year.\n *\n * This is a convenience wrapper around the standalone {@link calendar} function.\n * See {@link calendar} for the complete list of supported options, the\n * candle-lighting and Havdalah defaults, and notes on locales.\n *\n * @example\n * import {HebrewCalendar, Location} from '@hebcal/core';\n * const options: CalOptions = {\n * year: 1981,\n * isHebrewYear: false,\n * candlelighting: true,\n * location: Location.lookup('San Francisco'),\n * sedrot: true,\n * omer: true,\n * };\n * const events = HebrewCalendar.calendar(options);\n * for (const ev of events) {\n * const hd = ev.getDate();\n * const date = hd.greg();\n * console.log(date.toLocaleDateString(), ev.render('en'), hd.toString());\n * }\n */\n static calendar(options: CalOptions = {}): Event[] {\n return calendar(options);\n }\n\n /**\n * Calculates a birthday or anniversary (non-yahrzeit).\n * Returns `undefined` when `hyear` precedes the original year of `gdate`.\n *\n * When `hyear` is the original year, the original date is returned unchanged —\n * a \"0th birthday\" is a meaningful thing to ask for. This differs from\n * {@link getYahrzeit}, which returns `undefined` for the original year,\n * because a yahrzeit only has meaning from the first anniversary onward.\n *\n * Hebcal uses the algorithm defined in \"Calendrical Calculations\"\n * by Edward M. Reingold and Nachum Dershowitz.\n *\n * The birthday of someone born in Adar of an ordinary year or Adar II of\n * a leap year is also always in the last month of the year, be that Adar\n * or Adar II. The birthday in an ordinary year of someone born during the\n * first 29 days of Adar I in a leap year is on the corresponding day of Adar;\n * in a leap year, the birthday occurs in Adar I, as expected.\n *\n * Someone born on the thirtieth day of Marcheshvan, Kislev, or Adar I\n * has his birthday postponed until the first of the following month in\n * years where that day does not occur. [Calendrical Calculations p. 111]\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'\n * const hd = HebrewCalendar.getBirthdayOrAnniversary(5780, dt); // '1 Nisan 5780'\n * console.log(hd.greg().toLocaleDateString('en-US')); // '3/26/2020'\n * @param hyear Hebrew year\n * @param gdate Gregorian or Hebrew date of event\n * @returns anniversary occurring in `hyear`\n */\n static getBirthdayOrAnniversary(\n hyear: number,\n gdate: Date | HDate\n ): HDate | undefined {\n return birthdayOrAnniversary(hyear, gdate);\n }\n\n /**\n * Calculates yahrzeit.\n * `hyear` must be after original `gdate` of death.\n * Returns `undefined` when requested year preceeds or is same as original year.\n *\n * Hebcal uses the algorithm defined in \"Calendrical Calculations\"\n * by Edward M. Reingold and Nachum Dershowitz.\n *\n * The customary anniversary date of a death is more complicated and depends\n * also on the character of the year in which the first anniversary occurs.\n * There are several cases:\n *\n * * If the date of death is Marcheshvan 30, the anniversary in general depends\n * on the first anniversary; if that first anniversary was not Marcheshvan 30,\n * use the day before Kislev 1.\n * * If the date of death is Kislev 30, the anniversary in general again depends\n * on the first anniversary — if that was not Kislev 30, use the day before\n * Tevet 1.\n * * If the date of death is Adar II, the anniversary is the same day in the\n * last month of the Hebrew year (Adar or Adar II).\n * * If the date of death is Adar I 30, the anniversary in a Hebrew year that\n * is not a leap year (in which Adar only has 29 days) is the last day in\n * Shevat.\n * * In all other cases, use the normal (that is, same month number) anniversary\n * of the date of death. [Calendrical Calculations p. 113]\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'\n * const hd = HebrewCalendar.getYahrzeit(5780, dt); // '30 Sh\\'vat 5780'\n * console.log(hd.greg().toLocaleDateString('en-US')); // '2/25/2020'\n * @param hyear Hebrew year\n * @param gdate Gregorian or Hebrew date of death\n * @returns anniversary occurring in hyear\n */\n static getYahrzeit(hyear: number, gdate: Date | HDate): HDate | undefined {\n return yahrzeit(hyear, gdate);\n }\n\n /**\n * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by\n * `HDate.toString()`. These events are not filtered by Israel vs. Diaspora\n * holiday scheme; use {@link Event.observedIn} to do that.\n *\n * Includes Rosh Chodesh, fasts, Yom Kippur Katan, Special Shabbatot, etc.,\n * but does not generate candle-lighting times, Torah readings, or Omer days.\n * The result is cached in an internal LRU.\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * const map = HebrewCalendar.getHolidaysForYear(5784);\n * for (const [hdStr, events] of map.entries()) {\n * for (const ev of events) {\n * console.log(hdStr, ev.getDesc());\n * }\n * }\n * @param year Hebrew year\n */\n static getHolidaysForYear(year: number): HolidayYearMap {\n return getHolidaysForYear_(year);\n }\n\n /**\n * Returns a sorted array of holidays observed during the given Hebrew year.\n *\n * Events are pre-filtered by Israel vs. Diaspora schedule, so callers do not\n * need to inspect `flags.IL_ONLY` / `flags.CHUL_ONLY` themselves.\n * Includes Rosh Chodesh, fasts, modern holidays, special Shabbatot, etc.,\n * but does not generate candle-lighting times, Torah readings, or Omer days.\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * const events = HebrewCalendar.getHolidaysForYearArray(5784, false);\n * console.log(events[0].getDesc()); // 'Rosh Hashana 5784'\n * @param year Hebrew year\n * @param il use the Israeli schedule for holidays\n */\n static getHolidaysForYearArray(year: number, il: boolean): HolidayEvent[] {\n return getHolidaysForYearArray(year, il);\n }\n\n /**\n * Returns an array of holiday Events that occur on the given date,\n * or `undefined` if no holidays occur that day.\n *\n * When `il` is omitted, both Diaspora-only and Israel-only events are\n * returned; pass `true` or `false` to filter to a single schedule.\n * @example\n * import {HebrewCalendar, HDate, months} from '@hebcal/core';\n * const hd = new HDate(15, months.NISAN, 5784);\n * const events = HebrewCalendar.getHolidaysOnDate(hd, false);\n * console.log(events?.map(ev => ev.getDesc())); // ['Pesach I']\n * @param date Hebrew Date, Gregorian date, or absolute R.D. day number\n * @param [il] use the Israeli schedule for holidays\n */\n static getHolidaysOnDate(\n date: HDate | Date | number,\n il?: boolean\n ): HolidayEvent[] | undefined {\n return getHolidaysOnDate(date, il);\n }\n\n /**\n * Returns `true` if Eruv Tavshilin should be prepared on the given date.\n *\n * Eruv Tavshilin is prepared when a Yom Tov falls on Friday (so cooking\n * for Shabbat that begins Friday night may continue from Yom Tov into\n * Shabbat). This requires the day before to be a weekday (Wednesday or\n * Thursday), the following Friday to be Yom Tov, and the day after Friday\n * (Shabbat) to also be a sacred day.\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * // Wednesday October 16, 2024 is Erev Sukkot 5785. In the Diaspora,\n * // Sukkot I falls on Thursday and Sukkot II on Friday, so Eruv\n * // Tavshilin is prepared on Wednesday:\n * HebrewCalendar.eruvTavshilin(new Date(2024, 9, 16), false); // true\n * // In Israel there is only one day of Yom Tov, so Friday is a weekday:\n * HebrewCalendar.eruvTavshilin(new Date(2024, 9, 16), true); // false\n * @param date Gregorian or Hebrew date to test\n * @param il use the Israeli holiday schedule\n */\n static eruvTavshilin(date: Date | HDate, il: boolean): boolean {\n const dow = date.getDay();\n if (dow < 3 || dow > 4) {\n return false;\n }\n const today = new HDate(date);\n const friday = today.after(5);\n const tomorrow = today.next();\n return isChag(friday, il) && !isChag(today, il) && isChag(tomorrow, il);\n }\n\n /**\n * Helper function to format a 24-hour (00:00-23:59) time string in either\n * 12-hour US format (e.g. `\"8:13pm\"`) or keep it in 24-hour format (e.g.\n * `\"20:13\"`) for any other locale or country.\n *\n * The locale (and therefore default behavior) is derived from\n * `options.location` / `options.locale`. The `options.hour12` override\n * takes precedence: if `false`, locale is ignored and the result is always\n * 24-hour; if `true`, locale is ignored and the result is always 12-hour.\n * @example\n * import {HebrewCalendar, Location} from '@hebcal/core';\n * const opts = {location: Location.lookup('Chicago')};\n * HebrewCalendar.reformatTimeStr('20:30', 'pm', opts); // '8:30pm'\n * HebrewCalendar.reformatTimeStr('20:30', 'pm', {hour12: false}); // '20:30'\n * @param timeStr - original time like \"20:30\"\n * @param suffix - \"p\" or \"pm\" or \" P.M.\". Add leading space if you want it\n * @param options optional; `location`, `locale` and `hour12` are consulted\n */\n static reformatTimeStr(\n timeStr: string,\n suffix: string,\n options?: CalOptions\n ): string {\n return reformatTimeStr(timeStr, suffix, options);\n }\n\n /**\n * Returns the semantic version string of the `@hebcal/core` package\n * (e.g. `\"6.8.2\"`). Useful for logging or feature detection.\n */\n static version(): string {\n return pkgVersion;\n }\n\n /**\n * Convenience function to create an instance of {@link Sedra} or reuse a\n * previously created and cached instance for the same year + schedule.\n *\n * Use this in preference to `new Sedra(...)` when calling repeatedly,\n * since an internal LRU cache (~120 entries) avoids recomputing the\n * keviyah-specific reading pattern.\n * @example\n * import {HebrewCalendar, HDate} from '@hebcal/core';\n * const sedra = HebrewCalendar.getSedra(5784, false);\n * const result = sedra.lookup(new HDate(15, 'Cheshvan', 5784));\n * console.log(result.parsha); // ['Vayera']\n * @param hyear Hebrew year\n * @param il Use Israel sedra schedule (`false` for Diaspora)\n */\n static getSedra(hyear: number, il: boolean): Sedra {\n return getSedra(hyear, il);\n }\n\n /**\n * Determines which form of Hallel (if any) is recited\n * on a given Hebrew date.\n *\n * Returns 0 (none), 1 (half Hallel), or 2 (whole Hallel).\n *\n * Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,\n * Yom Ha'atzmaut, and Yom Yerushalayim.\n *\n * Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.\n * @example\n * import {HebrewCalendar, HDate, months} from '@hebcal/core';\n * HebrewCalendar.hallel(new HDate(25, months.KISLEV, 5784), false); // 2 (Chanukah)\n * HebrewCalendar.hallel(new HDate(1, months.SHVAT, 5784), false); // 1 (Rosh Chodesh)\n * HebrewCalendar.hallel(new HDate(2, months.SHVAT, 5784), false); // 0\n * @param hdate Hebrew date to test\n * @param il use the Israeli holiday schedule\n * @returns 0 for no Hallel, 1 for half Hallel, 2 for whole Hallel\n */\n static hallel(hdate: HDate, il: boolean): number {\n const events = getHolidaysOnDate(hdate, il);\n if (!events) {\n return 0;\n }\n return hallel_(events, hdate);\n }\n\n /**\n * Return details on what Tachanun (or Tzidchatcha on Shabbat) is said on `hdate`.\n *\n * Tachanun is not said on Rosh Chodesh, the month of Nisan, Lag Baomer,\n * Rosh Chodesh Sivan until Isru Chag, Tisha B'av, 15 Av, Erev Rosh Hashanah,\n * Rosh Hashanah, Erev Yom Kippur until after Simchat Torah, Chanukah,\n * Tu B'shvat, Purim and Shushan Purim, and Purim and Shushan Purim Katan.\n *\n * In some congregations Tachanun is not said until from Rosh Chodesh Sivan\n * until 14th Sivan, Sukkot until after Rosh Chodesh Cheshvan, Pesach Sheini,\n * Yom Ha'atzmaut, and Yom Yerushalayim.\n *\n * Tachanun is not said at Mincha on days before it is not said at Shacharit.\n *\n * Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.\n * @example\n * import {HebrewCalendar, HDate, months} from '@hebcal/core';\n * // Regular weekday — Tachanun is said at both services\n * HebrewCalendar.tachanun(new HDate(4, months.SHVAT, 5784), false);\n * // => { shacharit: true, mincha: true, allCongs: true }\n *\n * // Friday 2 Sh'vat — said at Shacharit, but not at Mincha (erev Shabbat)\n * HebrewCalendar.tachanun(new HDate(2, months.SHVAT, 5784), false);\n * // => { shacharit: true, mincha: false, allCongs: true }\n *\n * // Rosh Chodesh — no Tachanun\n * HebrewCalendar.tachanun(new HDate(1, months.SHVAT, 5784), false);\n * // => { shacharit: false, mincha: false, allCongs: false }\n * @param hdate Hebrew date to test\n * @param il use the Israeli holiday schedule\n */\n static tachanun(hdate: HDate, il: boolean): TachanunResult {\n return tachanun(hdate, il);\n }\n}\n\nfunction isChag(date: HDate, il: boolean): boolean {\n const events = getHolidaysOnDate(date, il) ?? [];\n return events.some(ev => ev.hasFlag('CHAG'));\n}\n"],"names":["pkgVersion"],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AAoBH;;;;;AAKG;MACU,cAAc,CAAA;AACzB,IAAA,WAAA,GAAA,EAAuB;AACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACH,IAAA,OAAO,QAAQ,CAAC,OAAA,GAAsB,EAAE,EAAA;AACtC,QAAA,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC1B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AACH,IAAA,OAAO,wBAAwB,CAC7B,KAAa,EACb,KAAmB,EAAA;AAEnB,QAAA,OAAO,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC;IAC5C;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACH,IAAA,OAAO,WAAW,CAAC,KAAa,EAAE,KAAmB,EAAA;AACnD,QAAA,OAAO,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAC/B;AAEA;;;;;;;;;;;;;;;;;AAiBG;IACH,OAAO,kBAAkB,CAAC,IAAY,EAAA;AACpC,QAAA,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAClC;AAEA;;;;;;;;;;;;;AAaG;AACH,IAAA,OAAO,uBAAuB,CAAC,IAAY,EAAE,EAAW,EAAA;AACtD,QAAA,OAAO,uBAAuB,CAAC,IAAI,EAAE,EAAE,CAAC;IAC1C;AAEA;;;;;;;;;;;;;AAaG;AACH,IAAA,OAAO,iBAAiB,CACtB,IAA2B,EAC3B,EAAY,EAAA;AAEZ,QAAA,OAAO,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC;IACpC;AAEA;;;;;;;;;;;;;;;;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H,IAAA,OAAO,QAAQ,CAAC,KAAY,EAAE,EAAW,EAAA;AACvC,QAAA,OAAO,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;IAC5B;AACD;AAED,SAAS,MAAM,CAAC,IAAW,EAAE,EAAW,EAAA;IACtC,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;AAChD,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9C;;"}
1
+ {"version":3,"file":"hebcal.js","sources":["../../../src/hebcal.ts"],"sourcesContent":["/*\n Hebcal - A Jewish Calendar Generator\n Copyright (c) 1994-2020 Danny Sadinoff\n Portions copyright Eyal Schachter and Michael J. Radwin\n\n https://github.com/hebcal/hebcal-es6\n\n This program is free software; you can redistribute it and/or\n modify it under the terms of the GNU General Public License\n as published by the Free Software Foundation; either version 2\n of the License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {birthdayOrAnniversary, yahrzeit, HDate} from '@hebcal/hdate';\nimport './locale.js'; // Adds Hebrew and Ashkenazic translations\nimport {CalOptions} from './CalOptions.js';\nimport {version as pkgVersion} from './pkgVersion.js';\nimport {Event} from './event.js';\nimport {Sedra, getSedra} from './sedra.js';\nimport {hallel} from './hallel.js';\nimport {\n getHolidaysForYear_,\n getHolidaysForYearArray,\n getHolidaysOnDate,\n HolidayYearMap,\n} from './holidays.js';\nimport {HolidayEvent} from './HolidayEvent.js';\nimport {reformatTimeStr} from './reformatTimeStr.js';\nimport {TachanunResult, tachanun} from './tachanun.js';\nimport {calendar} from './calendar.js';\n\n/**\n * HebrewCalendar is the main interface to the `@hebcal/core` library.\n * This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,\n * Parashat HaShavua, Daf Yomi, days of the omer, and the molad.\n * Event names can be rendered in several languges using the `locale` option.\n */\nexport class HebrewCalendar {\n private constructor() {}\n /**\n * Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.\n *\n * Each holiday is represented by an {@link Event} object which includes a date,\n * a description, flags and optional attributes.\n * If given no options, returns holidays for the Diaspora for the current Gregorian year.\n *\n * This is a convenience wrapper around the standalone {@link calendar} function.\n * See {@link calendar} for the complete list of supported options, the\n * candle-lighting and Havdalah defaults, and notes on locales.\n *\n * @example\n * import {HebrewCalendar, Location} from '@hebcal/core';\n * const options: CalOptions = {\n * year: 1981,\n * isHebrewYear: false,\n * candlelighting: true,\n * location: Location.lookup('San Francisco'),\n * sedrot: true,\n * omer: true,\n * };\n * const events = HebrewCalendar.calendar(options);\n * for (const ev of events) {\n * const hd = ev.getDate();\n * const date = hd.greg();\n * console.log(date.toLocaleDateString(), ev.render('en'), hd.toString());\n * }\n */\n static calendar(options: CalOptions = {}): Event[] {\n return calendar(options);\n }\n\n /**\n * Calculates a birthday or anniversary (non-yahrzeit).\n * Returns `undefined` when `hyear` precedes the original year of `gdate`.\n *\n * When `hyear` is the original year, the original date is returned unchanged —\n * a \"0th birthday\" is a meaningful thing to ask for. This differs from\n * {@link getYahrzeit}, which returns `undefined` for the original year,\n * because a yahrzeit only has meaning from the first anniversary onward.\n *\n * Hebcal uses the algorithm defined in \"Calendrical Calculations\"\n * by Edward M. Reingold and Nachum Dershowitz.\n *\n * The birthday of someone born in Adar of an ordinary year or Adar II of\n * a leap year is also always in the last month of the year, be that Adar\n * or Adar II. The birthday in an ordinary year of someone born during the\n * first 29 days of Adar I in a leap year is on the corresponding day of Adar;\n * in a leap year, the birthday occurs in Adar I, as expected.\n *\n * Someone born on the thirtieth day of Marcheshvan, Kislev, or Adar I\n * has his birthday postponed until the first of the following month in\n * years where that day does not occur. [Calendrical Calculations p. 111]\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'\n * const hd = HebrewCalendar.getBirthdayOrAnniversary(5780, dt); // '1 Nisan 5780'\n * console.log(hd.greg().toLocaleDateString('en-US')); // '3/26/2020'\n * @param hyear Hebrew year\n * @param gdate Gregorian or Hebrew date of event\n * @returns anniversary occurring in `hyear`\n */\n static getBirthdayOrAnniversary(\n hyear: number,\n gdate: Date | HDate\n ): HDate | undefined {\n return birthdayOrAnniversary(hyear, gdate);\n }\n\n /**\n * Calculates yahrzeit.\n * `hyear` must be after original `gdate` of death.\n * Returns `undefined` when requested year preceeds or is same as original year.\n *\n * Hebcal uses the algorithm defined in \"Calendrical Calculations\"\n * by Edward M. Reingold and Nachum Dershowitz.\n *\n * The customary anniversary date of a death is more complicated and depends\n * also on the character of the year in which the first anniversary occurs.\n * There are several cases:\n *\n * * If the date of death is Marcheshvan 30, the anniversary in general depends\n * on the first anniversary; if that first anniversary was not Marcheshvan 30,\n * use the day before Kislev 1.\n * * If the date of death is Kislev 30, the anniversary in general again depends\n * on the first anniversary — if that was not Kislev 30, use the day before\n * Tevet 1.\n * * If the date of death is Adar II, the anniversary is the same day in the\n * last month of the Hebrew year (Adar or Adar II).\n * * If the date of death is Adar I 30, the anniversary in a Hebrew year that\n * is not a leap year (in which Adar only has 29 days) is the last day in\n * Shevat.\n * * In all other cases, use the normal (that is, same month number) anniversary\n * of the date of death. [Calendrical Calculations p. 113]\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'\n * const hd = HebrewCalendar.getYahrzeit(5780, dt); // '30 Sh\\'vat 5780'\n * console.log(hd.greg().toLocaleDateString('en-US')); // '2/25/2020'\n * @param hyear Hebrew year\n * @param gdate Gregorian or Hebrew date of death\n * @returns anniversary occurring in hyear\n */\n static getYahrzeit(hyear: number, gdate: Date | HDate): HDate | undefined {\n return yahrzeit(hyear, gdate);\n }\n\n /**\n * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by\n * `HDate.toString()`. These events are not filtered by Israel vs. Diaspora\n * holiday scheme; use {@link Event.observedIn} to do that.\n *\n * Includes Rosh Chodesh, fasts, Yom Kippur Katan, Special Shabbatot, etc.,\n * but does not generate candle-lighting times, Torah readings, or Omer days.\n * The result is cached in an internal LRU.\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * const map = HebrewCalendar.getHolidaysForYear(5784);\n * for (const [hdStr, events] of map.entries()) {\n * for (const ev of events) {\n * console.log(hdStr, ev.getDesc());\n * }\n * }\n * @param year Hebrew year\n */\n static getHolidaysForYear(year: number): HolidayYearMap {\n return getHolidaysForYear_(year);\n }\n\n /**\n * Returns a sorted array of holidays observed during the given Hebrew year.\n *\n * Events are pre-filtered by Israel vs. Diaspora schedule, so callers do not\n * need to inspect `flags.IL_ONLY` / `flags.CHUL_ONLY` themselves.\n * Includes Rosh Chodesh, fasts, modern holidays, special Shabbatot, etc.,\n * but does not generate candle-lighting times, Torah readings, or Omer days.\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * const events = HebrewCalendar.getHolidaysForYearArray(5784, false);\n * console.log(events[0].getDesc()); // 'Rosh Hashana 5784'\n * @param year Hebrew year\n * @param il use the Israeli schedule for holidays\n */\n static getHolidaysForYearArray(year: number, il: boolean): HolidayEvent[] {\n return getHolidaysForYearArray(year, il);\n }\n\n /**\n * Returns an array of holiday Events that occur on the given date,\n * or `undefined` if no holidays occur that day.\n *\n * When `il` is omitted, both Diaspora-only and Israel-only events are\n * returned; pass `true` or `false` to filter to a single schedule.\n * @example\n * import {HebrewCalendar, HDate, months} from '@hebcal/core';\n * const hd = new HDate(15, months.NISAN, 5784);\n * const events = HebrewCalendar.getHolidaysOnDate(hd, false);\n * console.log(events?.map(ev => ev.getDesc())); // ['Pesach I']\n * @param date Hebrew Date, Gregorian date, or absolute R.D. day number\n * @param [il] use the Israeli schedule for holidays\n */\n static getHolidaysOnDate(\n date: HDate | Date | number,\n il?: boolean\n ): HolidayEvent[] | undefined {\n return getHolidaysOnDate(date, il);\n }\n\n /**\n * Returns `true` if Eruv Tavshilin should be prepared on the given date.\n *\n * Eruv Tavshilin is prepared when a Yom Tov falls on Friday (so cooking\n * for Shabbat that begins Friday night may continue from Yom Tov into\n * Shabbat). This requires the day before to be a weekday (Wednesday or\n * Thursday), the following Friday to be Yom Tov, and the day after Friday\n * (Shabbat) to also be a sacred day.\n * @example\n * import {HebrewCalendar} from '@hebcal/core';\n * // Wednesday October 16, 2024 is Erev Sukkot 5785. In the Diaspora,\n * // Sukkot I falls on Thursday and Sukkot II on Friday, so Eruv\n * // Tavshilin is prepared on Wednesday:\n * HebrewCalendar.eruvTavshilin(new Date(2024, 9, 16), false); // true\n * // In Israel there is only one day of Yom Tov, so Friday is a weekday:\n * HebrewCalendar.eruvTavshilin(new Date(2024, 9, 16), true); // false\n * @param date Gregorian or Hebrew date to test\n * @param il use the Israeli holiday schedule\n */\n static eruvTavshilin(date: Date | HDate, il: boolean): boolean {\n const dow = date.getDay();\n if (dow < 3 || dow > 4) {\n return false;\n }\n const today = new HDate(date);\n const friday = today.after(5);\n const tomorrow = today.next();\n return isChag(friday, il) && !isChag(today, il) && isChag(tomorrow, il);\n }\n\n /**\n * Helper function to format a 24-hour (00:00-23:59) time string in either\n * 12-hour US format (e.g. `\"8:13pm\"`) or keep it in 24-hour format (e.g.\n * `\"20:13\"`) for any other locale or country.\n *\n * The locale (and therefore default behavior) is derived from\n * `options.location` / `options.locale`. The `options.hour12` override\n * takes precedence: if `false`, locale is ignored and the result is always\n * 24-hour; if `true`, locale is ignored and the result is always 12-hour.\n * @example\n * import {HebrewCalendar, Location} from '@hebcal/core';\n * const opts = {location: Location.lookup('Chicago')};\n * HebrewCalendar.reformatTimeStr('20:30', 'pm', opts); // '8:30pm'\n * HebrewCalendar.reformatTimeStr('20:30', 'pm', {hour12: false}); // '20:30'\n * @param timeStr - original time like \"20:30\"\n * @param suffix - \"p\" or \"pm\" or \" P.M.\". Add leading space if you want it\n * @param options optional; `location`, `locale` and `hour12` are consulted\n */\n static reformatTimeStr(\n timeStr: string,\n suffix: string,\n options?: CalOptions\n ): string {\n return reformatTimeStr(timeStr, suffix, options);\n }\n\n /**\n * Returns the semantic version string of the `@hebcal/core` package\n * (e.g. `\"6.8.2\"`). Useful for logging or feature detection.\n */\n static version(): string {\n return pkgVersion;\n }\n\n /**\n * Convenience function to create an instance of {@link Sedra} or reuse a\n * previously created and cached instance for the same year + schedule.\n *\n * Use this in preference to `new Sedra(...)` when calling repeatedly,\n * since an internal LRU cache (~120 entries) avoids recomputing the\n * keviyah-specific reading pattern.\n * @example\n * import {HebrewCalendar, HDate} from '@hebcal/core';\n * const sedra = HebrewCalendar.getSedra(5784, false);\n * const result = sedra.lookup(new HDate(15, 'Cheshvan', 5784));\n * console.log(result.parsha); // ['Vayera']\n * @param hyear Hebrew year\n * @param il Use Israel sedra schedule (`false` for Diaspora)\n */\n static getSedra(hyear: number, il: boolean): Sedra {\n return getSedra(hyear, il);\n }\n\n /**\n * Determines which form of Hallel (if any) is recited on a given Hebrew date:\n * 0 (none), 1 (half Hallel), or 2 (whole Hallel).\n * See {@link hallel} for details.\n * @example\n * import {HebrewCalendar, HDate, months} from '@hebcal/core';\n * HebrewCalendar.hallel(new HDate(25, months.KISLEV, 5784), false); // 2 (Chanukah)\n * HebrewCalendar.hallel(new HDate(1, months.SHVAT, 5784), false); // 1 (Rosh Chodesh)\n * HebrewCalendar.hallel(new HDate(2, months.SHVAT, 5784), false); // 0\n * @param hdate Hebrew date to test\n * @param il use the Israeli holiday schedule\n * @returns 0 for no Hallel, 1 for half Hallel, 2 for whole Hallel\n */\n static hallel(hdate: HDate, il: boolean): number {\n return hallel(hdate, il);\n }\n\n /**\n * Return details on what Tachanun (or Tzidchatcha on Shabbat) is said on `hdate`.\n *\n * Tachanun is not said on Rosh Chodesh, the month of Nisan, Lag Baomer,\n * Rosh Chodesh Sivan until Isru Chag, Tisha B'av, 15 Av, Erev Rosh Hashanah,\n * Rosh Hashanah, Erev Yom Kippur until after Simchat Torah, Chanukah,\n * Tu B'shvat, Purim and Shushan Purim, and Purim and Shushan Purim Katan.\n *\n * In some congregations Tachanun is not said until from Rosh Chodesh Sivan\n * until 14th Sivan, Sukkot until after Rosh Chodesh Cheshvan, Pesach Sheini,\n * Yom Ha'atzmaut, and Yom Yerushalayim.\n *\n * Tachanun is not said at Mincha on days before it is not said at Shacharit.\n *\n * Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.\n * @example\n * import {HebrewCalendar, HDate, months} from '@hebcal/core';\n * // Regular weekday — Tachanun is said at both services\n * HebrewCalendar.tachanun(new HDate(4, months.SHVAT, 5784), false);\n * // => { shacharit: true, mincha: true, allCongs: true }\n *\n * // Friday 2 Sh'vat — said at Shacharit, but not at Mincha (erev Shabbat)\n * HebrewCalendar.tachanun(new HDate(2, months.SHVAT, 5784), false);\n * // => { shacharit: true, mincha: false, allCongs: true }\n *\n * // Rosh Chodesh — no Tachanun\n * HebrewCalendar.tachanun(new HDate(1, months.SHVAT, 5784), false);\n * // => { shacharit: false, mincha: false, allCongs: false }\n * @param hdate Hebrew date to test\n * @param il use the Israeli holiday schedule\n */\n static tachanun(hdate: HDate, il: boolean): TachanunResult {\n return tachanun(hdate, il);\n }\n}\n\nfunction isChag(date: HDate, il: boolean): boolean {\n const events = getHolidaysOnDate(date, il) ?? [];\n return events.some(ev => ev.hasFlag('CHAG'));\n}\n"],"names":["pkgVersion"],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AAoBH;;;;;AAKG;MACU,cAAc,CAAA;AACzB,IAAA,WAAA,GAAA,EAAuB;AACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACH,IAAA,OAAO,QAAQ,CAAC,OAAA,GAAsB,EAAE,EAAA;AACtC,QAAA,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC1B;AAEA;;;;;;;;;;;;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AAC,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;IACzE;AAEA;;;;;;;;;;;;;;;;;AAiBG;AACH,IAAA,OAAO,eAAe,CACpB,OAAe,EACf,MAAc,EACd,OAAoB,EAAA;QAEpB,OAAO,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;IAClD;AAEA;;;AAGG;AACH,IAAA,OAAO,OAAO,GAAA;AACZ,QAAA,OAAOA,OAAU;IACnB;AAEA;;;;;;;;;;;;;;AAcG;AACH,IAAA,OAAO,QAAQ,CAAC,KAAa,EAAE,EAAW,EAAA;AACxC,QAAA,OAAO,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;IAC5B;AAEA;;;;;;;;;;;;AAYG;AACH,IAAA,OAAO,MAAM,CAAC,KAAY,EAAE,EAAW,EAAA;AACrC,QAAA,OAAO,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;IAC1B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACH,IAAA,OAAO,QAAQ,CAAC,KAAY,EAAE,EAAW,EAAA;AACvC,QAAA,OAAO,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;IAC5B;AACD;AAED,SAAS,MAAM,CAAC,IAAW,EAAE,EAAW,EAAA;IACtC,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;AAChD,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9C;;"}
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { months, HDate } from '@hebcal/hdate';
3
3
  import QuickLRU from 'quick-lru';
4
4
  import { flags } from './event.js';
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  /**
3
3
  * Pure arithmetic for the "visible" sunrise/sunset (_netz ha-nireh_,
4
4
  * הנץ הנראה): resolving a caller-supplied terrain horizon profile, atmospheric
@@ -21,6 +21,7 @@ export { KiddushLevanaEvent } from './KiddushLevanaEvent.js';
21
21
  export type { KiddushLevanaAdjustment } from './KiddushLevanaEvent.js';
22
22
  export { OmerEvent, type OmerLang } from './omer.js';
23
23
  export { type TachanunResult, tachanun } from './tachanun.js';
24
+ export { hallel } from './hallel.js';
24
25
  export { Sedra, type SedraResult, type NumberOrString, parshiot, getSedra, } from './sedra.js';
25
26
  export { ParshaEvent } from './ParshaEvent.js';
26
27
  export { parshaYear } from './parshaYear.js';
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  export { version } from './pkgVersion.js';
3
3
  export { HDate, Locale, gematriya, gematriyaStrToNum, greg, months } from '@hebcal/hdate';
4
4
  import './locale.js';
@@ -18,6 +18,7 @@ export { Molad, MoladEvent } from './molad.js';
18
18
  export { KiddushLevanaEvent } from './KiddushLevanaEvent.js';
19
19
  export { OmerEvent } from './omer.js';
20
20
  export { tachanun } from './tachanun.js';
21
+ export { hallel } from './hallel.js';
21
22
  export { Sedra, getSedra, parshiot } from './sedra.js';
22
23
  export { ParshaEvent } from './ParshaEvent.js';
23
24
  export { parshaYear } from './parshaYear.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { getPseudoISO, HDate } from '@hebcal/hdate';
3
3
  import { Zmanim } from './zmanim.js';
4
4
  import { getHolidaysOnDate } from './holidays.js';
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { months, HDate } from '@hebcal/hdate';
3
3
 
4
4
  const { NISAN, SIVAN, TAMUZ, AV } = months;
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { getHolidaysOnDate } from './holidays.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { Locale } from '@hebcal/hdate';
3
3
  export { Locale } from '@hebcal/hdate';
4
4
  import poAshkenazi from './ashkenazi.po.js';
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { GeoLocation } from '@hebcal/noaa';
3
3
  import citiesJson from './cities.json.js';
4
4
  import QuickLRU from 'quick-lru';
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { months, HDate } from '@hebcal/hdate';
3
3
  import { flags } from './event.js';
4
4
  import { HolidayEvent } from './HolidayEvent.js';
package/dist/esm/molad.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import 'temporal-polyfill/global';
3
3
  import { Event, flags } from './event.js';
4
4
  import { HDate, Locale, pad2 } from '@hebcal/hdate';
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { HDate, isLeapYear } from '@hebcal/hdate';
3
3
 
4
4
  /*
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import 'temporal-polyfill/global';
3
3
  import QuickLRU from 'quick-lru';
4
4
 
@@ -92,6 +92,10 @@ export declare class OmerEvent extends Event {
92
92
  * when empty.
93
93
  */
94
94
  getTodayIs(locale: string): string;
95
+ /**
96
+ * Returns a `https://www.hebcal.com/omer/...` URL, or `undefined` for Hebrew
97
+ * years outside `[5513, 6260]` (roughly Gregorian 1752–2499).
98
+ */
95
99
  url(): string | undefined;
96
100
  /**
97
101
  * Returns the word from Psalm 67 (לַמְנַצֵּחַ, "Lamnatzeach") corresponding
package/dist/esm/omer.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { Locale, gematriya } from '@hebcal/hdate';
3
3
  import { Event, flags } from './event.js';
4
4
  import './locale.js';
@@ -333,9 +333,13 @@ class OmerEvent extends Event {
333
333
  }
334
334
  return str;
335
335
  }
336
+ /**
337
+ * Returns a `https://www.hebcal.com/omer/...` URL, or `undefined` for Hebrew
338
+ * years outside `[5513, 6260]` (roughly Gregorian 1752–2499).
339
+ */
336
340
  url() {
337
341
  const year = this.getDate().getFullYear();
338
- if (year < 5000 || year > 6759) {
342
+ if (year < 5513 || year > 6260) {
339
343
  return undefined;
340
344
  }
341
345
  return `https://www.hebcal.com/omer/${year}/${this.omer}`;
@@ -1 +1 @@
1
- {"version":3,"file":"omer.js","sources":["../../../src/omer.ts"],"sourcesContent":["import {HDate, Locale, gematriya} from '@hebcal/hdate';\nimport {Event, flags} from './event.js';\nimport './locale.js'; // Adds Hebrew and Ashkenazic translations\nimport sefira from './sefira.json.js';\n\n/**\n * Language for counting the Omer can be English or Hebrew.\n * Lang for the Sefira can be English, Hebrew, or Hebrew in Sephardic transliteration.\n */\nexport type OmerLang = 'en' | 'he' | 'translit';\n\nconst sefirot = {\n en: {\n infix: 'within ',\n infix26: 'within ',\n words: [\n '',\n 'Lovingkindness',\n 'Might',\n 'Beauty',\n 'Eternity',\n 'Splendor',\n 'Foundation',\n 'Majesty',\n ],\n pfxWords: null,\n },\n he: {\n infix: null,\n infix26: null,\n words: [\n '',\n 'חֶֽסֶד',\n 'גְּבוּרָה',\n 'תִּפְאֶֽרֶת',\n 'נֶּֽצַח',\n 'הוֹד',\n 'יְּסוֹד',\n 'מַלְכוּת',\n ],\n pfxWords: [\n '',\n 'שֶׁבְּחֶֽסֶד',\n 'שֶׁבִּגְבוּרָה',\n 'שֶׁבְּתִפְאֶֽרֶת',\n 'שֶׁבְּנֶֽצַח',\n 'שֶׁבְּהוֹד',\n 'שֶׁבִּיְסוֹד',\n 'שֶׁבְּמַלְכוּת',\n ],\n },\n translit: {\n infix: \"sheb'\",\n infix26: 'shebi',\n words: [\n '',\n 'Chesed',\n 'Gevurah',\n 'Tiferet',\n 'Netzach',\n 'Hod',\n 'Yesod',\n 'Malkhut',\n ],\n pfxWords: null,\n },\n} as const;\n\nfunction checkDay(omerDay: number): void {\n if (omerDay < 1 || omerDay > 49) {\n throw new RangeError(`Invalid Omer day ${omerDay}`);\n }\n}\n\nfunction getWeeks(omerDay: number): [number, number] {\n const weekNum = Math.floor((omerDay - 1) / 7) + 1;\n const daysWithinWeeks = omerDay % 7 || 7;\n return [weekNum, daysWithinWeeks];\n}\n\nfunction omerTodayIsEn(omerDay: number): string {\n const [weekNumber, daysWithinWeeks] = getWeeks(omerDay);\n\n const totalDaysStr = omerDay === 1 ? 'day' : 'days';\n let str = `Today is ${omerDay} ${totalDaysStr}`;\n\n if (weekNumber > 1 || omerDay === 7) {\n const day7 = daysWithinWeeks === 7;\n const numWeeks = day7 ? weekNumber : weekNumber - 1;\n const weeksStr = numWeeks === 1 ? 'week' : 'weeks';\n str += `, which are ${numWeeks} ${weeksStr}`;\n if (!day7) {\n const daysStr = daysWithinWeeks === 1 ? 'day' : 'days';\n str += ` and ${daysWithinWeeks} ${daysStr}`;\n }\n }\n return `${str} of the Omer`;\n}\n\n// adapted from pip hdate package (GPL)\n// https://github.com/py-libhdate/py-libhdate/blob/master/hdate/date.py\n\nconst tens = ['', 'עֲשָׂרָה', 'עֶשְׂרִים', 'שְׁלוֹשִׁים', 'אַרְבָּעִים'];\nconst ones = [\n '',\n 'אֶחָד',\n 'שְׁנַיִם',\n 'שְׁלוֹשָׁה',\n 'אַרְבָּעָה',\n 'חֲמִשָּׁה',\n 'שִׁשָּׁה',\n 'שִׁבְעָה',\n 'שְׁמוֹנָה',\n 'תִּשְׁעָה',\n];\n\nconst shnei = 'שְׁנֵי';\nconst yamim = 'יָמִים';\nconst shneiYamim = `${shnei} ${yamim}`;\nconst shavuot = 'שָׁבוּעוֹת';\nconst yom = 'יוֹם';\nconst yomEchad = `${yom} ${ones[1]}`;\nconst asar = 'עָשָׂר';\n\nfunction omerTodayIsHe(omerDay: number): string {\n const ten = Math.floor(omerDay / 10);\n const one = omerDay % 10;\n let str = 'הַיּוֹם ';\n if (omerDay === 11) {\n str += `אַחַד ${asar}`;\n } else if (omerDay === 12) {\n str += `שְׁנֵים ${asar}`;\n } else if (12 < omerDay && omerDay < 20) {\n str += `${ones[one]} ${asar}`;\n } else if (omerDay > 9) {\n str += ones[one];\n if (one) {\n str += ' ';\n str += ten === 3 ? 'וּ' : 'וְ';\n }\n }\n if (omerDay > 2) {\n if (omerDay > 20 || omerDay === 10 || omerDay === 20) {\n str += tens[ten];\n }\n if (omerDay < 11) {\n str += `${ones[one]} ${yamim} `;\n } else {\n str += ` ${yom} `;\n }\n } else if (omerDay === 1) {\n str += `${yomEchad} `;\n } else {\n // omer == 2\n str += `${shneiYamim} `;\n }\n if (omerDay > 6) {\n str = str.trim(); // remove trailing space before comma\n str += ', שֶׁהֵם ';\n const weeks = Math.floor(omerDay / 7);\n const days = omerDay % 7;\n if (weeks > 2) {\n str += `${ones[weeks]} ${shavuot} `;\n } else if (weeks === 1) {\n str += `שָׁבֽוּעַ ${ones[1]} `;\n } else {\n // weeks == 2\n str += `${shnei} ${shavuot} `;\n }\n if (days) {\n if (days === 2 || days === 3) {\n str += 'וּ';\n } else if (days === 5) {\n str += 'וַ';\n } else {\n str += 'וְ';\n }\n if (days > 2) {\n str += `${ones[days]} ${yamim} `;\n } else if (days === 1) {\n str += `${yomEchad} `;\n } else {\n // days == 2\n str += `${shneiYamim} `;\n }\n }\n }\n str += 'לָעֽוֹמֶר';\n return str.normalize();\n}\n\nconst anaBekoach = sefira.anaBekoach;\n\nconst ps67lines = sefira.ps67lines;\n\nconst lamnatzeach = ps67lines.flatMap((x: string) => x.split(/[ ־]/));\n\nconst lamnatzeachLetters = sefira.lamnatzeachLetters.split('');\n\n/**\n * Represents one of the 49 days of counting the Omer between Pesach and\n * Shavuot (16 Nisan through 5 Sivan).\n *\n * Each day has an associated Sefirah pairing (e.g. *Chesed shebiGevurah*),\n * a word from Psalm 67 (Lamnatzeach), a letter from verse 5 of Psalm 67,\n * and a word/acrostic from the Ana BeKoach prayer — all accessible via\n * the methods on this class.\n *\n * @example\n * import {OmerEvent, HDate, months} from '@hebcal/core';\n * const ev = new OmerEvent(new HDate(16, months.NISAN, 5784), 1);\n * ev.render('en'); // '1st day of the Omer'\n * ev.render('he'); // 'א׳ בָּעוֹמֶר'\n * ev.sefira('translit'); // \"Chesed sheb'Chesed\"\n * ev.getTodayIs('en'); // 'Today is 1 day of the Omer'\n */\nexport class OmerEvent extends Event {\n private readonly weekNumber: number;\n private readonly daysWithinWeeks: number;\n readonly omer: number;\n\n /**\n * Constructs an Omer event for a given day (1–49).\n *\n * Throws `RangeError` if `omerDay` is outside 1–49.\n * @param date Hebrew date this Omer day is counted on (the evening of)\n * @param omerDay day of the Omer, 1 through 49\n */\n constructor(date: HDate, omerDay: number) {\n super(date, `Omer ${omerDay}`, flags.OMER_COUNT);\n checkDay(omerDay);\n [this.weekNumber, this.daysWithinWeeks] = getWeeks(omerDay);\n this.omer = omerDay;\n }\n\n /**\n * Returns the Sefirah pairing associated with this Omer day —\n * one of the seven lower Sefirot within another, calculated as\n * `day-within-week` of `week-within-cycle`. For example, on day 8\n * (week 2, day 1):\n * * חֶֽסֶד שֶׁבִּגְבוּרָה\n * * Chesed shebiGevurah\n * * Lovingkindness within Might\n * @example\n * import {OmerEvent, HDate, months} from '@hebcal/core';\n * const day8 = new OmerEvent(new HDate(23, months.NISAN, 5784), 8);\n * day8.sefira('en'); // 'Lovingkindness within Might'\n * day8.sefira('he'); // 'חֶֽסֶד שֶׁבִּגְבוּרָה'\n * day8.sefira('translit'); // 'Chesed shebiGevurah'\n * @param lang `en` (English), `he` (Hebrew with nikud), or `translit` (Hebrew in Sephardic transliteration)\n * @returns a string such as `Lovingkindness within Might` or `חֶֽסֶד שֶׁבִּגְבוּרָה`\n */\n sefira(lang: OmerLang = 'en'): string {\n if (lang !== 'he' && lang !== 'translit') {\n lang = 'en';\n }\n const [weekNum, daysWithinWeeks] = getWeeks(this.omer);\n const config = sefirot[lang];\n const {pfxWords, words} = config;\n const week = pfxWords ? pfxWords[weekNum] : words[weekNum];\n const dayWithinWeek = words[daysWithinWeeks];\n const infix = pfxWords\n ? ''\n : weekNum === 2 || weekNum === 6\n ? config.infix26\n : config.infix;\n return `${dayWithinWeek} ${infix}${week}`.normalize();\n }\n /**\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override render(locale?: string): string {\n const isHebrewLocale = Locale.isHebrewLocale(locale);\n const omer = this.omer;\n const nth = isHebrewLocale ? gematriya(omer) : Locale.ordinal(omer, locale);\n return `${nth} ${Locale.gettext('day of the Omer', locale)}`;\n }\n /**\n * Returns translation of \"Omer day 22\" without ordinal numbers.\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override renderBrief(locale?: string): string {\n return `${Locale.gettext('Omer', locale)} ${Locale.gettext('day', locale)} ${this.omer}`;\n }\n /**\n * Returns an emoji number symbol with a circle, for example `㊲`\n * from the “Enclosed CJK Letters and Months” block of the Unicode standard\n * @returns a single Unicode character from `①` through `㊾`\n */\n override getEmoji(): string {\n if (typeof this.emoji === 'string') return this.emoji;\n let codePoint: number;\n const omerDay = this.omer;\n if (omerDay <= 20) {\n codePoint = 9312 + omerDay - 1;\n } else if (omerDay <= 35) {\n // between 21 and 35 inclusive\n codePoint = 12881 + omerDay - 21;\n } else {\n // between 36 and 49 inclusive\n codePoint = 12977 + omerDay - 36;\n }\n return String.fromCodePoint(codePoint);\n }\n\n /**\n * Number of *completed* weeks of the Omer. On day 7 this returns `1`; on\n * day 8 it also returns `1`, because the second week is still in progress.\n * Pair with {@link getDaysWithinWeeks} to render \"N weeks and M days\".\n */\n getWeeks(): number {\n const day7 = this.daysWithinWeeks === 7;\n return day7 ? this.weekNumber : this.weekNumber - 1;\n }\n\n /**\n * Day within the current week, from `1` through `7`.\n */\n getDaysWithinWeeks(): number {\n return this.daysWithinWeeks;\n }\n /**\n * Returns a sentence with that evening's omer count\n * @example\n * import {OmerEvent, HDate, months} from '@hebcal/core';\n * const ev = new OmerEvent(new HDate(25, months.NISAN, 5784), 10);\n * ev.getTodayIs('en');\n * // => 'Today is 10 days, which are 1 week and 3 days of the Omer'\n * ev.getTodayIs('he');\n * // => 'הַיּוֹם עֲשָׂרָה יָמִים, שֶׁהֵם שָׁבֽוּעַ אֶחָד וּשְׁלוֹשָׁה יָמִים לָעֽוֹמֶר'\n * @param locale locale name; Hebrew locales (`he`, `he-x-NoNikud`) produce\n * the Hebrew formula, anything else produces English. Defaults to `en`\n * when empty.\n */\n getTodayIs(locale: string): string {\n locale = (locale || 'en').toLowerCase();\n const isHebrew = Locale.isHebrewLocale(locale);\n const str = isHebrew ? omerTodayIsHe(this.omer) : omerTodayIsEn(this.omer);\n if (locale === 'he-x-nonikud') {\n return Locale.hebrewStripNikkud(str);\n }\n return str;\n }\n\n override url(): string | undefined {\n const year = this.getDate().getFullYear();\n if (year < 5000 || year > 6759) {\n return undefined;\n }\n return `https://www.hebcal.com/omer/${year}/${this.omer}`;\n }\n\n /**\n * Returns the word from Psalm 67 (לַמְנַצֵּחַ, \"Lamnatzeach\") corresponding\n * to this Omer day. Psalm 67 contains 49 words (excluding its opening verse),\n * one for each day of the Omer. The words are taken from verses 2–8, split on\n * spaces and maqef (־).\n * @returns a Hebrew word from Psalm 67\n * @example\n * const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);\n * ev.getLamnatzeachWord(); // 'אֱלֹהִים' (day 1, first word of verse 2)\n * @example\n * const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);\n * ev.getLamnatzeachWord(); // 'אָרֶץ' (day 49, last word of verse 8)\n */\n getLamnatzeachWord(): string {\n return lamnatzeach[this.omer - 1];\n }\n\n /**\n * Returns the letter from verse 5 of Psalm 67 corresponding to this Omer day.\n * Verse 5 (יִשְׂמְחוּ וִירַנְּנוּ לְאֻמִּים…) contains exactly 49 letters,\n * one for each day of the Omer, and is used as a Kabbalistic meditation during\n * the counting.\n * @returns a single Hebrew letter from verse 5 of Psalm 67\n * @example\n * const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);\n * ev.getLamnatzeachLetter(); // 'י' (day 1, first letter of verse 5)\n * @example\n * const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);\n * ev.getLamnatzeachLetter(); // 'ה' (day 49, last letter of verse 5)\n */\n getLamnatzeachLetter(): string {\n return lamnatzeachLetters[this.omer - 1];\n }\n\n /**\n * Returns the word from the Ana BeKoach prayer (אָנָּא בְּכֹחַ) corresponding\n * to this Omer day. Ana BeKoach is a 42-word Kabbalistic prayer whose initial\n * letters spell out the 42-letter name of God. The prayer has 7 verses of\n * 6 words each; the 7th entry of each group is the abbreviation of the acrostic\n * letters for that verse (e.g. `אב״ג ית״ץ` for verse 1). Together the 49\n * entries (7 verses × 7 entries) align with the 49 days of the Omer, connecting\n * each day to one of the lower seven Sefirot within a Sefirah.\n * @returns a Hebrew word or verse-abbreviation string from Ana BeKoach\n * @example\n * const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);\n * ev.getAnaBekoachWord(); // 'אָנָּא' (day 1, first word of verse 1)\n * @example\n * const ev = new OmerEvent(new HDate(22, 'Nisan', 5785), 7);\n * ev.getAnaBekoachWord(); // 'אב״ג ית״ץ' (day 7, acrostic abbreviation for verse 1)\n * @example\n * const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);\n * ev.getAnaBekoachWord(); // 'שק״ו צי״ת' (day 49, acrostic abbreviation for verse 7)\n */\n getAnaBekoachWord(): string {\n return anaBekoach[this.omer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QACtC;AACA,QAAA,OAAO,GAAG;IACZ;IAES,GAAG,GAAA;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,WAAW,EAAE;QACzC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,EAAE;AAC9B,YAAA,OAAO,SAAS;QAClB;AACA,QAAA,OAAO,+BAA+B,IAAI,CAAA,CAAA,EAAI,IAAI,CAAC,IAAI,EAAE;IAC3D;AAEA;;;;;;;;;;;;AAYG;IACH,kBAAkB,GAAA;QAChB,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IACnC;AAEA;;;;;;;;;;;;AAYG;IACH,oBAAoB,GAAA;QAClB,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAC1C;AAEA;;;;;;;;;;;;;;;;;;AAkBG;IACH,iBAAiB,GAAA;QACf,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE;IAC9C;AACD;;"}
1
+ {"version":3,"file":"omer.js","sources":["../../../src/omer.ts"],"sourcesContent":["import {HDate, Locale, gematriya} from '@hebcal/hdate';\nimport {Event, flags} from './event.js';\nimport './locale.js'; // Adds Hebrew and Ashkenazic translations\nimport sefira from './sefira.json.js';\n\n/**\n * Language for counting the Omer can be English or Hebrew.\n * Lang for the Sefira can be English, Hebrew, or Hebrew in Sephardic transliteration.\n */\nexport type OmerLang = 'en' | 'he' | 'translit';\n\nconst sefirot = {\n en: {\n infix: 'within ',\n infix26: 'within ',\n words: [\n '',\n 'Lovingkindness',\n 'Might',\n 'Beauty',\n 'Eternity',\n 'Splendor',\n 'Foundation',\n 'Majesty',\n ],\n pfxWords: null,\n },\n he: {\n infix: null,\n infix26: null,\n words: [\n '',\n 'חֶֽסֶד',\n 'גְּבוּרָה',\n 'תִּפְאֶֽרֶת',\n 'נֶּֽצַח',\n 'הוֹד',\n 'יְּסוֹד',\n 'מַלְכוּת',\n ],\n pfxWords: [\n '',\n 'שֶׁבְּחֶֽסֶד',\n 'שֶׁבִּגְבוּרָה',\n 'שֶׁבְּתִפְאֶֽרֶת',\n 'שֶׁבְּנֶֽצַח',\n 'שֶׁבְּהוֹד',\n 'שֶׁבִּיְסוֹד',\n 'שֶׁבְּמַלְכוּת',\n ],\n },\n translit: {\n infix: \"sheb'\",\n infix26: 'shebi',\n words: [\n '',\n 'Chesed',\n 'Gevurah',\n 'Tiferet',\n 'Netzach',\n 'Hod',\n 'Yesod',\n 'Malkhut',\n ],\n pfxWords: null,\n },\n} as const;\n\nfunction checkDay(omerDay: number): void {\n if (omerDay < 1 || omerDay > 49) {\n throw new RangeError(`Invalid Omer day ${omerDay}`);\n }\n}\n\nfunction getWeeks(omerDay: number): [number, number] {\n const weekNum = Math.floor((omerDay - 1) / 7) + 1;\n const daysWithinWeeks = omerDay % 7 || 7;\n return [weekNum, daysWithinWeeks];\n}\n\nfunction omerTodayIsEn(omerDay: number): string {\n const [weekNumber, daysWithinWeeks] = getWeeks(omerDay);\n\n const totalDaysStr = omerDay === 1 ? 'day' : 'days';\n let str = `Today is ${omerDay} ${totalDaysStr}`;\n\n if (weekNumber > 1 || omerDay === 7) {\n const day7 = daysWithinWeeks === 7;\n const numWeeks = day7 ? weekNumber : weekNumber - 1;\n const weeksStr = numWeeks === 1 ? 'week' : 'weeks';\n str += `, which are ${numWeeks} ${weeksStr}`;\n if (!day7) {\n const daysStr = daysWithinWeeks === 1 ? 'day' : 'days';\n str += ` and ${daysWithinWeeks} ${daysStr}`;\n }\n }\n return `${str} of the Omer`;\n}\n\n// adapted from pip hdate package (GPL)\n// https://github.com/py-libhdate/py-libhdate/blob/master/hdate/date.py\n\nconst tens = ['', 'עֲשָׂרָה', 'עֶשְׂרִים', 'שְׁלוֹשִׁים', 'אַרְבָּעִים'];\nconst ones = [\n '',\n 'אֶחָד',\n 'שְׁנַיִם',\n 'שְׁלוֹשָׁה',\n 'אַרְבָּעָה',\n 'חֲמִשָּׁה',\n 'שִׁשָּׁה',\n 'שִׁבְעָה',\n 'שְׁמוֹנָה',\n 'תִּשְׁעָה',\n];\n\nconst shnei = 'שְׁנֵי';\nconst yamim = 'יָמִים';\nconst shneiYamim = `${shnei} ${yamim}`;\nconst shavuot = 'שָׁבוּעוֹת';\nconst yom = 'יוֹם';\nconst yomEchad = `${yom} ${ones[1]}`;\nconst asar = 'עָשָׂר';\n\nfunction omerTodayIsHe(omerDay: number): string {\n const ten = Math.floor(omerDay / 10);\n const one = omerDay % 10;\n let str = 'הַיּוֹם ';\n if (omerDay === 11) {\n str += `אַחַד ${asar}`;\n } else if (omerDay === 12) {\n str += `שְׁנֵים ${asar}`;\n } else if (12 < omerDay && omerDay < 20) {\n str += `${ones[one]} ${asar}`;\n } else if (omerDay > 9) {\n str += ones[one];\n if (one) {\n str += ' ';\n str += ten === 3 ? 'וּ' : 'וְ';\n }\n }\n if (omerDay > 2) {\n if (omerDay > 20 || omerDay === 10 || omerDay === 20) {\n str += tens[ten];\n }\n if (omerDay < 11) {\n str += `${ones[one]} ${yamim} `;\n } else {\n str += ` ${yom} `;\n }\n } else if (omerDay === 1) {\n str += `${yomEchad} `;\n } else {\n // omer == 2\n str += `${shneiYamim} `;\n }\n if (omerDay > 6) {\n str = str.trim(); // remove trailing space before comma\n str += ', שֶׁהֵם ';\n const weeks = Math.floor(omerDay / 7);\n const days = omerDay % 7;\n if (weeks > 2) {\n str += `${ones[weeks]} ${shavuot} `;\n } else if (weeks === 1) {\n str += `שָׁבֽוּעַ ${ones[1]} `;\n } else {\n // weeks == 2\n str += `${shnei} ${shavuot} `;\n }\n if (days) {\n if (days === 2 || days === 3) {\n str += 'וּ';\n } else if (days === 5) {\n str += 'וַ';\n } else {\n str += 'וְ';\n }\n if (days > 2) {\n str += `${ones[days]} ${yamim} `;\n } else if (days === 1) {\n str += `${yomEchad} `;\n } else {\n // days == 2\n str += `${shneiYamim} `;\n }\n }\n }\n str += 'לָעֽוֹמֶר';\n return str.normalize();\n}\n\nconst anaBekoach = sefira.anaBekoach;\n\nconst ps67lines = sefira.ps67lines;\n\nconst lamnatzeach = ps67lines.flatMap((x: string) => x.split(/[ ־]/));\n\nconst lamnatzeachLetters = sefira.lamnatzeachLetters.split('');\n\n/**\n * Represents one of the 49 days of counting the Omer between Pesach and\n * Shavuot (16 Nisan through 5 Sivan).\n *\n * Each day has an associated Sefirah pairing (e.g. *Chesed shebiGevurah*),\n * a word from Psalm 67 (Lamnatzeach), a letter from verse 5 of Psalm 67,\n * and a word/acrostic from the Ana BeKoach prayer — all accessible via\n * the methods on this class.\n *\n * @example\n * import {OmerEvent, HDate, months} from '@hebcal/core';\n * const ev = new OmerEvent(new HDate(16, months.NISAN, 5784), 1);\n * ev.render('en'); // '1st day of the Omer'\n * ev.render('he'); // 'א׳ בָּעוֹמֶר'\n * ev.sefira('translit'); // \"Chesed sheb'Chesed\"\n * ev.getTodayIs('en'); // 'Today is 1 day of the Omer'\n */\nexport class OmerEvent extends Event {\n private readonly weekNumber: number;\n private readonly daysWithinWeeks: number;\n readonly omer: number;\n\n /**\n * Constructs an Omer event for a given day (1–49).\n *\n * Throws `RangeError` if `omerDay` is outside 1–49.\n * @param date Hebrew date this Omer day is counted on (the evening of)\n * @param omerDay day of the Omer, 1 through 49\n */\n constructor(date: HDate, omerDay: number) {\n super(date, `Omer ${omerDay}`, flags.OMER_COUNT);\n checkDay(omerDay);\n [this.weekNumber, this.daysWithinWeeks] = getWeeks(omerDay);\n this.omer = omerDay;\n }\n\n /**\n * Returns the Sefirah pairing associated with this Omer day —\n * one of the seven lower Sefirot within another, calculated as\n * `day-within-week` of `week-within-cycle`. For example, on day 8\n * (week 2, day 1):\n * * חֶֽסֶד שֶׁבִּגְבוּרָה\n * * Chesed shebiGevurah\n * * Lovingkindness within Might\n * @example\n * import {OmerEvent, HDate, months} from '@hebcal/core';\n * const day8 = new OmerEvent(new HDate(23, months.NISAN, 5784), 8);\n * day8.sefira('en'); // 'Lovingkindness within Might'\n * day8.sefira('he'); // 'חֶֽסֶד שֶׁבִּגְבוּרָה'\n * day8.sefira('translit'); // 'Chesed shebiGevurah'\n * @param lang `en` (English), `he` (Hebrew with nikud), or `translit` (Hebrew in Sephardic transliteration)\n * @returns a string such as `Lovingkindness within Might` or `חֶֽסֶד שֶׁבִּגְבוּרָה`\n */\n sefira(lang: OmerLang = 'en'): string {\n if (lang !== 'he' && lang !== 'translit') {\n lang = 'en';\n }\n const [weekNum, daysWithinWeeks] = getWeeks(this.omer);\n const config = sefirot[lang];\n const {pfxWords, words} = config;\n const week = pfxWords ? pfxWords[weekNum] : words[weekNum];\n const dayWithinWeek = words[daysWithinWeeks];\n const infix = pfxWords\n ? ''\n : weekNum === 2 || weekNum === 6\n ? config.infix26\n : config.infix;\n return `${dayWithinWeek} ${infix}${week}`.normalize();\n }\n /**\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override render(locale?: string): string {\n const isHebrewLocale = Locale.isHebrewLocale(locale);\n const omer = this.omer;\n const nth = isHebrewLocale ? gematriya(omer) : Locale.ordinal(omer, locale);\n return `${nth} ${Locale.gettext('day of the Omer', locale)}`;\n }\n /**\n * Returns translation of \"Omer day 22\" without ordinal numbers.\n * @param [locale] Optional locale name (defaults to empty locale)\n */\n override renderBrief(locale?: string): string {\n return `${Locale.gettext('Omer', locale)} ${Locale.gettext('day', locale)} ${this.omer}`;\n }\n /**\n * Returns an emoji number symbol with a circle, for example `㊲`\n * from the “Enclosed CJK Letters and Months” block of the Unicode standard\n * @returns a single Unicode character from `①` through `㊾`\n */\n override getEmoji(): string {\n if (typeof this.emoji === 'string') return this.emoji;\n let codePoint: number;\n const omerDay = this.omer;\n if (omerDay <= 20) {\n codePoint = 9312 + omerDay - 1;\n } else if (omerDay <= 35) {\n // between 21 and 35 inclusive\n codePoint = 12881 + omerDay - 21;\n } else {\n // between 36 and 49 inclusive\n codePoint = 12977 + omerDay - 36;\n }\n return String.fromCodePoint(codePoint);\n }\n\n /**\n * Number of *completed* weeks of the Omer. On day 7 this returns `1`; on\n * day 8 it also returns `1`, because the second week is still in progress.\n * Pair with {@link getDaysWithinWeeks} to render \"N weeks and M days\".\n */\n getWeeks(): number {\n const day7 = this.daysWithinWeeks === 7;\n return day7 ? this.weekNumber : this.weekNumber - 1;\n }\n\n /**\n * Day within the current week, from `1` through `7`.\n */\n getDaysWithinWeeks(): number {\n return this.daysWithinWeeks;\n }\n /**\n * Returns a sentence with that evening's omer count\n * @example\n * import {OmerEvent, HDate, months} from '@hebcal/core';\n * const ev = new OmerEvent(new HDate(25, months.NISAN, 5784), 10);\n * ev.getTodayIs('en');\n * // => 'Today is 10 days, which are 1 week and 3 days of the Omer'\n * ev.getTodayIs('he');\n * // => 'הַיּוֹם עֲשָׂרָה יָמִים, שֶׁהֵם שָׁבֽוּעַ אֶחָד וּשְׁלוֹשָׁה יָמִים לָעֽוֹמֶר'\n * @param locale locale name; Hebrew locales (`he`, `he-x-NoNikud`) produce\n * the Hebrew formula, anything else produces English. Defaults to `en`\n * when empty.\n */\n getTodayIs(locale: string): string {\n locale = (locale || 'en').toLowerCase();\n const isHebrew = Locale.isHebrewLocale(locale);\n const str = isHebrew ? omerTodayIsHe(this.omer) : omerTodayIsEn(this.omer);\n if (locale === 'he-x-nonikud') {\n return Locale.hebrewStripNikkud(str);\n }\n return str;\n }\n\n /**\n * Returns a `https://www.hebcal.com/omer/...` URL, or `undefined` for Hebrew\n * years outside `[5513, 6260]` (roughly Gregorian 1752–2499).\n */\n override url(): string | undefined {\n const year = this.getDate().getFullYear();\n if (year < 5513 || year > 6260) {\n return undefined;\n }\n return `https://www.hebcal.com/omer/${year}/${this.omer}`;\n }\n\n /**\n * Returns the word from Psalm 67 (לַמְנַצֵּחַ, \"Lamnatzeach\") corresponding\n * to this Omer day. Psalm 67 contains 49 words (excluding its opening verse),\n * one for each day of the Omer. The words are taken from verses 2–8, split on\n * spaces and maqef (־).\n * @returns a Hebrew word from Psalm 67\n * @example\n * const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);\n * ev.getLamnatzeachWord(); // 'אֱלֹהִים' (day 1, first word of verse 2)\n * @example\n * const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);\n * ev.getLamnatzeachWord(); // 'אָרֶץ' (day 49, last word of verse 8)\n */\n getLamnatzeachWord(): string {\n return lamnatzeach[this.omer - 1];\n }\n\n /**\n * Returns the letter from verse 5 of Psalm 67 corresponding to this Omer day.\n * Verse 5 (יִשְׂמְחוּ וִירַנְּנוּ לְאֻמִּים…) contains exactly 49 letters,\n * one for each day of the Omer, and is used as a Kabbalistic meditation during\n * the counting.\n * @returns a single Hebrew letter from verse 5 of Psalm 67\n * @example\n * const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);\n * ev.getLamnatzeachLetter(); // 'י' (day 1, first letter of verse 5)\n * @example\n * const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);\n * ev.getLamnatzeachLetter(); // 'ה' (day 49, last letter of verse 5)\n */\n getLamnatzeachLetter(): string {\n return lamnatzeachLetters[this.omer - 1];\n }\n\n /**\n * Returns the word from the Ana BeKoach prayer (אָנָּא בְּכֹחַ) corresponding\n * to this Omer day. Ana BeKoach is a 42-word Kabbalistic prayer whose initial\n * letters spell out the 42-letter name of God. The prayer has 7 verses of\n * 6 words each; the 7th entry of each group is the abbreviation of the acrostic\n * letters for that verse (e.g. `אב״ג ית״ץ` for verse 1). Together the 49\n * entries (7 verses × 7 entries) align with the 49 days of the Omer, connecting\n * each day to one of the lower seven Sefirot within a Sefirah.\n * @returns a Hebrew word or verse-abbreviation string from Ana BeKoach\n * @example\n * const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);\n * ev.getAnaBekoachWord(); // 'אָנָּא' (day 1, first word of verse 1)\n * @example\n * const ev = new OmerEvent(new HDate(22, 'Nisan', 5785), 7);\n * ev.getAnaBekoachWord(); // 'אב״ג ית״ץ' (day 7, acrostic abbreviation for verse 1)\n * @example\n * const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);\n * ev.getAnaBekoachWord(); // 'שק״ו צי״ת' (day 49, acrostic abbreviation for verse 7)\n */\n getAnaBekoachWord(): string {\n return anaBekoach[this.omer - 1].normalize();\n }\n}\n"],"names":[],"mappings":";;;;;;AAWA,MAAM,OAAO,GAAG;AACd,IAAA,EAAE,EAAE;AACF,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,KAAK,EAAE;YACL,EAAE;YACF,gBAAgB;YAChB,OAAO;YACP,QAAQ;YACR,UAAU;YACV,UAAU;YACV,YAAY;YACZ,SAAS;AACV,SAAA;AACD,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,KAAK,EAAE,IAAI;AACX,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,KAAK,EAAE;YACL,EAAE;YACF,QAAQ;YACR,WAAW;YACX,aAAa;YACb,SAAS;YACT,MAAM;YACN,SAAS;YACT,UAAU;AACX,SAAA;AACD,QAAA,QAAQ,EAAE;YACR,EAAE;YACF,cAAc;YACd,gBAAgB;YAChB,kBAAkB;YAClB,cAAc;YACd,YAAY;YACZ,cAAc;YACd,gBAAgB;AACjB,SAAA;AACF,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE,OAAO;AACd,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,KAAK,EAAE;YACL,EAAE;YACF,QAAQ;YACR,SAAS;YACT,SAAS;YACT,SAAS;YACT,KAAK;YACL,OAAO;YACP,SAAS;AACV,SAAA;AACD,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA;CACO;AAEV,SAAS,QAAQ,CAAC,OAAe,EAAA;IAC/B,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,EAAE,EAAE;AAC/B,QAAA,MAAM,IAAI,UAAU,CAAC,oBAAoB,OAAO,CAAA,CAAE,CAAC;IACrD;AACF;AAEA,SAAS,Q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C,IAAI,CAAC,IAAI,CAAC;AAC1E,QAAA,IAAI,MAAM,KAAK,cAAc,EAAE;AAC7B,YAAA,OAAO,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC;QACtC;AACA,QAAA,OAAO,GAAG;IACZ;AAEA;;;AAGG;IACM,GAAG,GAAA;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,WAAW,EAAE;QACzC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,EAAE;AAC9B,YAAA,OAAO,SAAS;QAClB;AACA,QAAA,OAAO,+BAA+B,IAAI,CAAA,CAAA,EAAI,IAAI,CAAC,IAAI,EAAE;IAC3D;AAEA;;;;;;;;;;;;AAYG;IACH,kBAAkB,GAAA;QAChB,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IACnC;AAEA;;;;;;;;;;;;AAYG;IACH,oBAAoB,GAAA;QAClB,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAC1C;AAEA;;;;;;;;;;;;;;;;;;AAkBG;IACH,iBAAiB,GAAA;QACf,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE;IAC9C;AACD;;"}
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import './locale.js';
3
3
  import { smartApostrophe } from './string.js';
4
4
  import { Locale } from '@hebcal/hdate';
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { HDate, months } from '@hebcal/hdate';
3
3
  import { ParshaEvent } from './ParshaEvent.js';
4
4
  import { getSedra } from './sedra.js';
@@ -1,2 +1,2 @@
1
1
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
2
- export declare const version = "6.15.0";
2
+ export declare const version = "6.16.0";
@@ -1,6 +1,6 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
3
- const version = '6.15.0';
3
+ const version = '6.16.0';
4
4
 
5
5
  export { version };
6
6
  //# sourceMappingURL=pkgVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pkgVersion.js","sources":["../../../src/pkgVersion.ts"],"sourcesContent":["/** DO NOT EDIT THIS AUTO-GENERATED FILE! */\nexport const version = '6.15.0';\n"],"names":[],"mappings":";AAAA;AACO,MAAM,OAAO,GAAG;;"}
1
+ {"version":3,"file":"pkgVersion.js","sources":["../../../src/pkgVersion.ts"],"sourcesContent":["/** DO NOT EDIT THIS AUTO-GENERATED FILE! */\nexport const version = '6.16.0';\n"],"names":[],"mappings":";AAAA;AACO,MAAM,OAAO,GAAG;;"}
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  /** Countries that conventionally use a 12-hour clock */
3
3
  const hour12cc = new Set([
4
4
  'US',
package/dist/esm/sedra.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { HDate, months } from '@hebcal/hdate';
3
3
  import QuickLRU from 'quick-lru';
4
4
  import './locale.js';
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  var sefira = {
3
3
  "ps67lines": [
4
4
  "אֱלֹהִים יְחָנֵּנוּ וִיבָרְכֵנוּ יָאֵר־פָּנָיו אִתָּנוּ סֶלָה",
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { months } from '@hebcal/hdate';
3
3
  import { flags } from './event.js';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  function smartApostrophe(str) {
3
3
  return str.replaceAll("'", '’');
4
4
  }
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import { HDate, months } from '@hebcal/hdate';
3
3
  import { dateYomHaZikaron } from './modern.js';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  /**
3
3
  * Solar zeniths and depression angles shared by the zmanim calculations.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v6.15.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.16.0, distributed under GPLv2 or later https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  import 'temporal-polyfill/global';
3
3
  import { NOAACalculator } from '@hebcal/noaa';
4
4
  import { HDate, isDate, getTimezoneOffset, pad2, getPseudoISO } from '@hebcal/hdate';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "6.15.0",
3
+ "version": "6.16.0",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "contributors": [
6
6
  "Eyal Schachter (https://github.com/Scimonster)",