@hebcal/core 6.5.1 → 6.5.3
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.
- package/dist/bundle.js +5930 -5385
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +17 -17
- package/dist/bundle.min.js.map +1 -1
- package/dist/eslint.config.mjs +1 -0
- package/dist/esm/CalOptions.d.ts +3 -4
- package/dist/esm/DailyLearning.d.ts +44 -7
- package/dist/esm/DailyLearning.js +45 -8
- package/dist/esm/DailyLearning.js.map +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.d.ts +34 -1
- package/dist/esm/HolidayEvent.js +35 -2
- package/dist/esm/HolidayEvent.js.map +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +1 -1
- package/dist/esm/TimedEvent.d.ts +32 -3
- package/dist/esm/TimedEvent.js +33 -4
- package/dist/esm/TimedEvent.js.map +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.d.ts +1 -0
- package/dist/esm/ashkenazi.po.js +2 -2
- package/dist/esm/ashkenazi.po.js.map +1 -1
- package/dist/esm/calendar.js +1 -1
- package/dist/esm/candles.d.ts +14 -1
- package/dist/esm/candles.js +15 -2
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/cities.json.js +1 -1
- package/dist/esm/event.d.ts +56 -13
- package/dist/esm/event.js +57 -14
- package/dist/esm/event.js.map +1 -1
- package/dist/esm/getStartAndEnd.js +10 -2
- package/dist/esm/getStartAndEnd.js.map +1 -1
- package/dist/esm/hallel.js +20 -28
- package/dist/esm/hallel.js.map +1 -1
- package/dist/esm/he-x-NoNikud.po.js +1 -1
- package/dist/esm/he.po.js +1 -1
- package/dist/esm/hebcal.d.ts +97 -19
- package/dist/esm/hebcal.js +102 -21
- package/dist/esm/hebcal.js.map +1 -1
- package/dist/esm/holidays.d.ts +21 -2
- package/dist/esm/holidays.js +22 -3
- package/dist/esm/holidays.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isAssurBemlacha.d.ts +24 -4
- package/dist/esm/isAssurBemlacha.js +25 -5
- package/dist/esm/isAssurBemlacha.js.map +1 -1
- package/dist/esm/isAveilut.d.ts +14 -3
- package/dist/esm/isAveilut.js +15 -4
- package/dist/esm/isAveilut.js.map +1 -1
- package/dist/esm/isFastDay.d.ts +13 -1
- package/dist/esm/isFastDay.js +14 -2
- package/dist/esm/isFastDay.js.map +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.d.ts +96 -8
- package/dist/esm/location.js +101 -10
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.d.ts +39 -7
- package/dist/esm/molad.js +40 -8
- package/dist/esm/molad.js.map +1 -1
- package/dist/esm/moladBase.js +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/omer.d.ts +32 -4
- package/dist/esm/omer.js +33 -5
- package/dist/esm/omer.js.map +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.d.ts +12 -1
- package/dist/esm/parshaYear.js +13 -2
- package/dist/esm/parshaYear.js.map +1 -1
- package/dist/esm/pkgVersion.d.ts +1 -1
- package/dist/esm/pkgVersion.js +2 -2
- package/dist/esm/pkgVersion.js.map +1 -1
- package/dist/esm/reformatTimeStr.js +1 -1
- package/dist/esm/sedra.d.ts +94 -14
- package/dist/esm/sedra.js +95 -15
- package/dist/esm/sedra.js.map +1 -1
- package/dist/esm/sefira.json.js +1 -1
- package/dist/esm/staticHolidays.js +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/temporal-shim.js +1 -1
- package/dist/esm/zmanim.js +1 -1
- package/dist/src/CalOptions.d.ts +3 -4
- package/dist/src/DailyLearning.d.ts +44 -7
- package/dist/src/DailyLearning.js +44 -7
- package/dist/src/HolidayEvent.d.ts +34 -1
- package/dist/src/HolidayEvent.js +34 -1
- package/dist/src/TimedEvent.d.ts +32 -3
- package/dist/src/TimedEvent.js +32 -3
- package/dist/src/ashkenazi.po.d.ts +1 -0
- package/dist/src/ashkenazi.po.js +1 -1
- package/dist/src/candles.d.ts +14 -1
- package/dist/src/candles.js +14 -1
- package/dist/src/event.d.ts +56 -13
- package/dist/src/event.js +56 -13
- package/dist/src/getStartAndEnd.js +9 -1
- package/dist/src/hallel.js +19 -27
- package/dist/src/hebcal.d.ts +97 -19
- package/dist/src/hebcal.js +101 -20
- package/dist/src/holidays.d.ts +21 -2
- package/dist/src/holidays.js +21 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/isAssurBemlacha.d.ts +24 -4
- package/dist/src/isAssurBemlacha.js +24 -4
- package/dist/src/isAveilut.d.ts +14 -3
- package/dist/src/isAveilut.js +14 -3
- package/dist/src/isFastDay.d.ts +13 -1
- package/dist/src/isFastDay.js +13 -1
- package/dist/src/location.d.ts +96 -8
- package/dist/src/location.js +100 -9
- package/dist/src/molad.d.ts +39 -7
- package/dist/src/molad.js +39 -7
- package/dist/src/omer.d.ts +32 -4
- package/dist/src/omer.js +32 -4
- package/dist/src/parshaYear.d.ts +12 -1
- package/dist/src/parshaYear.js +12 -1
- package/dist/src/pkgVersion.d.ts +1 -1
- package/dist/src/pkgVersion.js +1 -1
- package/dist/src/sedra.d.ts +94 -14
- package/dist/src/sedra.js +94 -14
- package/package.json +11 -7
- package/po/ashkenazi.po +240 -0
- package/po/he-x-NoNikud.po +58 -0
- package/po/he.po +650 -0
package/dist/esm/holidays.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holidays.js","sources":["../../../src/holidays.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 */\nimport {HDate, months} from '@hebcal/hdate';\nimport QuickLRU from 'quick-lru';\nimport {flags} from './event';\nimport {dateYomHaShoah, dateYomHaZikaron} from './modern';\nimport {getSedra} from './sedra';\nimport {\n staticHolidays,\n staticModernHolidays,\n holidayDesc as hdesc,\n} from './staticHolidays';\nimport {YomKippurKatanEvent} from './YomKippurKatanEvent';\nimport {\n HolidayEvent,\n ChanukahEvent,\n AsaraBTevetEvent,\n RoshHashanaEvent,\n RoshChodeshEvent,\n} from './HolidayEvent';\n\n/**\n * Returns an array of Events on this date (or `undefined` if no events)\n * @param date Hebrew Date, Gregorian date, or absolute R.D. day number\n * @param [il] use the Israeli schedule for holidays\n */\nexport function getHolidaysOnDate(\n date: HDate | Date | number,\n il?: boolean\n): HolidayEvent[] | undefined {\n const hd = HDate.isHDate(date) ? (date as HDate) : new HDate(date);\n const hdStr = hd.toString();\n const yearMap = getHolidaysForYear_(hd.getFullYear());\n const events = yearMap.get(hdStr);\n // if il isn't a boolean return both diaspora + IL for day\n if (il === undefined || events === undefined) {\n return events;\n }\n const filtered = events.filter(ev => ev.observedIn(il));\n return filtered;\n}\n\nconst CHAG = flags.CHAG;\nconst IL_ONLY = flags.IL_ONLY;\nconst LIGHT_CANDLES_TZEIS = flags.LIGHT_CANDLES_TZEIS;\nconst CHANUKAH_CANDLES = flags.CHANUKAH_CANDLES;\nconst BEHAB = flags.BEHAB;\nconst MINOR_FAST = flags.MINOR_FAST;\nconst SPECIAL_SHABBAT = flags.SPECIAL_SHABBAT;\nconst MODERN_HOLIDAY = flags.MODERN_HOLIDAY;\nconst MAJOR_FAST = flags.MAJOR_FAST;\nconst MINOR_HOLIDAY = flags.MINOR_HOLIDAY;\nconst EREV = flags.EREV;\n\nconst SUN = 0;\nconst TUE = 2;\nconst THU = 4;\nconst FRI = 5;\nconst SAT = 6;\n\nconst NISAN = months.NISAN;\nconst IYYAR = months.IYYAR;\nconst TAMUZ = months.TAMUZ;\nconst AV = months.AV;\nconst TISHREI = months.TISHREI;\nconst CHESHVAN = months.CHESHVAN;\nconst KISLEV = months.KISLEV;\nconst TEVET = months.TEVET;\nconst ADAR_I = months.ADAR_I;\nconst ADAR_II = months.ADAR_II;\n\nconst emojiIsraelFlag = {emoji: '🇮🇱'} as const;\nexport type HolidayYearMap = Map<string, HolidayEvent[]>;\nconst yearCache = new QuickLRU<number, HolidayYearMap>({maxSize: 120});\n\n/**\n * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by\n * `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`\n * or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme.\n * @private\n */\nexport function getHolidaysForYear_(year: number): HolidayYearMap {\n if (typeof year !== 'number') {\n throw new TypeError(`bad Hebrew year: ${year}`);\n } else if (year < 1 || year > 32658) {\n throw new RangeError(`Hebrew year ${year} out of range 1-32658`);\n }\n const cached = yearCache.get(year);\n if (cached) {\n return cached;\n }\n\n const RH = new HDate(1, TISHREI, year);\n const pesach = new HDate(15, NISAN, year);\n\n const map = new Map<string, HolidayEvent[]>();\n function add(...events: HolidayEvent[]) {\n for (const ev of events) {\n const key = ev.date.toString();\n const arr = map.get(key);\n if (typeof arr === 'object') {\n if (arr[0].getFlags() & EREV) {\n arr.unshift(ev);\n } else {\n arr.push(ev);\n }\n } else {\n map.set(key, [ev]);\n }\n }\n }\n\n for (const h of staticHolidays) {\n const hd = new HDate(h.dd, h.mm, year);\n const ev = new HolidayEvent(hd, h.desc, h.flags);\n if (h.emoji) ev.emoji = h.emoji;\n if (h.chmDay) ev.cholHaMoedDay = h.chmDay;\n add(ev);\n }\n\n // standard holidays that don't shift based on year\n add(new RoshHashanaEvent(RH, year, CHAG | LIGHT_CANDLES_TZEIS));\n\n // Variable date holidays\n const tzomGedaliahDay: number = RH.getDay() === THU ? 4 : 3;\n add(\n new HolidayEvent(\n new HDate(tzomGedaliahDay, TISHREI, year),\n hdesc.TZOM_GEDALIAH,\n MINOR_FAST\n )\n );\n // first SAT after RH\n add(\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, 7 + RH.abs())),\n hdesc.SHABBAT_SHUVA,\n SPECIAL_SHABBAT\n )\n );\n const rchTevet = HDate.shortKislev(year)\n ? new HDate(1, TEVET, year)\n : new HDate(30, KISLEV, year);\n add(new HolidayEvent(rchTevet, hdesc.CHAG_HABANOT, MINOR_HOLIDAY));\n add(\n new ChanukahEvent(\n new HDate(24, KISLEV, year),\n hdesc.CHANUKAH_1_CANDLE,\n EREV | MINOR_HOLIDAY | CHANUKAH_CANDLES,\n undefined\n )\n );\n // yes, we know Kislev 30-32 are wrong\n // HDate() corrects the month automatically\n for (let candles = 2; candles <= 8; candles++) {\n const hd = new HDate(23 + candles, KISLEV, year);\n add(\n new ChanukahEvent(\n hd,\n `Chanukah: ${candles} Candles`,\n MINOR_HOLIDAY | CHANUKAH_CANDLES,\n candles - 1\n )\n );\n }\n add(\n new ChanukahEvent(\n new HDate(32, KISLEV, year),\n hdesc.CHANUKAH_8TH_DAY,\n MINOR_HOLIDAY,\n 8\n )\n );\n add(\n new AsaraBTevetEvent(\n new HDate(10, TEVET, year),\n hdesc.ASARA_BTEVET,\n MINOR_FAST\n )\n );\n const pesachAbs = pesach.abs();\n add(\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, pesachAbs - 43)),\n hdesc.SHABBAT_SHEKALIM,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, pesachAbs - 30)),\n hdesc.SHABBAT_ZACHOR,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n new HDate(pesachAbs - (pesach.getDay() === TUE ? 33 : 31)),\n hdesc.TAANIT_ESTHER,\n MINOR_FAST\n )\n );\n const haChodeshAbs = HDate.dayOnOrBefore(SAT, pesachAbs - 14);\n add(\n new HolidayEvent(\n new HDate(haChodeshAbs - 7),\n hdesc.SHABBAT_PARAH,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n new HDate(haChodeshAbs),\n hdesc.SHABBAT_HACHODESH,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, pesachAbs - 1)),\n hdesc.SHABBAT_HAGADOL,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n // if the fast falls on Shabbat, move to Thursday\n pesach.prev().getDay() === SAT\n ? pesach.onOrBefore(THU)\n : new HDate(14, NISAN, year),\n hdesc.TAANIT_BECHOROT,\n MINOR_FAST\n )\n );\n add(\n new HolidayEvent(\n new HDate(\n HDate.dayOnOrBefore(SAT, new HDate(1, TISHREI, year + 1).abs() - 4)\n ),\n hdesc.LEIL_SELICHOT,\n MINOR_HOLIDAY,\n {emoji: '🕍'}\n )\n );\n\n if (pesach.getDay() === SUN) {\n add(\n new HolidayEvent(\n new HDate(16, ADAR_II, year),\n hdesc.PURIM_MESHULASH,\n MINOR_HOLIDAY\n )\n );\n }\n\n if (HDate.isLeapYear(year)) {\n add(\n new HolidayEvent(\n new HDate(14, ADAR_I, year),\n hdesc.PURIM_KATAN,\n MINOR_HOLIDAY,\n {emoji: '🎭️'}\n )\n );\n add(\n new HolidayEvent(\n new HDate(15, ADAR_I, year),\n hdesc.SHUSHAN_PURIM_KATAN,\n MINOR_HOLIDAY,\n {emoji: '🎭️'}\n )\n );\n }\n\n const nisan27dt = dateYomHaShoah(year);\n if (nisan27dt) {\n add(new HolidayEvent(nisan27dt, hdesc.YOM_HASHOAH, MODERN_HOLIDAY));\n }\n\n const yomHaZikaronDt = dateYomHaZikaron(year);\n if (yomHaZikaronDt) {\n add(\n new HolidayEvent(\n yomHaZikaronDt,\n hdesc.YOM_HAZIKARON,\n MODERN_HOLIDAY,\n emojiIsraelFlag\n ),\n new HolidayEvent(\n yomHaZikaronDt.next(),\n hdesc.YOM_HAATZMA_UT,\n MODERN_HOLIDAY,\n emojiIsraelFlag\n )\n );\n }\n\n for (const h of staticModernHolidays) {\n if (year >= h.firstYear) {\n let hd = new HDate(h.dd, h.mm, year);\n const dow = hd.getDay();\n if (h.friSatMovetoThu && (dow === FRI || dow === SAT)) {\n hd = hd.onOrBefore(THU);\n } else if (h.friPostponeToSun && dow === FRI) {\n hd = new HDate(hd.abs() + 2);\n } else if (h.satPostponeToSun && dow === SAT) {\n hd = hd.next();\n }\n const mask = h.chul ? MODERN_HOLIDAY : MODERN_HOLIDAY | IL_ONLY;\n const ev = new HolidayEvent(hd, h.desc, mask);\n if (!h.suppressEmoji) {\n ev.emoji = '🇮🇱';\n }\n add(ev);\n }\n }\n\n let tamuz17 = new HDate(17, TAMUZ, year);\n let tamuz17attrs;\n if (tamuz17.getDay() === SAT) {\n tamuz17 = new HDate(18, TAMUZ, year);\n tamuz17attrs = {observed: true};\n }\n add(new HolidayEvent(tamuz17, hdesc.TZOM_TAMMUZ, MINOR_FAST, tamuz17attrs));\n\n let av9dt = new HDate(9, AV, year);\n let av9title = hdesc.TISHA_BAV;\n let av9attrs;\n if (av9dt.getDay() === SAT) {\n av9dt = av9dt.next();\n av9attrs = {observed: true};\n av9title += ' (observed)';\n }\n const av9abs = av9dt.abs();\n add(\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, av9abs)),\n hdesc.SHABBAT_CHAZON,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n av9dt.prev(),\n hdesc.EREV_TISHA_BAV,\n EREV | MAJOR_FAST,\n av9attrs\n ),\n new HolidayEvent(av9dt, av9title, MAJOR_FAST, av9attrs),\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, av9abs + 7)),\n hdesc.SHABBAT_NACHAMU,\n SPECIAL_SHABBAT\n )\n );\n\n const monthsInYear = HDate.monthsInYear(year);\n for (let month = 1; month <= monthsInYear; month++) {\n const monthName = HDate.getMonthName(month, year);\n if (\n (month === NISAN\n ? HDate.daysInMonth(HDate.monthsInYear(year - 1), year - 1)\n : HDate.daysInMonth(month - 1, year)) === 30\n ) {\n add(new RoshChodeshEvent(new HDate(1, month, year), monthName));\n add(new RoshChodeshEvent(new HDate(30, month - 1, year), monthName));\n } else if (month !== TISHREI) {\n add(new RoshChodeshEvent(new HDate(1, month, year), monthName));\n }\n }\n\n // Begin: Yom Kippur Katan\n // start at Iyyar because one may not fast during Nisan\n for (let month = months.IYYAR; month <= monthsInYear; month++) {\n const nextMonth = month + 1;\n // Yom Kippur Katan is not observed on the day before Rosh Hashanah.\n // Not observed prior to Rosh Chodesh Cheshvan because Yom Kippur has just passed.\n // Not observed before Rosh Chodesh Tevet, because that day is Hanukkah.\n if (\n nextMonth === TISHREI ||\n nextMonth === months.CHESHVAN ||\n nextMonth === TEVET\n ) {\n continue;\n }\n let ykk = new HDate(29, month, year);\n const dow = ykk.getDay();\n if (dow === FRI || dow === SAT) {\n ykk = ykk.onOrBefore(THU);\n }\n\n const nextMonthName = HDate.getMonthName(nextMonth, year);\n const ev = new YomKippurKatanEvent(ykk, nextMonthName);\n add(ev);\n }\n\n for (const month of [CHESHVAN, IYYAR]) {\n const roshChodesh = new HDate(1, month, year);\n let shabbos = new HDate(HDate.dayOnOrBefore(SAT, roshChodesh.abs() + 6));\n if (shabbos.abs() === roshChodesh.abs()) {\n shabbos = new HDate(shabbos.abs() + 7);\n }\n const fastDays = [2, 5, 9].map(offset => new HDate(shabbos.abs() + offset));\n if (month === IYYAR && fastDays[2].getDate() === 14) {\n fastDays[2] = new HDate(17, IYYAR, year);\n }\n for (const hd of fastDays) {\n add(new HolidayEvent(hd, hdesc.TAANIT_BEHAB, MINOR_FAST | BEHAB));\n }\n }\n\n const sedra = getSedra(year, false);\n const beshalachHd = sedra.find(15) as HDate;\n add(new HolidayEvent(beshalachHd, hdesc.SHABBAT_SHIRAH, SPECIAL_SHABBAT));\n\n // Birkat Hachamah appears only once every 28 years\n const birkatHaChama = getBirkatHaChama(year);\n if (birkatHaChama) {\n const hd = new HDate(birkatHaChama);\n add(\n new HolidayEvent(hd, hdesc.BIRKAT_HACHAMAH, MINOR_HOLIDAY, {emoji: '☀️'})\n );\n }\n\n yearCache.set(year, map);\n return map;\n}\n\n/**\n * Birkat Hachamah appears only once every 28 years.\n * Although almost always in Nisan, it can occur in Adar II.\n * - 27 Adar II 5461 (Gregorian year 1701)\n * - 29 Adar II 5993 (Gregorian year 2233)\n *\n * Due to drift, this will eventually slip into Iyyar\n * - 2 Iyyar 7141 (Gregorian year 3381)\n * @private\n */\nfunction getBirkatHaChama(year: number): number {\n const leap = HDate.isLeapYear(year);\n const startMonth = leap ? ADAR_II : NISAN;\n const startDay = leap ? 20 : 1;\n const baseRd = HDate.hebrew2abs(year, startMonth, startDay);\n for (let day = 0; day <= 40; day++) {\n const abs = baseRd + day;\n const elapsed = abs + 1373429;\n if (elapsed % 10227 === 172) {\n return abs;\n }\n }\n return 0;\n}\n\n/**\n * Returns an array of holidays for the year\n * @param year Hebrew year\n * @param il use the Israeli schedule for holidays\n */\nexport function getHolidaysForYearArray(\n year: number,\n il: boolean\n): HolidayEvent[] {\n const yearMap = getHolidaysForYear_(year);\n const startAbs = HDate.hebrew2abs(year, TISHREI, 1);\n const endAbs = HDate.hebrew2abs(year + 1, TISHREI, 1) - 1;\n let events: HolidayEvent[] = [];\n for (let absDt = startAbs; absDt <= endAbs; absDt++) {\n const hd = new HDate(absDt);\n const holidays = yearMap.get(hd.toString());\n if (holidays) {\n const filtered: HolidayEvent[] = holidays.filter(ev => ev.observedIn(il));\n events = events.concat(filtered);\n }\n }\n return events;\n}\n"],"names":["hdesc"],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AAoBH;;;;AA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A,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG;AACxB,QAAA,MAAM,OAAO,GAAG,GAAG,GAAG,OAAO;AAC7B,QAAA,IAAI,OAAO,GAAG,KAAK,KAAK,GAAG,EAAE;AAC3B,YAAA,OAAO,GAAG;QACZ;IACF;AACA,IAAA,OAAO,CAAC;AACV;AAEA;;;;AAIG;AACG,SAAU,uBAAuB,CACrC,IAAY,EACZ,EAAW,EAAA;AAEX,IAAA,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC;AACzC,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AACnD,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC;IACzD,IAAI,MAAM,GAAmB,EAAE;AAC/B,IAAA,KAAK,IAAI,KAAK,GAAG,QAAQ,EAAE,KAAK,IAAI,MAAM,EAAE,KAAK,EAAE,EAAE;AACnD,QAAA,MAAM,EAAE,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC;QAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;QAC3C,IAAI,QAAQ,EAAE;AACZ,YAAA,MAAM,QAAQ,GAAmB,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AACzE,YAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAClC;IACF;AACA,IAAA,OAAO,MAAM;AACf;;;;"}
|
|
1
|
+
{"version":3,"file":"holidays.js","sources":["../../../src/holidays.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 */\nimport {HDate, months} from '@hebcal/hdate';\nimport QuickLRU from 'quick-lru';\nimport {flags} from './event';\nimport {dateYomHaShoah, dateYomHaZikaron} from './modern';\nimport {getSedra} from './sedra';\nimport {\n staticHolidays,\n staticModernHolidays,\n holidayDesc as hdesc,\n} from './staticHolidays';\nimport {YomKippurKatanEvent} from './YomKippurKatanEvent';\nimport {\n HolidayEvent,\n ChanukahEvent,\n AsaraBTevetEvent,\n RoshHashanaEvent,\n RoshChodeshEvent,\n} from './HolidayEvent';\n\n/**\n * Returns an array of holiday Events that occur on the given date, or\n * `undefined` if no holidays occur that day.\n *\n * When `il` is omitted, both Diaspora-only and Israel-only events are\n * returned (e.g. on the second day of a Yom Tov, both `\"Pesach II\"` for\n * Diaspora and any Israel-only events). Pass `true` or `false` to filter\n * to a single schedule.\n * @example\n * import {getHolidaysOnDate, HDate, months} from '@hebcal/core';\n * const events = getHolidaysOnDate(new HDate(15, months.NISAN, 5784), false);\n * 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 */\nexport function getHolidaysOnDate(\n date: HDate | Date | number,\n il?: boolean\n): HolidayEvent[] | undefined {\n const hd = HDate.isHDate(date) ? (date as HDate) : new HDate(date);\n const hdStr = hd.toString();\n const yearMap = getHolidaysForYear_(hd.getFullYear());\n const events = yearMap.get(hdStr);\n // if il isn't a boolean return both diaspora + IL for day\n if (il === undefined || events === undefined) {\n return events;\n }\n const filtered = events.filter(ev => ev.observedIn(il));\n return filtered;\n}\n\nconst CHAG = flags.CHAG;\nconst IL_ONLY = flags.IL_ONLY;\nconst LIGHT_CANDLES_TZEIS = flags.LIGHT_CANDLES_TZEIS;\nconst CHANUKAH_CANDLES = flags.CHANUKAH_CANDLES;\nconst BEHAB = flags.BEHAB;\nconst MINOR_FAST = flags.MINOR_FAST;\nconst SPECIAL_SHABBAT = flags.SPECIAL_SHABBAT;\nconst MODERN_HOLIDAY = flags.MODERN_HOLIDAY;\nconst MAJOR_FAST = flags.MAJOR_FAST;\nconst MINOR_HOLIDAY = flags.MINOR_HOLIDAY;\nconst EREV = flags.EREV;\n\nconst SUN = 0;\nconst TUE = 2;\nconst THU = 4;\nconst FRI = 5;\nconst SAT = 6;\n\nconst NISAN = months.NISAN;\nconst IYYAR = months.IYYAR;\nconst TAMUZ = months.TAMUZ;\nconst AV = months.AV;\nconst TISHREI = months.TISHREI;\nconst CHESHVAN = months.CHESHVAN;\nconst KISLEV = months.KISLEV;\nconst TEVET = months.TEVET;\nconst ADAR_I = months.ADAR_I;\nconst ADAR_II = months.ADAR_II;\n\nconst emojiIsraelFlag = {emoji: '🇮🇱'} as const;\nexport type HolidayYearMap = Map<string, HolidayEvent[]>;\nconst yearCache = new QuickLRU<number, HolidayYearMap>({maxSize: 120});\n\n/**\n * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by\n * `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`\n * or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme.\n * @private\n */\nexport function getHolidaysForYear_(year: number): HolidayYearMap {\n if (typeof year !== 'number') {\n throw new TypeError(`bad Hebrew year: ${year}`);\n } else if (year < 1 || year > 32658) {\n throw new RangeError(`Hebrew year ${year} out of range 1-32658`);\n }\n const cached = yearCache.get(year);\n if (cached) {\n return cached;\n }\n\n const RH = new HDate(1, TISHREI, year);\n const pesach = new HDate(15, NISAN, year);\n\n const map = new Map<string, HolidayEvent[]>();\n function add(...events: HolidayEvent[]) {\n for (const ev of events) {\n const key = ev.date.toString();\n const arr = map.get(key);\n if (typeof arr === 'object') {\n if (arr[0].getFlags() & EREV) {\n arr.unshift(ev);\n } else {\n arr.push(ev);\n }\n } else {\n map.set(key, [ev]);\n }\n }\n }\n\n for (const h of staticHolidays) {\n const hd = new HDate(h.dd, h.mm, year);\n const ev = new HolidayEvent(hd, h.desc, h.flags);\n if (h.emoji) ev.emoji = h.emoji;\n if (h.chmDay) ev.cholHaMoedDay = h.chmDay;\n add(ev);\n }\n\n // standard holidays that don't shift based on year\n add(new RoshHashanaEvent(RH, year, CHAG | LIGHT_CANDLES_TZEIS));\n\n // Variable date holidays\n const tzomGedaliahDay: number = RH.getDay() === THU ? 4 : 3;\n add(\n new HolidayEvent(\n new HDate(tzomGedaliahDay, TISHREI, year),\n hdesc.TZOM_GEDALIAH,\n MINOR_FAST\n )\n );\n // first SAT after RH\n add(\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, 7 + RH.abs())),\n hdesc.SHABBAT_SHUVA,\n SPECIAL_SHABBAT\n )\n );\n const rchTevet = HDate.shortKislev(year)\n ? new HDate(1, TEVET, year)\n : new HDate(30, KISLEV, year);\n add(new HolidayEvent(rchTevet, hdesc.CHAG_HABANOT, MINOR_HOLIDAY));\n add(\n new ChanukahEvent(\n new HDate(24, KISLEV, year),\n hdesc.CHANUKAH_1_CANDLE,\n EREV | MINOR_HOLIDAY | CHANUKAH_CANDLES,\n undefined\n )\n );\n // yes, we know Kislev 30-32 are wrong\n // HDate() corrects the month automatically\n for (let candles = 2; candles <= 8; candles++) {\n const hd = new HDate(23 + candles, KISLEV, year);\n add(\n new ChanukahEvent(\n hd,\n `Chanukah: ${candles} Candles`,\n MINOR_HOLIDAY | CHANUKAH_CANDLES,\n candles - 1\n )\n );\n }\n add(\n new ChanukahEvent(\n new HDate(32, KISLEV, year),\n hdesc.CHANUKAH_8TH_DAY,\n MINOR_HOLIDAY,\n 8\n )\n );\n add(\n new AsaraBTevetEvent(\n new HDate(10, TEVET, year),\n hdesc.ASARA_BTEVET,\n MINOR_FAST\n )\n );\n const pesachAbs = pesach.abs();\n add(\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, pesachAbs - 43)),\n hdesc.SHABBAT_SHEKALIM,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, pesachAbs - 30)),\n hdesc.SHABBAT_ZACHOR,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n new HDate(pesachAbs - (pesach.getDay() === TUE ? 33 : 31)),\n hdesc.TAANIT_ESTHER,\n MINOR_FAST\n )\n );\n const haChodeshAbs = HDate.dayOnOrBefore(SAT, pesachAbs - 14);\n add(\n new HolidayEvent(\n new HDate(haChodeshAbs - 7),\n hdesc.SHABBAT_PARAH,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n new HDate(haChodeshAbs),\n hdesc.SHABBAT_HACHODESH,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, pesachAbs - 1)),\n hdesc.SHABBAT_HAGADOL,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n // if the fast falls on Shabbat, move to Thursday\n pesach.prev().getDay() === SAT\n ? pesach.onOrBefore(THU)\n : new HDate(14, NISAN, year),\n hdesc.TAANIT_BECHOROT,\n MINOR_FAST\n )\n );\n add(\n new HolidayEvent(\n new HDate(\n HDate.dayOnOrBefore(SAT, new HDate(1, TISHREI, year + 1).abs() - 4)\n ),\n hdesc.LEIL_SELICHOT,\n MINOR_HOLIDAY,\n {emoji: '🕍'}\n )\n );\n\n if (pesach.getDay() === SUN) {\n add(\n new HolidayEvent(\n new HDate(16, ADAR_II, year),\n hdesc.PURIM_MESHULASH,\n MINOR_HOLIDAY\n )\n );\n }\n\n if (HDate.isLeapYear(year)) {\n add(\n new HolidayEvent(\n new HDate(14, ADAR_I, year),\n hdesc.PURIM_KATAN,\n MINOR_HOLIDAY,\n {emoji: '🎭️'}\n )\n );\n add(\n new HolidayEvent(\n new HDate(15, ADAR_I, year),\n hdesc.SHUSHAN_PURIM_KATAN,\n MINOR_HOLIDAY,\n {emoji: '🎭️'}\n )\n );\n }\n\n const nisan27dt = dateYomHaShoah(year);\n if (nisan27dt) {\n add(new HolidayEvent(nisan27dt, hdesc.YOM_HASHOAH, MODERN_HOLIDAY));\n }\n\n const yomHaZikaronDt = dateYomHaZikaron(year);\n if (yomHaZikaronDt) {\n add(\n new HolidayEvent(\n yomHaZikaronDt,\n hdesc.YOM_HAZIKARON,\n MODERN_HOLIDAY,\n emojiIsraelFlag\n ),\n new HolidayEvent(\n yomHaZikaronDt.next(),\n hdesc.YOM_HAATZMA_UT,\n MODERN_HOLIDAY,\n emojiIsraelFlag\n )\n );\n }\n\n for (const h of staticModernHolidays) {\n if (year >= h.firstYear) {\n let hd = new HDate(h.dd, h.mm, year);\n const dow = hd.getDay();\n if (h.friSatMovetoThu && (dow === FRI || dow === SAT)) {\n hd = hd.onOrBefore(THU);\n } else if (h.friPostponeToSun && dow === FRI) {\n hd = new HDate(hd.abs() + 2);\n } else if (h.satPostponeToSun && dow === SAT) {\n hd = hd.next();\n }\n const mask = h.chul ? MODERN_HOLIDAY : MODERN_HOLIDAY | IL_ONLY;\n const ev = new HolidayEvent(hd, h.desc, mask);\n if (!h.suppressEmoji) {\n ev.emoji = '🇮🇱';\n }\n add(ev);\n }\n }\n\n let tamuz17 = new HDate(17, TAMUZ, year);\n let tamuz17attrs;\n if (tamuz17.getDay() === SAT) {\n tamuz17 = new HDate(18, TAMUZ, year);\n tamuz17attrs = {observed: true};\n }\n add(new HolidayEvent(tamuz17, hdesc.TZOM_TAMMUZ, MINOR_FAST, tamuz17attrs));\n\n let av9dt = new HDate(9, AV, year);\n let av9title = hdesc.TISHA_BAV;\n let av9attrs;\n if (av9dt.getDay() === SAT) {\n av9dt = av9dt.next();\n av9attrs = {observed: true};\n av9title += ' (observed)';\n }\n const av9abs = av9dt.abs();\n add(\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, av9abs)),\n hdesc.SHABBAT_CHAZON,\n SPECIAL_SHABBAT\n ),\n new HolidayEvent(\n av9dt.prev(),\n hdesc.EREV_TISHA_BAV,\n EREV | MAJOR_FAST,\n av9attrs\n ),\n new HolidayEvent(av9dt, av9title, MAJOR_FAST, av9attrs),\n new HolidayEvent(\n new HDate(HDate.dayOnOrBefore(SAT, av9abs + 7)),\n hdesc.SHABBAT_NACHAMU,\n SPECIAL_SHABBAT\n )\n );\n\n const monthsInYear = HDate.monthsInYear(year);\n for (let month = 1; month <= monthsInYear; month++) {\n const monthName = HDate.getMonthName(month, year);\n if (\n (month === NISAN\n ? HDate.daysInMonth(HDate.monthsInYear(year - 1), year - 1)\n : HDate.daysInMonth(month - 1, year)) === 30\n ) {\n add(new RoshChodeshEvent(new HDate(1, month, year), monthName));\n add(new RoshChodeshEvent(new HDate(30, month - 1, year), monthName));\n } else if (month !== TISHREI) {\n add(new RoshChodeshEvent(new HDate(1, month, year), monthName));\n }\n }\n\n // Begin: Yom Kippur Katan\n // start at Iyyar because one may not fast during Nisan\n for (let month = months.IYYAR; month <= monthsInYear; month++) {\n const nextMonth = month + 1;\n // Yom Kippur Katan is not observed on the day before Rosh Hashanah.\n // Not observed prior to Rosh Chodesh Cheshvan because Yom Kippur has just passed.\n // Not observed before Rosh Chodesh Tevet, because that day is Hanukkah.\n if (\n nextMonth === TISHREI ||\n nextMonth === months.CHESHVAN ||\n nextMonth === TEVET\n ) {\n continue;\n }\n let ykk = new HDate(29, month, year);\n const dow = ykk.getDay();\n if (dow === FRI || dow === SAT) {\n ykk = ykk.onOrBefore(THU);\n }\n\n const nextMonthName = HDate.getMonthName(nextMonth, year);\n const ev = new YomKippurKatanEvent(ykk, nextMonthName);\n add(ev);\n }\n\n for (const month of [CHESHVAN, IYYAR]) {\n const roshChodesh = new HDate(1, month, year);\n let shabbos = new HDate(HDate.dayOnOrBefore(SAT, roshChodesh.abs() + 6));\n if (shabbos.abs() === roshChodesh.abs()) {\n shabbos = new HDate(shabbos.abs() + 7);\n }\n const fastDays = [2, 5, 9].map(offset => new HDate(shabbos.abs() + offset));\n if (month === IYYAR && fastDays[2].getDate() === 14) {\n fastDays[2] = new HDate(17, IYYAR, year);\n }\n for (const hd of fastDays) {\n add(new HolidayEvent(hd, hdesc.TAANIT_BEHAB, MINOR_FAST | BEHAB));\n }\n }\n\n const sedra = getSedra(year, false);\n const beshalachHd = sedra.find(15) as HDate;\n add(new HolidayEvent(beshalachHd, hdesc.SHABBAT_SHIRAH, SPECIAL_SHABBAT));\n\n // Birkat Hachamah appears only once every 28 years\n const birkatHaChama = getBirkatHaChama(year);\n if (birkatHaChama) {\n const hd = new HDate(birkatHaChama);\n add(\n new HolidayEvent(hd, hdesc.BIRKAT_HACHAMAH, MINOR_HOLIDAY, {emoji: '☀️'})\n );\n }\n\n yearCache.set(year, map);\n return map;\n}\n\n/**\n * Birkat Hachamah appears only once every 28 years.\n * Although almost always in Nisan, it can occur in Adar II.\n * - 27 Adar II 5461 (Gregorian year 1701)\n * - 29 Adar II 5993 (Gregorian year 2233)\n *\n * Due to drift, this will eventually slip into Iyyar\n * - 2 Iyyar 7141 (Gregorian year 3381)\n * @private\n */\nfunction getBirkatHaChama(year: number): number {\n const leap = HDate.isLeapYear(year);\n const startMonth = leap ? ADAR_II : NISAN;\n const startDay = leap ? 20 : 1;\n const baseRd = HDate.hebrew2abs(year, startMonth, startDay);\n for (let day = 0; day <= 40; day++) {\n const abs = baseRd + day;\n const elapsed = abs + 1373429;\n if (elapsed % 10227 === 172) {\n return abs;\n }\n }\n return 0;\n}\n\n/**\n * Returns a sorted array of holidays observed during the given Hebrew year,\n * filtered by Israel vs. Diaspora schedule.\n *\n * Includes Rosh Chodesh, fasts, special Shabbatot, modern holidays, etc.,\n * but does not generate candle-lighting times, Torah readings, or Omer days.\n * Use {@link HebrewCalendar.calendar} for those.\n * @example\n * import {getHolidaysForYearArray} from '@hebcal/core';\n * const events = 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 */\nexport function getHolidaysForYearArray(\n year: number,\n il: boolean\n): HolidayEvent[] {\n const yearMap = getHolidaysForYear_(year);\n const startAbs = HDate.hebrew2abs(year, TISHREI, 1);\n const endAbs = HDate.hebrew2abs(year + 1, TISHREI, 1) - 1;\n let events: HolidayEvent[] = [];\n for (let absDt = startAbs; absDt <= endAbs; absDt++) {\n const hd = new HDate(absDt);\n const holidays = yearMap.get(hd.toString());\n if (holidays) {\n const filtered: HolidayEvent[] = holidays.filter(ev => ev.observedIn(il));\n events = events.concat(filtered);\n }\n }\n return events;\n}\n"],"names":["hdesc"],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AAoBH;;;;;;;;;;;;;;AAcG;AACG,SAAU,iBAAiB,CAC/B,IAA2B,EAC3B,EAAY,EAAA;IAEZ,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAI,IAAc,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC;AAClE,IAAA,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,OAAO,GAAG,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC;IACrD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;;IAEjC,IAAI,EAAE,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE;AAC5C,QAAA,OAAO,MAAM;IACf;AACA,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AACvD,IAAA,OAAO,QAAQ;AACjB;AAEA,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI;AACvB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO;AAC7B,MAAM,mBAAmB,GAAG,KAAK,CAAC,m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,CAAC,KAAK,CAAC;QAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;QAC3C,IAAI,QAAQ,EAAE;AACZ,YAAA,MAAM,QAAQ,GAAmB,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AACzE,YAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAClC;IACF;AACA,IAAA,OAAO,MAAM;AACf;;;;"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { MoladBase, calculateMolad } from './moladBase';
|
|
|
17
17
|
export { getMoladAsDate } from './moladDate';
|
|
18
18
|
export { Molad, MoladEvent } from './molad';
|
|
19
19
|
export { OmerEvent, OmerLang } from './omer';
|
|
20
|
-
export { TachanunResult } from './tachanun';
|
|
20
|
+
export { TachanunResult, tachanun } from './tachanun';
|
|
21
21
|
export { Sedra, SedraResult, parshiot, getSedra } from './sedra';
|
|
22
22
|
export { ParshaEvent } from './ParshaEvent';
|
|
23
23
|
export { parshaYear } from './parshaYear';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.5.
|
|
1
|
+
/*! @hebcal/core v6.5.3, distributed under GPLv2 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';
|
|
@@ -16,6 +16,7 @@ export { calculateMolad } from './moladBase.js';
|
|
|
16
16
|
export { getMoladAsDate } from './moladDate.js';
|
|
17
17
|
export { Molad, MoladEvent } from './molad.js';
|
|
18
18
|
export { OmerEvent } from './omer.js';
|
|
19
|
+
export { tachanun } from './tachanun.js';
|
|
19
20
|
export { Sedra, getSedra, parshiot } from './sedra.js';
|
|
20
21
|
export { ParshaEvent } from './ParshaEvent.js';
|
|
21
22
|
export { parshaYear } from './parshaYear.js';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
import { Location } from './location';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* this function uses solar depression of 8.5 degrees.
|
|
3
|
+
* Returns `true` if the given moment (date + time) falls within a period
|
|
4
|
+
* when *melacha* (work) is prohibited — i.e. Shabbat or a Yom Tov.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
6
|
+
* The Shabbat/Yom Tov window is taken to begin at sunset (shkiah) on the
|
|
7
|
+
* preceding day (Erev Shabbat / Erev Yom Tov / Yom Tov sheni) and to end
|
|
8
|
+
* at *tzais* (nightfall) on the day itself. *Tzais* is calculated using a
|
|
9
|
+
* solar depression of 8.5° for simplicity; consult a halachic authority
|
|
10
|
+
* for more stringent opinions.
|
|
11
|
+
*
|
|
12
|
+
* `useElevation` controls whether the location's elevation is taken into
|
|
13
|
+
* account when computing sunset (it has no effect on the degree-based
|
|
14
|
+
* tzais calculation). The Israel/Diaspora schedule comes from
|
|
15
|
+
* `location.getIsrael()`.
|
|
16
|
+
*
|
|
17
|
+
* Throws if sunset cannot be calculated for the given location
|
|
18
|
+
* (e.g. polar regions).
|
|
19
|
+
* @example
|
|
20
|
+
* import {isAssurBemlacha, Location} from '@hebcal/core';
|
|
21
|
+
* const loc = Location.lookup('Jerusalem')!;
|
|
22
|
+
* // Friday after sunset:
|
|
23
|
+
* isAssurBemlacha(new Date('2024-04-26T18:00:00Z'), loc, false); // true
|
|
24
|
+
* @param currentTime the moment to test (with hour/minute)
|
|
25
|
+
* @param location geographic location (also supplies Israel/Diaspora flag and tzid)
|
|
26
|
+
* @param useElevation include elevation when computing sunset
|
|
27
|
+
* @return `true` if *melacha* is prohibited, `false` if it is not
|
|
8
28
|
*/
|
|
9
29
|
export declare function isAssurBemlacha(currentTime: Date, location: Location, useElevation: boolean): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.5.
|
|
1
|
+
/*! @hebcal/core v6.5.3, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { HDate } from '@hebcal/hdate';
|
|
3
3
|
import { Zmanim } from './zmanim.js';
|
|
4
4
|
import { getHolidaysOnDate } from './holidays.js';
|
|
@@ -31,11 +31,31 @@ function isTodayAssurBemelacha(dow, events) {
|
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* this function uses solar depression of 8.5 degrees.
|
|
34
|
+
* Returns `true` if the given moment (date + time) falls within a period
|
|
35
|
+
* when *melacha* (work) is prohibited — i.e. Shabbat or a Yom Tov.
|
|
37
36
|
*
|
|
38
|
-
*
|
|
37
|
+
* The Shabbat/Yom Tov window is taken to begin at sunset (shkiah) on the
|
|
38
|
+
* preceding day (Erev Shabbat / Erev Yom Tov / Yom Tov sheni) and to end
|
|
39
|
+
* at *tzais* (nightfall) on the day itself. *Tzais* is calculated using a
|
|
40
|
+
* solar depression of 8.5° for simplicity; consult a halachic authority
|
|
41
|
+
* for more stringent opinions.
|
|
42
|
+
*
|
|
43
|
+
* `useElevation` controls whether the location's elevation is taken into
|
|
44
|
+
* account when computing sunset (it has no effect on the degree-based
|
|
45
|
+
* tzais calculation). The Israel/Diaspora schedule comes from
|
|
46
|
+
* `location.getIsrael()`.
|
|
47
|
+
*
|
|
48
|
+
* Throws if sunset cannot be calculated for the given location
|
|
49
|
+
* (e.g. polar regions).
|
|
50
|
+
* @example
|
|
51
|
+
* import {isAssurBemlacha, Location} from '@hebcal/core';
|
|
52
|
+
* const loc = Location.lookup('Jerusalem')!;
|
|
53
|
+
* // Friday after sunset:
|
|
54
|
+
* isAssurBemlacha(new Date('2024-04-26T18:00:00Z'), loc, false); // true
|
|
55
|
+
* @param currentTime the moment to test (with hour/minute)
|
|
56
|
+
* @param location geographic location (also supplies Israel/Diaspora flag and tzid)
|
|
57
|
+
* @param useElevation include elevation when computing sunset
|
|
58
|
+
* @return `true` if *melacha* is prohibited, `false` if it is not
|
|
39
59
|
*/
|
|
40
60
|
function isAssurBemlacha(currentTime, location, useElevation) {
|
|
41
61
|
const zmanim = new Zmanim(location, currentTime, useElevation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isAssurBemlacha.js","sources":["../../../src/isAssurBemlacha.ts"],"sourcesContent":["import {HDate} from '@hebcal/hdate';\nimport {Zmanim} from './zmanim';\nimport {Location} from './location';\nimport {getHolidaysOnDate} from './holidays';\nimport {Event, flags} from './event';\n\nconst LIGHT_CANDLES = flags.LIGHT_CANDLES | flags.LIGHT_CANDLES_TZEIS;\n\nfunction isTomorrowShabbosOrYomTov(dow: number, events: Event[]): boolean {\n if (dow === 5) {\n return true;\n }\n const erev = events.find(ev => ev.getFlags() & LIGHT_CANDLES);\n if (erev) {\n return true;\n }\n return false;\n}\n\n/**\n * Returns true if it is <em>Shabbos</em> or if it is a <em>Yom Tov</em> day that has a <em>melacha</em> (work) prohibition.\n *\n * @return if the day is a <em>Yom Tov</em> that is <em>assur bemlacha</em> or <em>Shabbos</em>\n */\nfunction isTodayAssurBemelacha(dow: number, events: Event[]): boolean {\n if (dow === 6) {\n return true;\n }\n const chag = events.find(ev => ev.getFlags() & flags.CHAG);\n if (chag) {\n return true;\n }\n return false;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"isAssurBemlacha.js","sources":["../../../src/isAssurBemlacha.ts"],"sourcesContent":["import {HDate} from '@hebcal/hdate';\nimport {Zmanim} from './zmanim';\nimport {Location} from './location';\nimport {getHolidaysOnDate} from './holidays';\nimport {Event, flags} from './event';\n\nconst LIGHT_CANDLES = flags.LIGHT_CANDLES | flags.LIGHT_CANDLES_TZEIS;\n\nfunction isTomorrowShabbosOrYomTov(dow: number, events: Event[]): boolean {\n if (dow === 5) {\n return true;\n }\n const erev = events.find(ev => ev.getFlags() & LIGHT_CANDLES);\n if (erev) {\n return true;\n }\n return false;\n}\n\n/**\n * Returns true if it is <em>Shabbos</em> or if it is a <em>Yom Tov</em> day that has a <em>melacha</em> (work) prohibition.\n *\n * @return if the day is a <em>Yom Tov</em> that is <em>assur bemlacha</em> or <em>Shabbos</em>\n */\nfunction isTodayAssurBemelacha(dow: number, events: Event[]): boolean {\n if (dow === 6) {\n return true;\n }\n const chag = events.find(ev => ev.getFlags() & flags.CHAG);\n if (chag) {\n return true;\n }\n return false;\n}\n\n/**\n * Returns `true` if the given moment (date + time) falls within a period\n * when *melacha* (work) is prohibited — i.e. Shabbat or a Yom Tov.\n *\n * The Shabbat/Yom Tov window is taken to begin at sunset (shkiah) on the\n * preceding day (Erev Shabbat / Erev Yom Tov / Yom Tov sheni) and to end\n * at *tzais* (nightfall) on the day itself. *Tzais* is calculated using a\n * solar depression of 8.5° for simplicity; consult a halachic authority\n * for more stringent opinions.\n *\n * `useElevation` controls whether the location's elevation is taken into\n * account when computing sunset (it has no effect on the degree-based\n * tzais calculation). The Israel/Diaspora schedule comes from\n * `location.getIsrael()`.\n *\n * Throws if sunset cannot be calculated for the given location\n * (e.g. polar regions).\n * @example\n * import {isAssurBemlacha, Location} from '@hebcal/core';\n * const loc = Location.lookup('Jerusalem')!;\n * // Friday after sunset:\n * isAssurBemlacha(new Date('2024-04-26T18:00:00Z'), loc, false); // true\n * @param currentTime the moment to test (with hour/minute)\n * @param location geographic location (also supplies Israel/Diaspora flag and tzid)\n * @param useElevation include elevation when computing sunset\n * @return `true` if *melacha* is prohibited, `false` if it is not\n */\nexport function isAssurBemlacha(\n currentTime: Date,\n location: Location,\n useElevation: boolean\n): boolean {\n const zmanim = new Zmanim(location, currentTime, useElevation);\n // erev shabbos, YT or YT sheni and after shkiah\n const sunset = zmanim.sunset();\n const sunsetMillis = sunset.getTime();\n if (isNaN(sunsetMillis)) {\n throw new Error('Could not determine sunset');\n }\n // erev shabbos, YT or YT sheni and after shkiah\n const il = location.getIsrael();\n const currentMillis = currentTime.getTime();\n const hd = new HDate(currentTime);\n const dow = hd.getDay();\n const events = getHolidaysOnDate(hd, il) || [];\n if (isTomorrowShabbosOrYomTov(dow, events) && currentMillis >= sunsetMillis) {\n return true;\n }\n // is shabbos or YT and it is before tzais\n if (isTodayAssurBemelacha(dow, events)) {\n const tzais = zmanim.tzeit();\n const tzaisMillis = tzais.getTime();\n return currentMillis <= tzaisMillis;\n }\n return false;\n}\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,mBAAmB;AAErE,SAAS,yBAAyB,CAAC,GAAW,EAAE,MAAe,EAAA;AAC7D,IAAA,IAAI,GAAG,KAAK,CAAC,EAAE;AACb,QAAA,OAAO,IAAI;IACb;AACA,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,GAAG,aAAa,CAAC;IAC7D,IAAI,IAAI,EAAE;AACR,QAAA,OAAO,IAAI;IACb;AACA,IAAA,OAAO,KAAK;AACd;AAEA;;;;AAIG;AACH,SAAS,qBAAqB,CAAC,GAAW,EAAE,MAAe,EAAA;AACzD,IAAA,IAAI,GAAG,KAAK,CAAC,EAAE;AACb,QAAA,OAAO,IAAI;IACb;AACA,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;IAC1D,IAAI,IAAI,EAAE;AACR,QAAA,OAAO,IAAI;IACb;AACA,IAAA,OAAO,KAAK;AACd;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;SACa,eAAe,CAC7B,WAAiB,EACjB,QAAkB,EAClB,YAAqB,EAAA;IAErB,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,YAAY,CAAC;;AAE9D,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE;AAC9B,IAAA,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,EAAE;AACrC,IAAA,IAAI,KAAK,CAAC,YAAY,CAAC,EAAE;AACvB,QAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC;IAC/C;;AAEA,IAAA,MAAM,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE;AAC/B,IAAA,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,EAAE;AAC3C,IAAA,MAAM,EAAE,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC;AACjC,IAAA,MAAM,GAAG,GAAG,EAAE,CAAC,MAAM,EAAE;IACvB,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE;IAC9C,IAAI,yBAAyB,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,aAAa,IAAI,YAAY,EAAE;AAC3E,QAAA,OAAO,IAAI;IACb;;AAEA,IAAA,IAAI,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE;AACtC,QAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE;AAC5B,QAAA,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,EAAE;QACnC,OAAO,aAAa,IAAI,WAAW;IACrC;AACA,IAAA,OAAO,KAAK;AACd;;;;"}
|
package/dist/esm/isAveilut.d.ts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { HDate } from '@hebcal/hdate';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Returns `true` if the given date falls within a public period of communal
|
|
4
|
+
* mourning — specifically:
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* - **Sefirat HaOmer**: 16 Nisan through 5 Sivan (the 49 days of the Omer).
|
|
7
|
+
* - **Bein HaMetzarim** ("between the straits"): 17 Tammuz through 9 Av
|
|
8
|
+
* (10 Av when 9 Av is postponed because it falls on Shabbat).
|
|
7
9
|
*
|
|
10
|
+
* This is a broad helper — it does not attempt to model minhag-specific
|
|
11
|
+
* exceptions within those periods (e.g. Lag BaOmer, Rosh Chodesh Iyar,
|
|
12
|
+
* the distinction between Sephardic and Ashkenazic customs on which
|
|
13
|
+
* portion of the Omer is observed as mourning, etc.).
|
|
14
|
+
* @example
|
|
15
|
+
* import {isAveilut, HDate, months} from '@hebcal/core';
|
|
16
|
+
* isAveilut(new HDate(20, months.NISAN, 5784)); // true (Omer)
|
|
17
|
+
* isAveilut(new HDate(25, months.TAMUZ, 5784)); // true (Three Weeks)
|
|
18
|
+
* isAveilut(new HDate(15, months.AV, 5784)); // false
|
|
8
19
|
* @param date Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
9
20
|
* @return `true` if the date is during a mourning period
|
|
10
21
|
*/
|
package/dist/esm/isAveilut.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.5.
|
|
1
|
+
/*! @hebcal/core v6.5.3, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { months, HDate } from '@hebcal/hdate';
|
|
3
3
|
|
|
4
4
|
const NISAN = months.NISAN;
|
|
@@ -25,11 +25,22 @@ function isBeinHaMetzarim(hd) {
|
|
|
25
25
|
return abs >= begin && abs <= end;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Returns `true` if the given date falls within a public period of communal
|
|
29
|
+
* mourning — specifically:
|
|
29
30
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
31
|
+
* - **Sefirat HaOmer**: 16 Nisan through 5 Sivan (the 49 days of the Omer).
|
|
32
|
+
* - **Bein HaMetzarim** ("between the straits"): 17 Tammuz through 9 Av
|
|
33
|
+
* (10 Av when 9 Av is postponed because it falls on Shabbat).
|
|
32
34
|
*
|
|
35
|
+
* This is a broad helper — it does not attempt to model minhag-specific
|
|
36
|
+
* exceptions within those periods (e.g. Lag BaOmer, Rosh Chodesh Iyar,
|
|
37
|
+
* the distinction between Sephardic and Ashkenazic customs on which
|
|
38
|
+
* portion of the Omer is observed as mourning, etc.).
|
|
39
|
+
* @example
|
|
40
|
+
* import {isAveilut, HDate, months} from '@hebcal/core';
|
|
41
|
+
* isAveilut(new HDate(20, months.NISAN, 5784)); // true (Omer)
|
|
42
|
+
* isAveilut(new HDate(25, months.TAMUZ, 5784)); // true (Three Weeks)
|
|
43
|
+
* isAveilut(new HDate(15, months.AV, 5784)); // false
|
|
33
44
|
* @param date Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
34
45
|
* @return `true` if the date is during a mourning period
|
|
35
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isAveilut.js","sources":["../../../src/isAveilut.ts"],"sourcesContent":["import {HDate, months} from '@hebcal/hdate';\n\nconst NISAN = months.NISAN;\nconst SIVAN = months.SIVAN;\nconst TAMUZ = months.TAMUZ;\nconst AV = months.AV;\nconst SAT = 6;\n\nfunction getHDate(date: HDate | Date | number): HDate {\n return HDate.isHDate(date) ? (date as HDate) : new HDate(date);\n}\n\nfunction isSefiratHaOmer(hd: HDate): boolean {\n const hyear = hd.getFullYear();\n const beginOmer = new HDate(16, NISAN, hyear).abs();\n const endOmer = new HDate(5, SIVAN, hyear).abs();\n const abs = hd.abs();\n return abs >= beginOmer && abs <= endOmer;\n}\n\nfunction isBeinHaMetzarim(hd: HDate): boolean {\n const hyear = hd.getFullYear();\n const begin = new HDate(17, TAMUZ, hyear).abs();\n const tishaBav = new HDate(9, AV, hyear);\n const end =\n tishaBav.getDay() === SAT ? new HDate(10, AV, hyear).abs() : tishaBav.abs();\n const abs = hd.abs();\n return abs >= begin && abs <= end;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"isAveilut.js","sources":["../../../src/isAveilut.ts"],"sourcesContent":["import {HDate, months} from '@hebcal/hdate';\n\nconst NISAN = months.NISAN;\nconst SIVAN = months.SIVAN;\nconst TAMUZ = months.TAMUZ;\nconst AV = months.AV;\nconst SAT = 6;\n\nfunction getHDate(date: HDate | Date | number): HDate {\n return HDate.isHDate(date) ? (date as HDate) : new HDate(date);\n}\n\nfunction isSefiratHaOmer(hd: HDate): boolean {\n const hyear = hd.getFullYear();\n const beginOmer = new HDate(16, NISAN, hyear).abs();\n const endOmer = new HDate(5, SIVAN, hyear).abs();\n const abs = hd.abs();\n return abs >= beginOmer && abs <= endOmer;\n}\n\nfunction isBeinHaMetzarim(hd: HDate): boolean {\n const hyear = hd.getFullYear();\n const begin = new HDate(17, TAMUZ, hyear).abs();\n const tishaBav = new HDate(9, AV, hyear);\n const end =\n tishaBav.getDay() === SAT ? new HDate(10, AV, hyear).abs() : tishaBav.abs();\n const abs = hd.abs();\n return abs >= begin && abs <= end;\n}\n\n/**\n * Returns `true` if the given date falls within a public period of communal\n * mourning — specifically:\n *\n * - **Sefirat HaOmer**: 16 Nisan through 5 Sivan (the 49 days of the Omer).\n * - **Bein HaMetzarim** (\"between the straits\"): 17 Tammuz through 9 Av\n * (10 Av when 9 Av is postponed because it falls on Shabbat).\n *\n * This is a broad helper — it does not attempt to model minhag-specific\n * exceptions within those periods (e.g. Lag BaOmer, Rosh Chodesh Iyar,\n * the distinction between Sephardic and Ashkenazic customs on which\n * portion of the Omer is observed as mourning, etc.).\n * @example\n * import {isAveilut, HDate, months} from '@hebcal/core';\n * isAveilut(new HDate(20, months.NISAN, 5784)); // true (Omer)\n * isAveilut(new HDate(25, months.TAMUZ, 5784)); // true (Three Weeks)\n * isAveilut(new HDate(15, months.AV, 5784)); // false\n * @param date Hebrew Date, Gregorian date, or absolute R.D. day number\n * @return `true` if the date is during a mourning period\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AI,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,GAAG,EAAE;AAC7E,IAAA,MAAM,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE;AACpB,IAAA,OAAO,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG;AACnC;AAEA;;;;;;;;;;;;;;;;;;;AAmBG;AACG,SAAU,SAAS,CAAC,IAA2B,EAAA;AACnD,IAAA,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC;IACzB,OAAO,eAAe,CAAC,EAAE,CAAC,IAAI,gBAAgB,CAAC,EAAE,CAAC;AACpD;;;;"}
|
package/dist/esm/isFastDay.d.ts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { HDate } from '@hebcal/hdate';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Returns `true` if the given date is observed as a major or minor fast day.
|
|
4
4
|
*
|
|
5
|
+
* Major fasts: Yom Kippur, Tish'a B'Av.
|
|
6
|
+
* Minor fasts: Tzom Gedaliah, Asara B'Tevet, Ta'anit Esther, Ta'anit
|
|
7
|
+
* Bechorot, Tzom Tammuz (plus BeHaB fasts when enabled).
|
|
8
|
+
*
|
|
9
|
+
* Erev Tish'a B'Av — even though the fast begins at sunset — is *not*
|
|
10
|
+
* counted here: only the actual fast day itself returns `true`.
|
|
11
|
+
* Postponed fasts return `true` on the actual observed date (e.g. when
|
|
12
|
+
* 17 Tammuz falls on Shabbat and is observed on the 18th).
|
|
13
|
+
* @example
|
|
14
|
+
* import {isFastDay, HDate, months} from '@hebcal/core';
|
|
15
|
+
* isFastDay(new HDate(10, months.TISHREI, 5784)); // true (Yom Kippur)
|
|
16
|
+
* isFastDay(new HDate(11, months.TISHREI, 5784)); // false
|
|
5
17
|
* @param date Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
6
18
|
* @param il use the Israeli schedule for holidays
|
|
7
19
|
* @return `true` if the date is a major or minor fast day
|
package/dist/esm/isFastDay.js
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
/*! @hebcal/core v6.5.
|
|
1
|
+
/*! @hebcal/core v6.5.3, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
import { flags } from './event.js';
|
|
3
3
|
import { getHolidaysOnDate } from './holidays.js';
|
|
4
4
|
|
|
5
5
|
const FAST_DAY = flags.MAJOR_FAST | flags.MINOR_FAST;
|
|
6
6
|
const EREV = flags.EREV;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Returns `true` if the given date is observed as a major or minor fast day.
|
|
9
9
|
*
|
|
10
|
+
* Major fasts: Yom Kippur, Tish'a B'Av.
|
|
11
|
+
* Minor fasts: Tzom Gedaliah, Asara B'Tevet, Ta'anit Esther, Ta'anit
|
|
12
|
+
* Bechorot, Tzom Tammuz (plus BeHaB fasts when enabled).
|
|
13
|
+
*
|
|
14
|
+
* Erev Tish'a B'Av — even though the fast begins at sunset — is *not*
|
|
15
|
+
* counted here: only the actual fast day itself returns `true`.
|
|
16
|
+
* Postponed fasts return `true` on the actual observed date (e.g. when
|
|
17
|
+
* 17 Tammuz falls on Shabbat and is observed on the 18th).
|
|
18
|
+
* @example
|
|
19
|
+
* import {isFastDay, HDate, months} from '@hebcal/core';
|
|
20
|
+
* isFastDay(new HDate(10, months.TISHREI, 5784)); // true (Yom Kippur)
|
|
21
|
+
* isFastDay(new HDate(11, months.TISHREI, 5784)); // false
|
|
10
22
|
* @param date Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
11
23
|
* @param il use the Israeli schedule for holidays
|
|
12
24
|
* @return `true` if the date is a major or minor fast day
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isFastDay.js","sources":["../../../src/isFastDay.ts"],"sourcesContent":["import {HDate} from '@hebcal/hdate';\nimport {flags} from './event';\nimport {getHolidaysOnDate} from './holidays';\n\nconst FAST_DAY = flags.MAJOR_FAST | flags.MINOR_FAST;\nconst EREV = flags.EREV;\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"isFastDay.js","sources":["../../../src/isFastDay.ts"],"sourcesContent":["import {HDate} from '@hebcal/hdate';\nimport {flags} from './event';\nimport {getHolidaysOnDate} from './holidays';\n\nconst FAST_DAY = flags.MAJOR_FAST | flags.MINOR_FAST;\nconst EREV = flags.EREV;\n\n/**\n * Returns `true` if the given date is observed as a major or minor fast day.\n *\n * Major fasts: Yom Kippur, Tish'a B'Av.\n * Minor fasts: Tzom Gedaliah, Asara B'Tevet, Ta'anit Esther, Ta'anit\n * Bechorot, Tzom Tammuz (plus BeHaB fasts when enabled).\n *\n * Erev Tish'a B'Av — even though the fast begins at sunset — is *not*\n * counted here: only the actual fast day itself returns `true`.\n * Postponed fasts return `true` on the actual observed date (e.g. when\n * 17 Tammuz falls on Shabbat and is observed on the 18th).\n * @example\n * import {isFastDay, HDate, months} from '@hebcal/core';\n * isFastDay(new HDate(10, months.TISHREI, 5784)); // true (Yom Kippur)\n * isFastDay(new HDate(11, months.TISHREI, 5784)); // false\n * @param date Hebrew Date, Gregorian date, or absolute R.D. day number\n * @param il use the Israeli schedule for holidays\n * @return `true` if the date is a major or minor fast day\n */\nexport function isFastDay(date: HDate | Date | number, il?: boolean): boolean {\n const events = getHolidaysOnDate(date, il) || [];\n const fastDay = events.find(ev => {\n const mask = ev.getFlags();\n return mask & FAST_DAY && !(mask & EREV);\n });\n return Boolean(fastDay);\n}\n"],"names":[],"mappings":";;;;AAIA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU;AACpD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI;AAEvB;;;;;;;;;;;;;;;;;;AAkBG;AACG,SAAU,SAAS,CAAC,IAA2B,EAAE,EAAY,EAAA;IACjE,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE;IAChD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,IAAG;AAC/B,QAAA,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC1B,OAAO,IAAI,GAAG,QAAQ,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;AAC1C,IAAA,CAAC,CAAC;AACF,IAAA,OAAO,OAAO,CAAC,OAAO,CAAC;AACzB;;;;"}
|
package/dist/esm/locale.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v6.5.
|
|
1
|
+
/*! @hebcal/core v6.5.3, distributed under GPLv2 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';
|
package/dist/esm/location.d.ts
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import { GeoLocation } from '@hebcal/noaa';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Class representing a geographic location for use with candle-lighting,
|
|
4
|
+
* havdalah, and zmanim calculations.
|
|
5
|
+
*
|
|
6
|
+
* Extends {@link GeoLocation} from `@hebcal/noaa` with Jewish-calendar
|
|
7
|
+
* specific data: an Israel/Diaspora flag, ISO country code, and an optional
|
|
8
|
+
* geographic identifier. Also provides {@link Location.lookup} for ~60
|
|
9
|
+
* built-in "classic" Hebcal cities.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import {Location} from '@hebcal/core';
|
|
13
|
+
*
|
|
14
|
+
* // Create a location for a custom address
|
|
15
|
+
* const loc = new Location(
|
|
16
|
+
* 41.85003, // latitude
|
|
17
|
+
* -87.65005, // longitude
|
|
18
|
+
* false, // not in Israel
|
|
19
|
+
* 'America/Chicago',
|
|
20
|
+
* 'Chicago, Illinois, USA',
|
|
21
|
+
* 'US'
|
|
22
|
+
* );
|
|
23
|
+
*
|
|
24
|
+
* // Or look up a built-in classic city
|
|
25
|
+
* const tlv = Location.lookup('Tel Aviv');
|
|
26
|
+
*/
|
|
3
27
|
export declare class Location extends GeoLocation {
|
|
4
28
|
private readonly il;
|
|
5
29
|
private readonly cc?;
|
|
@@ -22,18 +46,54 @@ export declare class Location extends GeoLocation {
|
|
|
22
46
|
* @param [elevation] - in meters (default `0`)
|
|
23
47
|
*/
|
|
24
48
|
constructor(latitude: number, longitude: number, il: boolean, tzid: string, cityName?: string, countryCode?: string, geoid?: string | number, elevation?: number);
|
|
49
|
+
/**
|
|
50
|
+
* Returns `true` if this location is in Israel (uses the Israeli holiday
|
|
51
|
+
* and Torah-reading schedule), `false` for the Diaspora.
|
|
52
|
+
*/
|
|
25
53
|
getIsrael(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the full descriptive location name passed to the constructor,
|
|
56
|
+
* or `null` if no name was provided.
|
|
57
|
+
* @example
|
|
58
|
+
* Location.lookup('San Francisco')?.getName(); // 'San Francisco, California, USA'
|
|
59
|
+
*/
|
|
26
60
|
getName(): string | null;
|
|
27
61
|
/**
|
|
28
|
-
* Returns the location name
|
|
62
|
+
* Returns the location name truncated at the first comma. Useful for
|
|
63
|
+
* compact display where only the city name is desired.
|
|
64
|
+
*
|
|
65
|
+
* Special-cased so that US locations of the form `"Washington, DC"` or
|
|
66
|
+
* `"Washington, D.C., ..."` keep the `DC` / `D.C.` suffix attached.
|
|
67
|
+
* @example
|
|
68
|
+
* Location.lookup('San Francisco')?.getShortName(); // 'San Francisco'
|
|
69
|
+
* Location.lookup('Washington DC')?.getShortName(); // 'Washington, DC'
|
|
29
70
|
*/
|
|
30
71
|
getShortName(): string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Returns the ISO 3166 alpha-2 country code (e.g. `"US"`, `"IL"`, `"FR"`)
|
|
74
|
+
* passed to the constructor, or `undefined` if none was provided.
|
|
75
|
+
*/
|
|
31
76
|
getCountryCode(): string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Returns the Olson timezone identifier (e.g. `"America/Chicago"`).
|
|
79
|
+
* Alias for `getTimeZone()` from the parent `GeoLocation` class.
|
|
80
|
+
*/
|
|
32
81
|
getTzid(): string;
|
|
33
82
|
/**
|
|
34
|
-
*
|
|
83
|
+
* Returns a cached 24-hour `Intl.DateTimeFormat` (e.g. `07:41` or `20:03`)
|
|
84
|
+
* configured for this location's timezone. Formatters are memoized by
|
|
85
|
+
* timezone so repeated calls do not allocate.
|
|
86
|
+
* @example
|
|
87
|
+
* const loc = Location.lookup('Tel Aviv')!;
|
|
88
|
+
* const fmt = loc.getTimeFormatter();
|
|
89
|
+
* fmt.format(new Date()); // e.g. '18:42'
|
|
35
90
|
*/
|
|
36
91
|
getTimeFormatter(): Intl.DateTimeFormat;
|
|
92
|
+
/**
|
|
93
|
+
* Returns the optional geographic identifier passed to the constructor
|
|
94
|
+
* (typically a GeoNames numeric ID or a US Zip Code string), or
|
|
95
|
+
* `undefined` if none was provided.
|
|
96
|
+
*/
|
|
37
97
|
getGeoId(): string | number | undefined;
|
|
38
98
|
/**
|
|
39
99
|
* Creates a location object from one of 60 "classic" Hebcal city names.
|
|
@@ -51,12 +111,31 @@ export declare class Location extends GeoLocation {
|
|
|
51
111
|
* 'San Diego', 'San Francisco', 'Sao Paulo', 'Seattle', 'Sydney',
|
|
52
112
|
* 'Tel Aviv', 'Tiberias', 'Toronto', 'Vancouver', 'White Plains',
|
|
53
113
|
* 'Washington DC', 'Worcester'
|
|
54
|
-
*
|
|
114
|
+
*
|
|
115
|
+
* Lookups are case-insensitive. Returns `undefined` if the name is not
|
|
116
|
+
* recognized. The list can be extended with {@link Location.addLocation}.
|
|
117
|
+
* @example
|
|
118
|
+
* const loc = Location.lookup('San Francisco');
|
|
119
|
+
* console.log(loc?.getTzid()); // 'America/Los_Angeles'
|
|
120
|
+
* @param name case-insensitive classic city name
|
|
55
121
|
*/
|
|
56
122
|
static lookup(name: string): Location | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Returns a JSON-serialized representation of this Location.
|
|
125
|
+
* Useful for debugging and structured logging.
|
|
126
|
+
*/
|
|
57
127
|
toString(): string;
|
|
58
128
|
/**
|
|
59
|
-
* Converts legacy Hebcal timezone
|
|
129
|
+
* Converts a legacy Hebcal-style timezone (a numeric GMT offset plus a
|
|
130
|
+
* coarse DST region) to a standard IANA/Olson timezone ID.
|
|
131
|
+
*
|
|
132
|
+
* This exists to migrate data from older Hebcal versions that stored
|
|
133
|
+
* timezones as GMT offset + DST scheme rather than as a full tzid.
|
|
134
|
+
* @example
|
|
135
|
+
* Location.legacyTzToTzid(2, 'israel'); // 'Asia/Jerusalem'
|
|
136
|
+
* Location.legacyTzToTzid(0, 'eu'); // 'Europe/London'
|
|
137
|
+
* Location.legacyTzToTzid(0, 'none'); // 'UTC'
|
|
138
|
+
* Location.legacyTzToTzid(-5, 'none'); // 'Etc/GMT-5'
|
|
60
139
|
* @param tz integer, GMT offset in hours
|
|
61
140
|
* @param dst 'none', 'eu', 'usa', or 'israel'
|
|
62
141
|
*/
|
|
@@ -71,9 +150,18 @@ export declare class Location extends GeoLocation {
|
|
|
71
150
|
*/
|
|
72
151
|
static getUsaTzid(state: string, tz: number, dst: string): string;
|
|
73
152
|
/**
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
153
|
+
* Registers a new named location with the built-in `Location.lookup()`
|
|
154
|
+
* registry. Names are stored case-insensitively. Returns `false` if a
|
|
155
|
+
* location with the same (lower-cased) name is already registered, and
|
|
156
|
+
* `true` if successfully added.
|
|
157
|
+
*
|
|
158
|
+
* Use this to extend the built-in set of ~60 classic Hebcal cities with
|
|
159
|
+
* your own custom locations.
|
|
160
|
+
* @example
|
|
161
|
+
* const tlv = new Location(32.0853, 34.7818, true,
|
|
162
|
+
* 'Asia/Tel_Aviv', 'My Office, Tel Aviv', 'IL');
|
|
163
|
+
* Location.addLocation('My Office', tlv); // true
|
|
164
|
+
* Location.lookup('my office')?.getTzid(); // 'Asia/Tel_Aviv'
|
|
77
165
|
*/
|
|
78
166
|
static addLocation(cityName: string, location: Location): boolean;
|
|
79
167
|
}
|