@hebcal/core 6.11.1 → 6.13.1
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 +1682 -1915
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +18 -19
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/DailyLearning.js +5 -15
- package/dist/esm/DailyLearning.js.map +1 -1
- package/dist/esm/HebrewDateEvent.d.ts +0 -4
- package/dist/esm/HebrewDateEvent.js +2 -6
- package/dist/esm/HebrewDateEvent.js.map +1 -1
- package/dist/esm/HolidayEvent.js +6 -10
- package/dist/esm/HolidayEvent.js.map +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +2 -2
- package/dist/esm/MevarchimChodeshEvent.js.map +1 -1
- package/dist/esm/ParshaEvent.js +4 -4
- package/dist/esm/ParshaEvent.js.map +1 -1
- package/dist/esm/TimedEvent.js +4 -5
- package/dist/esm/TimedEvent.js.map +1 -1
- package/dist/esm/YomKippurKatanEvent.js +2 -2
- package/dist/esm/YomKippurKatanEvent.js.map +1 -1
- package/dist/esm/ashkenazi.po.js +1 -1
- package/dist/esm/calendar.js +7 -40
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.d.ts +3 -5
- package/dist/esm/candles.js +6 -20
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/cities.json.js +1 -1
- package/dist/esm/event.js +4 -6
- package/dist/esm/event.js.map +1 -1
- package/dist/esm/getStartAndEnd.d.ts +1 -1
- package/dist/esm/getStartAndEnd.js +8 -9
- package/dist/esm/getStartAndEnd.js.map +1 -1
- package/dist/esm/hallel.d.ts +1 -3
- package/dist/esm/hallel.js +2 -4
- package/dist/esm/hallel.js.map +1 -1
- package/dist/esm/he-x-NoNikud.po.d.ts +1 -0
- package/dist/esm/he-x-NoNikud.po.js +2 -2
- package/dist/esm/he-x-NoNikud.po.js.map +1 -1
- package/dist/esm/he.po.d.ts +1 -0
- package/dist/esm/he.po.js +2 -2
- package/dist/esm/he.po.js.map +1 -1
- package/dist/esm/hebcal.js +6 -12
- package/dist/esm/hebcal.js.map +1 -1
- package/dist/esm/holidays.d.ts +1 -1
- package/dist/esm/holidays.js +111 -131
- package/dist/esm/holidays.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/isAssurBemlacha.js +5 -18
- package/dist/esm/isAssurBemlacha.js.map +1 -1
- package/dist/esm/isAveilut.js +2 -5
- package/dist/esm/isAveilut.js.map +1 -1
- package/dist/esm/isFastDay.js +3 -4
- package/dist/esm/isFastDay.js.map +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.js +2 -7
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.d.ts +8 -13
- package/dist/esm/modern.js +142 -17
- package/dist/esm/modern.js.map +1 -1
- package/dist/esm/molad.js +2 -2
- package/dist/esm/molad.js.map +1 -1
- package/dist/esm/moladBase.js +2 -3
- package/dist/esm/moladBase.js.map +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/moladDate.js.map +1 -1
- package/dist/esm/omer.js +22 -28
- package/dist/esm/omer.js.map +1 -1
- package/dist/esm/parshaName.d.ts +1 -1
- package/dist/esm/parshaName.js +3 -4
- package/dist/esm/parshaName.js.map +1 -1
- package/dist/esm/parshaYear.js +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 +17 -16
- package/dist/esm/reformatTimeStr.js.map +1 -1
- package/dist/esm/sedra.d.ts +0 -2
- package/dist/esm/sedra.js +19 -28
- package/dist/esm/sedra.js.map +1 -1
- package/dist/esm/sefira.json.js +1 -1
- package/dist/esm/staticHolidays.d.ts +8 -14
- package/dist/esm/staticHolidays.js +179 -470
- package/dist/esm/staticHolidays.js.map +1 -1
- package/dist/esm/string.js +1 -1
- package/dist/esm/tachanun.js +2 -6
- package/dist/esm/tachanun.js.map +1 -1
- package/dist/esm/zmanim.d.ts +0 -2
- package/dist/esm/zmanim.js +19 -22
- package/dist/esm/zmanim.js.map +1 -1
- package/package.json +7 -7
- package/po/he-x-NoNikud.po +3 -0
- package/po/he.po +3 -0
package/dist/bundle.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.13.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
var hebcal = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
6
|
-
const version = '6.
|
|
6
|
+
const version = '6.13.1';
|
|
7
7
|
|
|
8
|
-
/*! @hebcal/hdate v0.
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
monthLengths
|
|
8
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
9
|
+
/**
|
|
10
|
+
* Days per Gregorian month (1-based), indexed first by `+isGregLeapYear()`.
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
const monthLengths = [
|
|
14
|
+
[0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
|
15
|
+
[0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
|
16
|
+
];
|
|
14
17
|
/**
|
|
15
18
|
* @private
|
|
16
19
|
*/
|
|
@@ -88,8 +91,7 @@ function daysInGregMonth(month, year) {
|
|
|
88
91
|
* isDate(1700000000000); // false
|
|
89
92
|
*/
|
|
90
93
|
function isDate(obj) {
|
|
91
|
-
|
|
92
|
-
return typeof obj === 'object' && Date.prototype.isPrototypeOf(obj);
|
|
94
|
+
return obj instanceof Date;
|
|
93
95
|
}
|
|
94
96
|
/**
|
|
95
97
|
* @private
|
|
@@ -189,8 +191,7 @@ function abs2greg(abs) {
|
|
|
189
191
|
return dt;
|
|
190
192
|
}
|
|
191
193
|
|
|
192
|
-
/*! @hebcal/hdate v0.
|
|
193
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
194
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
194
195
|
/**
|
|
195
196
|
* Gregorian date helper functions.
|
|
196
197
|
*
|
|
@@ -210,16 +211,15 @@ function abs2greg(abs) {
|
|
|
210
211
|
* greg.greg2abs(new Date(2008, 10, 13)); // 733359
|
|
211
212
|
* greg.isLeapYear(2024); // true
|
|
212
213
|
*/
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
exports.greg.isLeapYear = isGregLeapYear;
|
|
214
|
+
const greg = {
|
|
215
|
+
abs2greg,
|
|
216
|
+
daysInMonth: daysInGregMonth,
|
|
217
|
+
greg2abs,
|
|
218
|
+
isDate,
|
|
219
|
+
isLeapYear: isGregLeapYear,
|
|
220
|
+
};
|
|
221
221
|
|
|
222
|
-
/*! @hebcal/hdate v0.
|
|
222
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
223
223
|
/**
|
|
224
224
|
* Removes niqqud from Hebrew string
|
|
225
225
|
* @example
|
|
@@ -235,23 +235,23 @@ function hebrewStripNikkud(str) {
|
|
|
235
235
|
return a.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
/*! @hebcal/hdate v0.
|
|
238
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
239
239
|
/*
|
|
240
240
|
* More minimal HDate
|
|
241
241
|
*/
|
|
242
|
-
const NISAN$
|
|
243
|
-
const IYYAR$
|
|
244
|
-
const SIVAN$
|
|
242
|
+
const NISAN$6 = 1;
|
|
243
|
+
const IYYAR$3 = 2;
|
|
244
|
+
const SIVAN$3 = 3;
|
|
245
245
|
const TAMUZ$2 = 4;
|
|
246
|
-
const AV$
|
|
247
|
-
const ELUL$
|
|
248
|
-
const TISHREI$
|
|
249
|
-
const CHESHVAN$
|
|
246
|
+
const AV$3 = 5;
|
|
247
|
+
const ELUL$2 = 6;
|
|
248
|
+
const TISHREI$3 = 7;
|
|
249
|
+
const CHESHVAN$3 = 8;
|
|
250
250
|
const KISLEV$2 = 9;
|
|
251
251
|
const TEVET$2 = 10;
|
|
252
|
-
const SHVAT$
|
|
252
|
+
const SHVAT$2 = 11;
|
|
253
253
|
const ADAR_I$2 = 12;
|
|
254
|
-
const ADAR_II$
|
|
254
|
+
const ADAR_II$3 = 13;
|
|
255
255
|
/**
|
|
256
256
|
* Hebrew months of the year (NISAN=1, TISHREI=7).
|
|
257
257
|
*
|
|
@@ -271,31 +271,31 @@ const ADAR_II$2 = 13;
|
|
|
271
271
|
*/
|
|
272
272
|
const months = {
|
|
273
273
|
/** Nissan / ניסן */
|
|
274
|
-
NISAN: NISAN$
|
|
274
|
+
NISAN: NISAN$6,
|
|
275
275
|
/** Iyyar / אייר */
|
|
276
|
-
IYYAR: IYYAR$
|
|
276
|
+
IYYAR: IYYAR$3,
|
|
277
277
|
/** Sivan / סיון */
|
|
278
|
-
SIVAN: SIVAN$
|
|
278
|
+
SIVAN: SIVAN$3,
|
|
279
279
|
/** Tamuz (sometimes Tammuz) / תמוז */
|
|
280
280
|
TAMUZ: TAMUZ$2,
|
|
281
281
|
/** Av / אב */
|
|
282
|
-
AV: AV$
|
|
282
|
+
AV: AV$3,
|
|
283
283
|
/** Elul / אלול */
|
|
284
|
-
ELUL: ELUL$
|
|
284
|
+
ELUL: ELUL$2,
|
|
285
285
|
/** Tishrei / תִּשְׁרֵי */
|
|
286
|
-
TISHREI: TISHREI$
|
|
286
|
+
TISHREI: TISHREI$3,
|
|
287
287
|
/** Cheshvan / חשון */
|
|
288
|
-
CHESHVAN: CHESHVAN$
|
|
288
|
+
CHESHVAN: CHESHVAN$3,
|
|
289
289
|
/** Kislev / כסלו */
|
|
290
290
|
KISLEV: KISLEV$2,
|
|
291
291
|
/** Tevet / טבת */
|
|
292
292
|
TEVET: TEVET$2,
|
|
293
293
|
/** Sh'vat / שבט */
|
|
294
|
-
SHVAT: SHVAT$
|
|
294
|
+
SHVAT: SHVAT$2,
|
|
295
295
|
/** Adar or Adar Rishon / אדר */
|
|
296
296
|
ADAR_I: ADAR_I$2,
|
|
297
297
|
/** Adar Sheini (only on leap years) / אדר ב׳ */
|
|
298
|
-
ADAR_II: ADAR_II$
|
|
298
|
+
ADAR_II: ADAR_II$3,
|
|
299
299
|
};
|
|
300
300
|
const NISAN_STR = 'Nisan';
|
|
301
301
|
const monthNames0 = [
|
|
@@ -368,17 +368,17 @@ function hebrew2abs(year, month, day) {
|
|
|
368
368
|
throw new RangeError(`hebrew2abs: invalid year ${year}`);
|
|
369
369
|
}
|
|
370
370
|
let tempabs = day;
|
|
371
|
-
if (month < TISHREI$
|
|
371
|
+
if (month < TISHREI$3) {
|
|
372
372
|
const endMonth = monthsInYear(year);
|
|
373
|
-
for (let m = TISHREI$
|
|
373
|
+
for (let m = TISHREI$3; m <= endMonth; m++) {
|
|
374
374
|
tempabs += daysInMonth(m, year);
|
|
375
375
|
}
|
|
376
|
-
for (let m = NISAN$
|
|
376
|
+
for (let m = NISAN$6; m < month; m++) {
|
|
377
377
|
tempabs += daysInMonth(m, year);
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
else {
|
|
381
|
-
for (let m = TISHREI$
|
|
381
|
+
for (let m = TISHREI$3; m < month; m++) {
|
|
382
382
|
tempabs += daysInMonth(m, year);
|
|
383
383
|
}
|
|
384
384
|
}
|
|
@@ -475,7 +475,7 @@ function daysInMonth(month, year) {
|
|
|
475
475
|
return d;
|
|
476
476
|
if (month === ADAR_I$2)
|
|
477
477
|
return isLeapYear(year) ? 30 : 29;
|
|
478
|
-
if (month === CHESHVAN$
|
|
478
|
+
if (month === CHESHVAN$3)
|
|
479
479
|
return longCheshvan(year) ? 30 : 29;
|
|
480
480
|
return shortKislev(year) ? 29 : 30; // KISLEV
|
|
481
481
|
}
|
|
@@ -606,6 +606,52 @@ function longCheshvan(year) {
|
|
|
606
606
|
function shortKislev(year) {
|
|
607
607
|
return daysInYear(year) % 10 === 3;
|
|
608
608
|
}
|
|
609
|
+
/**
|
|
610
|
+
* Resolves the "Adar I vs Adar II" ambiguity from the ordinal that trails
|
|
611
|
+
* an Adar month name.
|
|
612
|
+
*
|
|
613
|
+
* By the time this is called the caller has already decided the month is
|
|
614
|
+
* Adar (the name began with `ad` or `אד`) and has normalized `c`: trimmed,
|
|
615
|
+
* lower-cased, nikud removed, and any leading bet prefix stripped. This
|
|
616
|
+
* looks only at whatever follows the `adar`/`אדר` stem, ignoring the
|
|
617
|
+
* separator (space, hyphen, period) and any gershayim, and answers which
|
|
618
|
+
* of the two Adars was meant.
|
|
619
|
+
*
|
|
620
|
+
* Recognized as **Adar I** (the _first_ Adar): a bare `1`, roman `i`,
|
|
621
|
+
* Latin `a`, `alef`/`aleph`/`alaph`, `rishon` (any `rish…`), or Hebrew
|
|
622
|
+
* `א` / `ראשון` (any `ראש…`) / `אלף` (any `אל…`).
|
|
623
|
+
*
|
|
624
|
+
* Everything else resolves to **Adar II** (the _second_ Adar). That covers
|
|
625
|
+
* the explicit second-Adar spellings — `2`, roman `ii`, Latin `b`,
|
|
626
|
+
* `bet`/`beit`/`beis`, `sheni`/`sheini`, Hebrew `ב` / `שני` — but is also
|
|
627
|
+
* the deliberate default for the ambiguous cases: a bare `Adar` with no
|
|
628
|
+
* ordinal at all, or an unrecognized suffix such as `Adar Bogus`. An
|
|
629
|
+
* unqualified Adar conventionally denotes the second Adar in a leap year,
|
|
630
|
+
* so defaulting there keeps a silent miss on the more likely month.
|
|
631
|
+
*
|
|
632
|
+
* @param c normalized month name, already known to start with `adar`/`אדר`
|
|
633
|
+
* @returns {@link ADAR_I} (12) or {@link ADAR_II} (13)
|
|
634
|
+
*/
|
|
635
|
+
function adarFromName(c) {
|
|
636
|
+
// Look only at the ordinal after the "adar"/"אדר" stem, and drop the
|
|
637
|
+
// separator (space/hyphen/period) plus any gershayim so that
|
|
638
|
+
// "Adar I", "Adar-I", "AdarI" and "אדר א׳" all reduce to the same token.
|
|
639
|
+
const suffix = c.replace(/^(adar|אדר)/, '').replace(/[\s.'`\-׳״]/g, '');
|
|
640
|
+
if (suffix === '1' ||
|
|
641
|
+
suffix === 'i' ||
|
|
642
|
+
suffix === 'a' ||
|
|
643
|
+
suffix === 'א' ||
|
|
644
|
+
suffix.startsWith('alef') ||
|
|
645
|
+
suffix.startsWith('aleph') ||
|
|
646
|
+
suffix.startsWith('alaph') ||
|
|
647
|
+
suffix.startsWith('rish') ||
|
|
648
|
+
suffix.startsWith('ראש') /* ראש (rishon) */ ||
|
|
649
|
+
suffix.startsWith('אל') /* אלף (alef) */) {
|
|
650
|
+
return ADAR_I$2;
|
|
651
|
+
}
|
|
652
|
+
// Explicit second-Adar spellings and every ambiguous form default here.
|
|
653
|
+
return ADAR_II$3;
|
|
654
|
+
}
|
|
609
655
|
/**
|
|
610
656
|
* Converts Hebrew month string name to numeric.
|
|
611
657
|
*
|
|
@@ -613,17 +659,39 @@ function shortKislev(year) {
|
|
|
613
659
|
* names with or without nikud (`'חשון'`, `'תִּשְׁרֵי'`), an optional bet
|
|
614
660
|
* prefix (`'בתמוז'`), and passes numbers through unchanged. Matching is
|
|
615
661
|
* case-insensitive and only needs enough of the name to be unambiguous.
|
|
616
|
-
*
|
|
662
|
+
*
|
|
663
|
+
* Before matching, the name is trimmed and lower-cased, its nikud is
|
|
664
|
+
* removed (so `'תִּשְׁרֵי'` matches `'תשרי'`), and a single leading Hebrew
|
|
665
|
+
* bet — the "in/of" prefix, as in `'בתמוז'` ("in Tamuz") — is dropped.
|
|
666
|
+
*
|
|
667
|
+
* ### Adar in a leap year
|
|
668
|
+
*
|
|
669
|
+
* Once the name is recognized as Adar, the trailing ordinal decides
|
|
670
|
+
* between Adar I and Adar II across the many ways it gets written:
|
|
671
|
+
*
|
|
672
|
+
* - **Adar I** — `'Adar I'`, `'Adar 1'`, `'Adar Alef'`, `'Adar Rishon'`,
|
|
673
|
+
* `'אדר א'`, `'אדר ראשון'`.
|
|
674
|
+
* - **Adar II** — `'Adar II'`, `'Adar 2'`, `'Adar Bet'`, `'Adar Sheni'`,
|
|
675
|
+
* `'אדר ב'`, `'אדר שני'`.
|
|
676
|
+
*
|
|
677
|
+
* When the ordinal is missing or unrecognized (a bare `'Adar'`, or
|
|
678
|
+
* something like `'Adar Bogus'`) the result is **ambiguous and defaults to
|
|
679
|
+
* Adar II**, following the convention that an unqualified Adar means the
|
|
680
|
+
* second Adar in a leap year. See {@link adarFromName} for the full set of
|
|
681
|
+
* accepted spellings.
|
|
682
|
+
*
|
|
617
683
|
* @param monthName monthName
|
|
618
684
|
* @returns Hebrew month number (1=NISAN, 7=TISHREI)
|
|
619
685
|
* @throws {TypeError} if `monthName` is neither a string nor a number
|
|
620
686
|
* @throws {RangeError} if the name is not recognized, or a numeric month
|
|
621
687
|
* is outside 1-14
|
|
622
688
|
* @example
|
|
623
|
-
* monthFromName('Cheshvan');
|
|
624
|
-
* monthFromName('חשון');
|
|
625
|
-
* monthFromName('Adar
|
|
626
|
-
* monthFromName(
|
|
689
|
+
* monthFromName('Cheshvan'); // 8
|
|
690
|
+
* monthFromName('חשון'); // 8
|
|
691
|
+
* monthFromName('Adar Rishon'); // 12 (Adar I)
|
|
692
|
+
* monthFromName('Adar II'); // 13 (Adar II)
|
|
693
|
+
* monthFromName('Adar'); // 13 (ambiguous, defaults to Adar II)
|
|
694
|
+
* monthFromName(7); // 7 (passthrough)
|
|
627
695
|
*/
|
|
628
696
|
function monthFromName(monthName) {
|
|
629
697
|
if (typeof monthName === 'number') {
|
|
@@ -670,23 +738,23 @@ function monthFromName(monthName) {
|
|
|
670
738
|
if (c[1] === 'o') {
|
|
671
739
|
break; /* this catches "november" */
|
|
672
740
|
}
|
|
673
|
-
return NISAN$
|
|
741
|
+
return NISAN$6;
|
|
674
742
|
case 'i':
|
|
675
|
-
return IYYAR$
|
|
743
|
+
return IYYAR$3;
|
|
676
744
|
case 'e':
|
|
677
|
-
return ELUL$
|
|
745
|
+
return ELUL$2;
|
|
678
746
|
case 'c':
|
|
679
747
|
case 'ח':
|
|
680
|
-
return CHESHVAN$
|
|
748
|
+
return CHESHVAN$3;
|
|
681
749
|
case 'k':
|
|
682
750
|
case 'כ':
|
|
683
751
|
return KISLEV$2;
|
|
684
752
|
case 's':
|
|
685
753
|
switch (c[1]) {
|
|
686
754
|
case 'i':
|
|
687
|
-
return SIVAN$
|
|
755
|
+
return SIVAN$3;
|
|
688
756
|
case 'h':
|
|
689
|
-
return SHVAT$
|
|
757
|
+
return SHVAT$2;
|
|
690
758
|
}
|
|
691
759
|
break;
|
|
692
760
|
case 't':
|
|
@@ -694,7 +762,7 @@ function monthFromName(monthName) {
|
|
|
694
762
|
case 'a':
|
|
695
763
|
return TAMUZ$2;
|
|
696
764
|
case 'i':
|
|
697
|
-
return TISHREI$
|
|
765
|
+
return TISHREI$3;
|
|
698
766
|
case 'e':
|
|
699
767
|
return TEVET$2;
|
|
700
768
|
}
|
|
@@ -702,33 +770,27 @@ function monthFromName(monthName) {
|
|
|
702
770
|
case 'a':
|
|
703
771
|
switch (c[1]) {
|
|
704
772
|
case 'v':
|
|
705
|
-
return AV$
|
|
773
|
+
return AV$3;
|
|
706
774
|
case 'd':
|
|
707
|
-
|
|
708
|
-
return ADAR_I$2;
|
|
709
|
-
}
|
|
710
|
-
return ADAR_II$2; // else assume sheini
|
|
775
|
+
return adarFromName(c);
|
|
711
776
|
}
|
|
712
777
|
break;
|
|
713
778
|
case 'ס':
|
|
714
|
-
return SIVAN$
|
|
779
|
+
return SIVAN$3;
|
|
715
780
|
case 'ט':
|
|
716
781
|
return TEVET$2;
|
|
717
782
|
case 'ש':
|
|
718
|
-
return SHVAT$
|
|
783
|
+
return SHVAT$2;
|
|
719
784
|
case 'א':
|
|
720
785
|
switch (c[1]) {
|
|
721
786
|
case 'ב':
|
|
722
|
-
return AV$
|
|
787
|
+
return AV$3;
|
|
723
788
|
case 'ד':
|
|
724
|
-
|
|
725
|
-
return ADAR_I$2;
|
|
726
|
-
}
|
|
727
|
-
return ADAR_II$2; // else assume sheini
|
|
789
|
+
return adarFromName(c);
|
|
728
790
|
case 'י':
|
|
729
|
-
return IYYAR$
|
|
791
|
+
return IYYAR$3;
|
|
730
792
|
case 'ל':
|
|
731
|
-
return ELUL$
|
|
793
|
+
return ELUL$2;
|
|
732
794
|
}
|
|
733
795
|
break;
|
|
734
796
|
case 'ת':
|
|
@@ -736,32 +798,33 @@ function monthFromName(monthName) {
|
|
|
736
798
|
case 'מ':
|
|
737
799
|
return TAMUZ$2;
|
|
738
800
|
case 'ש':
|
|
739
|
-
return TISHREI$
|
|
801
|
+
return TISHREI$3;
|
|
740
802
|
}
|
|
741
803
|
break;
|
|
742
804
|
}
|
|
743
805
|
throw new RangeError(`bad monthName: ${monthName}`);
|
|
744
806
|
}
|
|
745
807
|
|
|
746
|
-
/*! @hebcal/hdate v0.
|
|
747
|
-
const NISAN$
|
|
748
|
-
const CHESHVAN$
|
|
808
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
809
|
+
const NISAN$5 = months.NISAN;
|
|
810
|
+
const CHESHVAN$2 = months.CHESHVAN;
|
|
749
811
|
const KISLEV$1 = months.KISLEV;
|
|
750
812
|
const TEVET$1 = months.TEVET;
|
|
751
|
-
const SHVAT = months.SHVAT;
|
|
813
|
+
const SHVAT$1 = months.SHVAT;
|
|
752
814
|
const ADAR_I$1 = months.ADAR_I;
|
|
753
|
-
const ADAR_II$
|
|
815
|
+
const ADAR_II$2 = months.ADAR_II;
|
|
754
816
|
/**
|
|
755
817
|
* Returns true if the object is a SimpleHebrewDate
|
|
756
818
|
* @private
|
|
757
819
|
*/
|
|
758
|
-
function isSimpleHebrewDate$1(
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
typeof
|
|
820
|
+
function isSimpleHebrewDate$1(obj) {
|
|
821
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
822
|
+
return false;
|
|
823
|
+
}
|
|
824
|
+
const hd = obj;
|
|
825
|
+
return (typeof hd.yy === 'number' &&
|
|
826
|
+
typeof hd.mm === 'number' &&
|
|
827
|
+
typeof hd.dd === 'number');
|
|
765
828
|
}
|
|
766
829
|
/**
|
|
767
830
|
* Normalizes any accepted form of an event date into a `SimpleHebrewDate`.
|
|
@@ -775,15 +838,12 @@ function isSimpleHebrewDate$1(obj0) {
|
|
|
775
838
|
*/
|
|
776
839
|
function toSimpleHebrewDate(obj) {
|
|
777
840
|
if (isSimpleHebrewDate$1(obj)) {
|
|
778
|
-
|
|
779
|
-
return { yy: hd.yy, mm: hd.mm, dd: hd.dd };
|
|
841
|
+
return { yy: obj.yy, mm: obj.mm, dd: obj.dd };
|
|
780
842
|
}
|
|
781
843
|
else if (isDate(obj)) {
|
|
782
|
-
|
|
783
|
-
return abs2hebrew(abs);
|
|
844
|
+
return abs2hebrew(greg2abs(obj));
|
|
784
845
|
}
|
|
785
846
|
else {
|
|
786
|
-
// typeof obj === 'number'
|
|
787
847
|
return abs2hebrew(obj);
|
|
788
848
|
}
|
|
789
849
|
}
|
|
@@ -849,7 +909,7 @@ function getYahrzeitHD(hyear, date) {
|
|
|
849
909
|
// Hebrew year ${hyear} occurs on or before original date in ${hDeath.yy}
|
|
850
910
|
return undefined;
|
|
851
911
|
}
|
|
852
|
-
if (hDeath.mm === CHESHVAN$
|
|
912
|
+
if (hDeath.mm === CHESHVAN$2 &&
|
|
853
913
|
hDeath.dd === 30 &&
|
|
854
914
|
!longCheshvan(hDeath.yy + 1)) {
|
|
855
915
|
// If it's Heshvan 30 it depends on the first anniversary;
|
|
@@ -863,7 +923,7 @@ function getYahrzeitHD(hyear, date) {
|
|
|
863
923
|
// if that was not Kislev 30, use the day before Teveth 1.
|
|
864
924
|
hDeath = abs2hebrew(hebrew2abs(hyear, TEVET$1, 1) - 1);
|
|
865
925
|
}
|
|
866
|
-
else if (hDeath.mm === ADAR_II$
|
|
926
|
+
else if (hDeath.mm === ADAR_II$2) {
|
|
867
927
|
// If it's Adar II, use the same day in last month of year (Adar or Adar II).
|
|
868
928
|
hDeath.mm = monthsInYear(hyear);
|
|
869
929
|
}
|
|
@@ -871,11 +931,11 @@ function getYahrzeitHD(hyear, date) {
|
|
|
871
931
|
// If it's the 30th in Adar I and year is not a leap year
|
|
872
932
|
// (so Adar has only 29 days), use the last day in Shevat.
|
|
873
933
|
hDeath.dd = 30;
|
|
874
|
-
hDeath.mm = SHVAT;
|
|
934
|
+
hDeath.mm = SHVAT$1;
|
|
875
935
|
}
|
|
876
936
|
// In all other cases, use the normal anniversary of the date of death.
|
|
877
937
|
// advance day to rosh chodesh if needed
|
|
878
|
-
if (hDeath.mm === CHESHVAN$
|
|
938
|
+
if (hDeath.mm === CHESHVAN$2 && hDeath.dd === 30 && !longCheshvan(hyear)) {
|
|
879
939
|
hDeath.mm = KISLEV$1;
|
|
880
940
|
hDeath.dd = 1;
|
|
881
941
|
}
|
|
@@ -943,10 +1003,10 @@ function getBirthdayHD(hyear, date) {
|
|
|
943
1003
|
const isOrigLeap = isLeapYear(origYear);
|
|
944
1004
|
let month = orig.mm;
|
|
945
1005
|
let day = orig.dd;
|
|
946
|
-
if ((month === ADAR_I$1 && !isOrigLeap) || (month === ADAR_II$
|
|
1006
|
+
if ((month === ADAR_I$1 && !isOrigLeap) || (month === ADAR_II$2 && isOrigLeap)) {
|
|
947
1007
|
month = monthsInYear(hyear);
|
|
948
1008
|
}
|
|
949
|
-
else if (month === CHESHVAN$
|
|
1009
|
+
else if (month === CHESHVAN$2 && day === 30 && !longCheshvan(hyear)) {
|
|
950
1010
|
month = KISLEV$1;
|
|
951
1011
|
day = 1;
|
|
952
1012
|
}
|
|
@@ -958,13 +1018,13 @@ function getBirthdayHD(hyear, date) {
|
|
|
958
1018
|
day === 30 &&
|
|
959
1019
|
isOrigLeap &&
|
|
960
1020
|
!isLeapYear(hyear)) {
|
|
961
|
-
month = NISAN$
|
|
1021
|
+
month = NISAN$5;
|
|
962
1022
|
day = 1;
|
|
963
1023
|
}
|
|
964
1024
|
return { yy: hyear, mm: month, dd: day };
|
|
965
1025
|
}
|
|
966
1026
|
|
|
967
|
-
/*! @hebcal/hdate v0.
|
|
1027
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
968
1028
|
const GERESH = '׳';
|
|
969
1029
|
const GERSHAYIM = '״';
|
|
970
1030
|
const heb2num = {
|
|
@@ -995,6 +1055,19 @@ const num2heb = {};
|
|
|
995
1055
|
for (const [key, val] of Object.entries(heb2num)) {
|
|
996
1056
|
num2heb[val] = key;
|
|
997
1057
|
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Final (sofit) Hebrew letters mapped to the value of their base form.
|
|
1060
|
+
* Used only when parsing a gematriya string; `gematriya()` never emits
|
|
1061
|
+
* these forms, so they are kept out of `heb2num` to avoid clobbering the
|
|
1062
|
+
* `num2heb` reverse map.
|
|
1063
|
+
*/
|
|
1064
|
+
const sofit2num = {
|
|
1065
|
+
ך: 20,
|
|
1066
|
+
ם: 40,
|
|
1067
|
+
ן: 50,
|
|
1068
|
+
ף: 80,
|
|
1069
|
+
ץ: 90,
|
|
1070
|
+
};
|
|
998
1071
|
function num2digits(num) {
|
|
999
1072
|
const digits = [];
|
|
1000
1073
|
while (num > 0) {
|
|
@@ -1027,7 +1100,7 @@ function num2digits(num) {
|
|
|
1027
1100
|
* gematriya(1123) // 'א׳קכ״ג'
|
|
1028
1101
|
*/
|
|
1029
1102
|
function gematriya(num) {
|
|
1030
|
-
const num1 = parseInt(num, 10);
|
|
1103
|
+
const num1 = parseInt(String(num), 10);
|
|
1031
1104
|
if (!num1 || num1 < 0) {
|
|
1032
1105
|
throw new TypeError(`invalid number: ${num}`);
|
|
1033
1106
|
}
|
|
@@ -1055,11 +1128,14 @@ function gematriya(num) {
|
|
|
1055
1128
|
/**
|
|
1056
1129
|
* Converts a string of Hebrew letters to a numerical value.
|
|
1057
1130
|
*
|
|
1058
|
-
*
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1131
|
+
* Considers the value of Hebrew letters `א` through `ת`, and the five final
|
|
1132
|
+
* (sofit) forms `ך`, `ם`, `ן`, `ף`, `ץ`, which count as their base letters
|
|
1133
|
+
* (20, 40, 50, 80, 90). This matches how Hebrew years are written — e.g.
|
|
1134
|
+
* `תש״ף` is 780 — since the last letter of a year falls in final form.
|
|
1135
|
+
* Vowels (nekudot) are ignored.
|
|
1061
1136
|
* @example
|
|
1062
1137
|
* gematriyaStrToNum('תשע״ד'); // 774
|
|
1138
|
+
* gematriyaStrToNum('תש״ף'); // 780 (final pe)
|
|
1063
1139
|
* gematriyaStrToNum('ט״ו'); // 15
|
|
1064
1140
|
* gematriyaStrToNum('ג׳תשס״א'); // 3761 (thousands prefix)
|
|
1065
1141
|
*/
|
|
@@ -1075,7 +1151,7 @@ function gematriyaStrToNum(str) {
|
|
|
1075
1151
|
str = str.substring(gereshIdx);
|
|
1076
1152
|
}
|
|
1077
1153
|
for (const ch of str) {
|
|
1078
|
-
const n = heb2num[ch];
|
|
1154
|
+
const n = heb2num[ch] ?? sofit2num[ch];
|
|
1079
1155
|
if (typeof n === 'number') {
|
|
1080
1156
|
num += n;
|
|
1081
1157
|
}
|
|
@@ -1083,7 +1159,7 @@ function gematriyaStrToNum(str) {
|
|
|
1083
1159
|
return num;
|
|
1084
1160
|
}
|
|
1085
1161
|
|
|
1086
|
-
/*! @hebcal/hdate v0.
|
|
1162
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
1087
1163
|
/**
|
|
1088
1164
|
* Formats a number with leading zeros so the resulting string is 4 digits long.
|
|
1089
1165
|
* Similar to `string.padStart(4, '0')` but will also format
|
|
@@ -1123,7 +1199,7 @@ function pad2(num) {
|
|
|
1123
1199
|
return String(num);
|
|
1124
1200
|
}
|
|
1125
1201
|
|
|
1126
|
-
/*! @hebcal/hdate v0.
|
|
1202
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
1127
1203
|
const _formatters = new Map();
|
|
1128
1204
|
/**
|
|
1129
1205
|
* @private
|
|
@@ -1204,13 +1280,13 @@ function isoDateString(dt) {
|
|
|
1204
1280
|
pad2(dt.getDate()));
|
|
1205
1281
|
}
|
|
1206
1282
|
|
|
1207
|
-
/*! @hebcal/hdate v0.
|
|
1283
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
1208
1284
|
var poAshkenazi$1 = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "und-x-ashkenaz" }, "contexts": { "": { "Tevet": ["Teves"] } } };
|
|
1209
1285
|
|
|
1210
|
-
/*! @hebcal/hdate v0.
|
|
1286
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
1211
1287
|
var poHe$1 = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "he" }, "contexts": { "": { "Adar": ["אֲדָר"], "Adar I": ["אֲדָר א׳"], "Adar II": ["אֲדָר ב׳"], "Av": ["אָב"], "Cheshvan": ["חֶשְׁוָן"], "Elul": ["אֱלוּל"], "Iyyar": ["אִיָּיר"], "Kislev": ["כִּסְלֵו"], "Nisan": ["נִיסָן"], "Sh'vat": ["שְׁבָט"], "Sivan": ["סִיוָן"], "Tamuz": ["תַּמּוּז"], "Tammuz": ["תַּמּוּז"], "Tevet": ["טֵבֵת"], "Tishrei": ["תִּשְׁרֵי"] } } };
|
|
1212
1288
|
|
|
1213
|
-
/*! @hebcal/hdate v0.
|
|
1289
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
1214
1290
|
const noopLocale = {
|
|
1215
1291
|
headers: { 'plural-forms': 'nplurals=2; plural=(n!=1);' },
|
|
1216
1292
|
contexts: { '': {} },
|
|
@@ -1494,7 +1570,7 @@ Locale.addLocale('he', poHe$1);
|
|
|
1494
1570
|
const poHeNoNikud$1 = Locale.copyLocaleNoNikud(poHe$1);
|
|
1495
1571
|
Locale.addLocale('he-x-NoNikud', poHeNoNikud$1);
|
|
1496
1572
|
|
|
1497
|
-
/*! @hebcal/hdate v0.
|
|
1573
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
1498
1574
|
/*
|
|
1499
1575
|
Hebcal - A Jewish Calendar Generator
|
|
1500
1576
|
Copyright (c) 1994-2020 Danny Sadinoff
|
|
@@ -1777,7 +1853,7 @@ class HDate {
|
|
|
1777
1853
|
const locale0 = locale || 'en';
|
|
1778
1854
|
const day = this.getDate();
|
|
1779
1855
|
const monthName0 = Locale.gettext(this.getMonthName(), locale0);
|
|
1780
|
-
const monthName = monthName0.
|
|
1856
|
+
const monthName = monthName0.replaceAll("'", '’');
|
|
1781
1857
|
const nth = Locale.ordinal(day, locale0);
|
|
1782
1858
|
const dayOf = getDayOfTranslation(locale0);
|
|
1783
1859
|
const dateStr = `${nth}${dayOf} ${monthName}`;
|
|
@@ -2177,15 +2253,16 @@ class HDate {
|
|
|
2177
2253
|
* HDate.isHDate(12345); // false
|
|
2178
2254
|
* HDate.isHDate('15 Cheshvan 5769'); // false
|
|
2179
2255
|
*/
|
|
2180
|
-
static isHDate(
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
typeof
|
|
2187
|
-
typeof
|
|
2188
|
-
typeof
|
|
2256
|
+
static isHDate(obj) {
|
|
2257
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
2258
|
+
return false;
|
|
2259
|
+
}
|
|
2260
|
+
const hd = obj;
|
|
2261
|
+
return (typeof hd.yy === 'number' &&
|
|
2262
|
+
typeof hd.mm === 'number' &&
|
|
2263
|
+
typeof hd.dd === 'number' &&
|
|
2264
|
+
typeof hd.greg === 'function' &&
|
|
2265
|
+
typeof hd.abs === 'function');
|
|
2189
2266
|
}
|
|
2190
2267
|
/**
|
|
2191
2268
|
* Construct a new instance of `HDate` from a Gematriya-formatted string.
|
|
@@ -2329,7 +2406,7 @@ function onOrBefore(day, t, offset) {
|
|
|
2329
2406
|
return new HDate(HDate.dayOnOrBefore(day, t.abs() + offset));
|
|
2330
2407
|
}
|
|
2331
2408
|
|
|
2332
|
-
/*! @hebcal/hdate v0.
|
|
2409
|
+
/*! @hebcal/hdate v0.23.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2333
2410
|
/**
|
|
2334
2411
|
* Calculates yahrzeit, the anniversary of a death, and returns it as an
|
|
2335
2412
|
* {@link HDate}.
|
|
@@ -2412,9 +2489,9 @@ function birthdayOrAnniversary(hyear, date) {
|
|
|
2412
2489
|
|
|
2413
2490
|
var poAshkenazi = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "und-x-ashkenaz" }, "contexts": { "": { "Shabbat": ["Shabbos"], "Achrei Mot": ["Achrei Mos"], "Bechukotai": ["Bechukosai"], "Beha'alotcha": ["Beha’aloscha"], "Bereshit": ["Bereshis"], "Chukat": ["Chukas"], "Erev Shavuot": ["Erev Shavuos"], "Erev Sukkot": ["Erev Sukkos"], "Ki Tavo": ["Ki Savo"], "Ki Teitzei": ["Ki Seitzei"], "Ki Tisa": ["Ki Sisa"], "Matot": ["Matos"], "Pesach Shabbat Chol ha-Moed": ["Pesach Shabbos Chol ha-Moed"], "Purim Katan": ["Purim Koton"], "Rosh Hashana LaBehemot": ["Rosh Hashana LaBeheimos"], "Shabbat Chazon": ["Shabbos Chazon"], "Shabbat HaChodesh": ["Shabbos HaChodesh"], "Shabbat HaGadol": ["Shabbos HaGadol"], "Shabbat Nachamu": ["Shabbos Nachamu"], "Shabbat Parah": ["Shabbos Parah"], "Shabbat Shekalim": ["Shabbos Shekalim"], "Shabbat Shuva": ["Shabbos Shuvah"], "Shabbat Zachor": ["Shabbos Zachor"], "Shavuot": ["Shavuos"], "Shavuot I": ["Shavuos I"], "Shavuot II": ["Shavuos II"], "Shemot": ["Shemos"], "Shmini Atzeret": ["Shmini Atzeres"], "Simchat Torah": ["Simchas Torah"], "Sukkot": ["Sukkos"], "Sukkot I": ["Sukkos I"], "Sukkot II": ["Sukkos II"], "Sukkot II (CH''M)": ["Sukkos II (CH’’M)"], "Sukkot III (CH''M)": ["Sukkos III (CH’’M)"], "Sukkot IV (CH''M)": ["Sukkos IV (CH’’M)"], "Sukkot V (CH''M)": ["Sukkos V (CH’’M)"], "Sukkot VI (CH''M)": ["Sukkos VI (CH’’M)"], "Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"], "Sukkot Shabbat Chol ha-Moed": ["Sukkos Shabbos Chol ha-Moed"], "Ta'anit Bechorot": ["Ta’anis Bechoros"], "Ta'anit BeHaB": ["Ta’anis BeHaB"], "Ta'anit Esther": ["Ta’anis Esther"], "Toldot": ["Toldos"], "Vaetchanan": ["Vaeschanan"], "Yitro": ["Yisro"], "Vezot Haberakhah": ["Vezos Haberakhah"], "Parashat": ["Parshas"], "Leil Selichot": ["Leil Selichos"], "Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"], "Shabbat Shirah": ["Shabbos Shirah"], "Asara B'Tevet": ["Asara B’Teves"], "Birkat Hachamah": ["Birkas HaChamah"], "Birkat HaChamah": ["Birkas HaChamah"], "Shushan Purim Katan": ["Shushan Purim Koton"], "Alot HaShachar": ["Alos HaShachar"], "Misheyakir": ["Misheyakir"], "Misheyakir Machmir": ["Misheyakir Machmir"], "Sunrise": ["Sunrise"], "Kriat Shema, sof zeman": ["Krias Shema, sof zman"], "Tefilah, sof zeman": ["Tefilah, sof zman"], "Kriat Shema, sof zeman (MGA)": ["Krias Shema, sof zman (MGA)"], "Kriat Shema, sof zeman (GRA)": ["Krias Shema, sof zman (GRA)"], "Tefilah, sof zeman (MGA)": ["Tefilah, sof zman (MGA)"], "Tefilah, sof zeman (GRA)": ["Tefilah, sof zman (GRA)"], "Chatzot HaLailah": ["Chatzos HaLailah"], "Chatzot HaYom": ["Chatzos"], "Chatzot hayom": ["Chatzos"], "Mincha Gedolah": ["Mincha Gedolah"], "Mincha Ketanah": ["Mincha Ketanah"], "Plag HaMincha": ["Plag HaMincha"], "Sunset": ["Sunset"], "Bein HaShemashot": ["Bein HaShemashos"], "Tzeit HaKochavim": ["Tzeis HaKochavim"] } } };
|
|
2414
2491
|
|
|
2415
|
-
var poHe = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "he_IL" }, "contexts": { "": { "Shabbat": ["שַׁבָּת"], "Parashat": ["פָּרָשַׁת"], "Achrei Mot": ["אַחֲרֵי מוֹת"], "Balak": ["בָּלָק"], "Bamidbar": ["בְּמִדְבַּר"], "Bechukotai": ["בְּחֻקֹּתַי"], "Beha'alotcha": ["בְּהַעֲלֹתְךָ"], "Behar": ["בְּהַר"], "Bereshit": ["בְּרֵאשִׁית"], "Beshalach": ["בְּשַׁלַּח"], "Bo": ["בֹּא"], "Chayei Sara": ["חַיֵּי שָֹרָה"], "Chukat": ["חֻקַּת"], "Devarim": ["דְּבָרִים"], "Eikev": ["עֵקֶב"], "Emor": ["אֱמוֹר"], "Ha'azinu": ["הַאֲזִינוּ"], "Kedoshim": ["קְדֹשִׁים"], "Ki Tavo": ["כִּי־תָבוֹא"], "Ki Teitzei": ["כִּי־תֵצֵא"], "Ki Tisa": ["כִּי תִשָּׂא"], "Korach": ["קֹרַח"], "Lech-Lecha": ["לֶךְ־לְךָ"], "Masei": ["מַסְעֵי"], "Matot": ["מַטּוֹת"], "Metzora": ["מְצֹרָע"], "Miketz": ["מִקֵּץ"], "Mishpatim": ["מִשְׁפָּטִים"], "Nasso": ["נָשׂא"], "Nitzavim": ["נִצָּבִים"], "Noach": ["נֹחַ"], "Pekudei": ["פְקוּדֵי"], "Pinchas": ["פִּינְחָס"], "Re'eh": ["רְאֵה"], "Sh'lach": ["שְׁלַח־לְךָ"], "Shemot": ["שְׁמוֹת"], "Shmini": ["שְּׁמִינִי"], "Shoftim": ["שׁוֹפְטִים"], "Tazria": ["תַזְרִיעַ"], "Terumah": ["תְּרוּמָה"], "Tetzaveh": ["תְּצַוֶּה"], "Toldot": ["תּוֹלְדוֹת"], "Tzav": ["צַו"], "Vaera": ["וָאֵרָא"], "Vaetchanan": ["וָאֶתְחַנַּן"], "Vayakhel": ["וַיַּקְהֵל"], "Vayechi": ["וַיְחִי"], "Vayeilech": ["וַיֵּלֶךְ"], "Vayera": ["וַיֵּרָא"], "Vayeshev": ["וַיֵּשֶׁב"], "Vayetzei": ["וַיֵּצֵא"], "Vayigash": ["וַיִּגַּשׁ"], "Vayikra": ["וַיִּקְרָא"], "Vayishlach": ["וַיִּשְׁלַח"], "Vezot Haberakhah": ["וְזֹאת הַבְּרָכָה"], "Yitro": ["יִתְרוֹ"], "Asara B'Tevet": ["עֲשָׂרָה בְּטֵבֵת"], "Candle lighting": ["הַדְלָקַת נֵרוֹת"], "Chanukah": ["חֲנוּכָּה"], "Chanukah: 1 Candle": ["חֲנוּכָּה: א׳ נֵר"], "Chanukah: 2 Candles": ["חֲנוּכָּה: ב׳ נֵרוֹת"], "Chanukah: 3 Candles": ["חֲנוּכָּה: ג׳ נֵרוֹת"], "Chanukah: 4 Candles": ["חֲנוּכָּה: ד׳ נֵרוֹת"], "Chanukah: 5 Candles": ["חֲנוּכָּה: ה׳ נֵרוֹת"], "Chanukah: 6 Candles": ["חֲנוּכָּה: ו׳ נֵרוֹת"], "Chanukah: 7 Candles": ["חֲנוּכָּה: ז׳ נֵרוֹת"], "Chanukah: 8 Candles": ["חֲנוּכָּה: ח׳ נֵרוֹת"], "Chanukah: 8th Day": ["חֲנוּכָּה: יוֹם ח׳"], "Days of the Omer": ["סְפִירַת הָעוֹמֶר"], "Omer": ["עוֹמֶר"], "day of the Omer": ["בָּעוֹמֶר"], "Erev Pesach": ["עֶרֶב פֶּסַח"], "Erev Purim": ["עֶרֶב פּוּרִים"], "Erev Rosh Hashana": ["עֶרֶב רֹאשׁ הַשָּׁנָה"], "Erev Shavuot": ["עֶרֶב שָׁבוּעוֹת"], "Erev Simchat Torah": ["עֶרֶב שִׂמְחַת תּוֹרָה"], "Erev Sukkot": ["עֶרֶב סֻכּוֹת"], "Erev Tish'a B'Av": ["עֶרֶב תִּשְׁעָה בְּאָב"], "Erev Yom Kippur": ["עֶרֶב יוֹם כִּפּוּר"], "Havdalah": ["הַבְדָּלָה"], "Lag BaOmer": ["ל״ג בָּעוֹמֶר"], "Leil Selichot": ["סְלִיחוֹת"], "Pesach": ["פֶּסַח"], "Pesach I": ["פֶּסַח א׳"], "Pesach II": ["פֶּסַח ב׳"], "Pesach II (CH''M)": ["פֶּסַח ב׳ (חוה״מ)"], "Pesach III (CH''M)": ["פֶּסַח ג׳ (חוה״מ)"], "Pesach IV (CH''M)": ["פֶּסַח ד׳ (חוה״מ)"], "Pesach Sheni": ["פֶּסַח שֵׁנִי"], "Pesach V (CH''M)": ["פֶּסַח ה׳ (חוה״מ)"], "Pesach VI (CH''M)": ["פֶּסַח ו׳ (חוה״מ)"], "Pesach VII": ["פֶּסַח ז׳"], "Pesach VIII": ["פֶּסַח ח׳"], "Pesach Shabbat Chol ha-Moed": ["שַׁבַּת חֹל הַמּוֹעֵד פֶּסַח"], "Purim": ["פּוּרִים"], "Purim Katan": ["פּוּרִים קָטָן"], "Rosh Chodesh": ["רֹאשׁ חוֹדֶשׁ"], "Rosh Hashana": ["רֹאשׁ הַשָּׁנָה"], "Rosh Hashana I": ["רֹאשׁ הַשָּׁנָה א׳"], "Rosh Hashana II": ["רֹאשׁ הַשָּׁנָה ב׳"], "Shabbat Chazon": ["שַׁבַּת חֲזוֹן"], "Shabbat HaChodesh": ["שַׁבַּת הַחֹדֶשׁ"], "Shabbat HaGadol": ["שַׁבַּת הַגָּדוֹל"], "Shabbat Nachamu": ["שַׁבַּת נַחֲמוּ"], "Shabbat Parah": ["שַׁבַּת פָּרָה"], "Shabbat Shekalim": ["שַׁבַּת שְׁקָלִים"], "Shabbat Shuva": ["שַׁבַּת שׁוּבָה"], "Shabbat Zachor": ["שַׁבַּת זָכוֹר"], "Shavuot": ["שָׁבוּעוֹת"], "Shavuot I": ["שָׁבוּעוֹת א׳"], "Shavuot II": ["שָׁבוּעוֹת ב׳"], "Shmini Atzeret": ["שְׁמִינִי עֲצֶרֶת"], "Shushan Purim": ["שׁוּשָׁן פּוּרִים"], "Sigd": ["חַג הַסִּיגְד"], "Simchat Torah": ["שִׂמְחַת תּוֹרָה"], "Sukkot": ["סֻכּוֹת"], "Sukkot I": ["סֻכּוֹת א׳"], "Sukkot II": ["סֻכּוֹת ב׳"], "Sukkot II (CH''M)": ["סֻכּוֹת ב׳ (חוה״מ)"], "Sukkot III (CH''M)": ["סֻכּוֹת ג׳ (חוה״מ)"], "Sukkot IV (CH''M)": ["סֻכּוֹת ד׳ (חוה״מ)"], "Sukkot V (CH''M)": ["סֻכּוֹת ה׳ (חוה״מ)"], "Sukkot VI (CH''M)": ["סֻכּוֹת ו׳ (חוה״מ)"], "Sukkot VII (Hoshana Raba)": ["סֻכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"], "Sukkot Shabbat Chol ha-Moed": ["שַׁבַּת חֹל הַמּוֹעֵד סֻכּוֹת"], "Ta'anit Bechorot": ["תַּעֲנִית בְּכוֹרוֹת"], "Ta'anit BeHaB": ["תַּעֲנִית בה״ב"], "Ta'anit Esther": ["תַּעֲנִית אֶסְתֵּר"], "Tish'a B'Av": ["תִּשְׁעָה בְּאָב"], "Tu B'Av": ["ט״וּ בְּאָב"], "Tu BiShvat": ["ט״וּ בִּשְׁבָט"], "Tu B'Shvat": ["ט״וּ בִּשְׁבָט"], "Tzom Gedaliah": ["צוֹם גְּדַלְיָה"], "Tzom Tammuz": ["צוֹם י״ז בְּתַמּוּז"], "Yom HaAtzma'ut": ["יוֹם הָעַצְמָאוּת"], "Yom HaShoah": ["יוֹם הַשּׁוֹאָה"], "Yom HaZikaron": ["יוֹם הַזִּכָּרוֹן"], "Yom Kippur": ["יוֹם כִּפּוּר"], "Yom Yerushalayim": ["יוֹם יְרוּשָׁלַיִם"], "Yom HaAliyah": ["יוֹם הַעֲלִיָּה"], "Yom HaAliyah School Observance": ["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"], "Rosh Chodesh Adar": ["רֹאשׁ חוֹדֶשׁ אֲדָר"], "Rosh Chodesh Adar I": ["רֹאשׁ חוֹדֶשׁ אֲדָר א׳"], "Rosh Chodesh Adar II": ["רֹאשׁ חוֹדֶשׁ אֲדָר ב׳"], "Rosh Chodesh Av": ["רֹאשׁ חוֹדֶשׁ אָב"], "Rosh Chodesh Cheshvan": ["רֹאשׁ חוֹדֶשׁ חֶשְׁוָן"], "Rosh Chodesh Elul": ["רֹאשׁ חוֹדֶשׁ אֱלוּל"], "Rosh Chodesh Iyyar": ["רֹאשׁ חוֹדֶשׁ אִיָּיר"], "Rosh Chodesh Kislev": ["רֹאשׁ חוֹדֶשׁ כִּסְלֵו"], "Rosh Chodesh Nisan": ["רֹאשׁ חוֹדֶשׁ נִיסָן"], "Rosh Chodesh Sh'vat": ["רֹאשׁ חוֹדֶשׁ שְׁבָט"], "Rosh Chodesh Sivan": ["רֹאשׁ חוֹדֶשׁ סִיוָן"], "Rosh Chodesh Tamuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tammuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tevet": ["רֹאשׁ חוֹדֶשׁ טֵבֵת"], "min": ["דַּקּוֹת"], "Fast begins": ["תְּחִילַּת הַצוֹם"], "Fast ends": ["סִיּוּם הַצוֹם"], "Rosh Hashana LaBehemot": ["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"], "Tish'a B'Av (observed)": ["(תִּשְׁעָה בְּאָב (נִדְחָה"], "Shabbat Mevarchim Chodesh": ["שַׁבַּת מְבָרְכִים חוֹדֶשׁ"], "Shabbat Shirah": ["שַׁבַּת שִׁירָה"], "Lovingkindness": ["חֶסֶד"], "Might": ["גְּבוּרָה"], "Beauty": ["תִּפְאֶרֶת"], "Eternity": ["נֶּצַח"], "Splendor": ["הוֹד"], "Foundation": ["יְּסוֹד"], "Majesty": ["מַּלְכוּת"], "day": ["יוֹם"], "Yom Kippur Katan": ["יוֹם כִּפּוּר קָטָן"], "Yizkor": ["יִזְכּוֹר"], "Family Day": ["יוֹם הַמִּשׁפָּחָה"], "Yitzhak Rabin Memorial Day": ["יוֹם הַזִּכָּרוֹן לְיִצְחָק רַבִּין"], "Jabotinsky Day": ["יוֹם זַ׳בּוֹטִינְסְקִי"], "Herzl Day": ["יוֹם הֶרְצְל"], "Ben-Gurion Day": ["יוֹם בֶּן־גּוּרִיּוֹן"], "Hebrew Language Day": ["יוֹם הַשָׂפָה הַעִברִית"], "Birkat Hachamah": ["בִּרְכַּת הַחַמָּה"], "Birkat HaChamah": ["בִּרְכַּת הַחַמָּה"], "Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"], "Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"], "Chag HaBanot": ["חַג הַבָּנוֹת"], "Molad": ["מוֹלָד הָלְּבָנָה"], "chalakim": ["חֲלָקִים"], "Alot HaShachar": ["עֲלוֹת הַשַּׁחַר"], "Misheyakir": ["מִשֶּׁיַּכִּיר"], "Misheyakir Machmir": ["מִשֶּׁיַּכִּיר מַחְמִיר"], "Sunrise": ["נֵץ הַחַמָּה"], "Kriat Shema, sof zeman": ["סוֹף זְמַן קְרִיאַת שְׁמַע"], "Tefilah, sof zeman": ["סוֹף זְמַן תְּפִלָּה"], "Kriat Shema, sof zeman (MGA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע (מג״א)"], "Kriat Shema, sof zeman (GRA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע (גְּרָ״א)"], "Tefilah, sof zeman (MGA)": ["סוֹף זְמַן תְּפִלָּה (מג״א)"], "Tefilah, sof zeman (GRA)": ["סוֹף זְמַן תְּפִלָּה (גְּרָ״א)"], "Chatzot HaLailah": ["חֲצוֹת הַלַּיְלָה"], "Chatzot HaYom": ["חֲצוֹת הַיּוֹם"], "Chatzot hayom": ["חֲצוֹת הַיּוֹם"], "Mincha Gedolah": ["מִנְחָה גְּדוֹלָה"], "Mincha Ketanah": ["מִנְחָה קְטַנָּה"], "Plag HaMincha": ["פְּלַג הַמִּנְחָה"], "Sunset": ["שְׁקִיעַת הַחַמָּה"], "Bein HaShemashot": ["בֵּין הַשְּׁמָשׁוֹת"], "Tzeit HaKochavim": ["צֵאת הַכּוֹכָבִים"], "Biur Chametz": ["בִּעוּר חָמֵץ"], "Finish eating chametz": ["סוֹף זְמַן אֲכִילַת חָמֵץ"] } } };
|
|
2492
|
+
var poHe = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "he_IL" }, "contexts": { "": { "Shabbat": ["שַׁבָּת"], "Parashat": ["פָּרָשַׁת"], "Achrei Mot": ["אַחֲרֵי מוֹת"], "Balak": ["בָּלָק"], "Bamidbar": ["בְּמִדְבַּר"], "Bechukotai": ["בְּחֻקֹּתַי"], "Beha'alotcha": ["בְּהַעֲלֹתְךָ"], "Behar": ["בְּהַר"], "Bereshit": ["בְּרֵאשִׁית"], "Beshalach": ["בְּשַׁלַּח"], "Bo": ["בֹּא"], "Chayei Sara": ["חַיֵּי שָֹרָה"], "Chukat": ["חֻקַּת"], "Devarim": ["דְּבָרִים"], "Eikev": ["עֵקֶב"], "Emor": ["אֱמוֹר"], "Ha'azinu": ["הַאֲזִינוּ"], "Kedoshim": ["קְדֹשִׁים"], "Ki Tavo": ["כִּי־תָבוֹא"], "Ki Teitzei": ["כִּי־תֵצֵא"], "Ki Tisa": ["כִּי תִשָּׂא"], "Korach": ["קֹרַח"], "Lech-Lecha": ["לֶךְ־לְךָ"], "Masei": ["מַסְעֵי"], "Matot": ["מַטּוֹת"], "Metzora": ["מְצֹרָע"], "Miketz": ["מִקֵּץ"], "Mishpatim": ["מִשְׁפָּטִים"], "Nasso": ["נָשׂא"], "Nitzavim": ["נִצָּבִים"], "Noach": ["נֹחַ"], "Pekudei": ["פְקוּדֵי"], "Pinchas": ["פִּינְחָס"], "Re'eh": ["רְאֵה"], "Sh'lach": ["שְׁלַח־לְךָ"], "Shemot": ["שְׁמוֹת"], "Shmini": ["שְּׁמִינִי"], "Shoftim": ["שׁוֹפְטִים"], "Tazria": ["תַזְרִיעַ"], "Terumah": ["תְּרוּמָה"], "Tetzaveh": ["תְּצַוֶּה"], "Toldot": ["תּוֹלְדוֹת"], "Tzav": ["צַו"], "Vaera": ["וָאֵרָא"], "Vaetchanan": ["וָאֶתְחַנַּן"], "Vayakhel": ["וַיַּקְהֵל"], "Vayechi": ["וַיְחִי"], "Vayeilech": ["וַיֵּלֶךְ"], "Vayera": ["וַיֵּרָא"], "Vayeshev": ["וַיֵּשֶׁב"], "Vayetzei": ["וַיֵּצֵא"], "Vayigash": ["וַיִּגַּשׁ"], "Vayikra": ["וַיִּקְרָא"], "Vayishlach": ["וַיִּשְׁלַח"], "Vezot Haberakhah": ["וְזֹאת הַבְּרָכָה"], "Yitro": ["יִתְרוֹ"], "Asara B'Tevet": ["עֲשָׂרָה בְּטֵבֵת"], "Candle lighting": ["הַדְלָקַת נֵרוֹת"], "Chanukah": ["חֲנוּכָּה"], "Chanukah: 1 Candle": ["חֲנוּכָּה: א׳ נֵר"], "Chanukah: 2 Candles": ["חֲנוּכָּה: ב׳ נֵרוֹת"], "Chanukah: 3 Candles": ["חֲנוּכָּה: ג׳ נֵרוֹת"], "Chanukah: 4 Candles": ["חֲנוּכָּה: ד׳ נֵרוֹת"], "Chanukah: 5 Candles": ["חֲנוּכָּה: ה׳ נֵרוֹת"], "Chanukah: 6 Candles": ["חֲנוּכָּה: ו׳ נֵרוֹת"], "Chanukah: 7 Candles": ["חֲנוּכָּה: ז׳ נֵרוֹת"], "Chanukah: 8 Candles": ["חֲנוּכָּה: ח׳ נֵרוֹת"], "Chanukah: 8th Day": ["חֲנוּכָּה: יוֹם ח׳"], "Days of the Omer": ["סְפִירַת הָעוֹמֶר"], "Omer": ["עוֹמֶר"], "day of the Omer": ["בָּעוֹמֶר"], "Erev Pesach": ["עֶרֶב פֶּסַח"], "Erev Purim": ["עֶרֶב פּוּרִים"], "Erev Rosh Hashana": ["עֶרֶב רֹאשׁ הַשָּׁנָה"], "Erev Shavuot": ["עֶרֶב שָׁבוּעוֹת"], "Erev Simchat Torah": ["עֶרֶב שִׂמְחַת תּוֹרָה"], "Erev Sukkot": ["עֶרֶב סֻכּוֹת"], "Erev Tish'a B'Av": ["עֶרֶב תִּשְׁעָה בְּאָב"], "Erev Yom Kippur": ["עֶרֶב יוֹם כִּפּוּר"], "Havdalah": ["הַבְדָּלָה"], "Lag BaOmer": ["ל״ג בָּעוֹמֶר"], "Leil Selichot": ["סְלִיחוֹת"], "Pesach": ["פֶּסַח"], "Pesach I": ["פֶּסַח א׳"], "Pesach II": ["פֶּסַח ב׳"], "Pesach II (CH''M)": ["פֶּסַח ב׳ (חוה״מ)"], "Pesach III (CH''M)": ["פֶּסַח ג׳ (חוה״מ)"], "Pesach IV (CH''M)": ["פֶּסַח ד׳ (חוה״מ)"], "Pesach Sheni": ["פֶּסַח שֵׁנִי"], "Pesach V (CH''M)": ["פֶּסַח ה׳ (חוה״מ)"], "Pesach VI (CH''M)": ["פֶּסַח ו׳ (חוה״מ)"], "Pesach VII": ["פֶּסַח ז׳"], "Pesach VIII": ["פֶּסַח ח׳"], "Pesach Shabbat Chol ha-Moed": ["שַׁבַּת חֹל הַמּוֹעֵד פֶּסַח"], "Purim": ["פּוּרִים"], "Purim Katan": ["פּוּרִים קָטָן"], "Rosh Chodesh": ["רֹאשׁ חוֹדֶשׁ"], "Rosh Hashana": ["רֹאשׁ הַשָּׁנָה"], "Rosh Hashana I": ["רֹאשׁ הַשָּׁנָה א׳"], "Rosh Hashana II": ["רֹאשׁ הַשָּׁנָה ב׳"], "Shabbat Chazon": ["שַׁבַּת חֲזוֹן"], "Shabbat HaChodesh": ["שַׁבַּת הַחֹדֶשׁ"], "Shabbat HaGadol": ["שַׁבַּת הַגָּדוֹל"], "Shabbat Nachamu": ["שַׁבַּת נַחֲמוּ"], "Shabbat Parah": ["שַׁבַּת פָּרָה"], "Shabbat Shekalim": ["שַׁבַּת שְׁקָלִים"], "Shabbat Shuva": ["שַׁבַּת שׁוּבָה"], "Shabbat Zachor": ["שַׁבַּת זָכוֹר"], "Shavuot": ["שָׁבוּעוֹת"], "Shavuot I": ["שָׁבוּעוֹת א׳"], "Shavuot II": ["שָׁבוּעוֹת ב׳"], "Shmini Atzeret": ["שְׁמִינִי עֲצֶרֶת"], "Shushan Purim": ["שׁוּשָׁן פּוּרִים"], "Sigd": ["חַג הַסִּיגְד"], "Simchat Torah": ["שִׂמְחַת תּוֹרָה"], "Sukkot": ["סֻכּוֹת"], "Sukkot I": ["סֻכּוֹת א׳"], "Sukkot II": ["סֻכּוֹת ב׳"], "Sukkot II (CH''M)": ["סֻכּוֹת ב׳ (חוה״מ)"], "Sukkot III (CH''M)": ["סֻכּוֹת ג׳ (חוה״מ)"], "Sukkot IV (CH''M)": ["סֻכּוֹת ד׳ (חוה״מ)"], "Sukkot V (CH''M)": ["סֻכּוֹת ה׳ (חוה״מ)"], "Sukkot VI (CH''M)": ["סֻכּוֹת ו׳ (חוה״מ)"], "Sukkot VII (Hoshana Raba)": ["סֻכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"], "Sukkot Shabbat Chol ha-Moed": ["שַׁבַּת חֹל הַמּוֹעֵד סֻכּוֹת"], "Ta'anit Bechorot": ["תַּעֲנִית בְּכוֹרוֹת"], "Ta'anit BeHaB": ["תַּעֲנִית בה״ב"], "Ta'anit Esther": ["תַּעֲנִית אֶסְתֵּר"], "Tish'a B'Av": ["תִּשְׁעָה בְּאָב"], "Tu B'Av": ["ט״וּ בְּאָב"], "Tu BiShvat": ["ט״וּ בִּשְׁבָט"], "Tu B'Shvat": ["ט״וּ בִּשְׁבָט"], "Tzom Gedaliah": ["צוֹם גְּדַלְיָה"], "Tzom Tammuz": ["צוֹם י״ז בְּתַמּוּז"], "Yom HaAtzma'ut": ["יוֹם הָעַצְמָאוּת"], "Yom HaShoah": ["יוֹם הַשּׁוֹאָה"], "Yom HaZikaron": ["יוֹם הַזִּכָּרוֹן"], "Yom Kippur": ["יוֹם כִּפּוּר"], "Yom Yerushalayim": ["יוֹם יְרוּשָׁלַיִם"], "Yom HaAliyah": ["יוֹם הַעֲלִיָּה"], "Yom HaAliyah School Observance": ["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"], "Rosh Chodesh Adar": ["רֹאשׁ חוֹדֶשׁ אֲדָר"], "Rosh Chodesh Adar I": ["רֹאשׁ חוֹדֶשׁ אֲדָר א׳"], "Rosh Chodesh Adar II": ["רֹאשׁ חוֹדֶשׁ אֲדָר ב׳"], "Rosh Chodesh Av": ["רֹאשׁ חוֹדֶשׁ אָב"], "Rosh Chodesh Cheshvan": ["רֹאשׁ חוֹדֶשׁ חֶשְׁוָן"], "Rosh Chodesh Elul": ["רֹאשׁ חוֹדֶשׁ אֱלוּל"], "Rosh Chodesh Iyyar": ["רֹאשׁ חוֹדֶשׁ אִיָּיר"], "Rosh Chodesh Kislev": ["רֹאשׁ חוֹדֶשׁ כִּסְלֵו"], "Rosh Chodesh Nisan": ["רֹאשׁ חוֹדֶשׁ נִיסָן"], "Rosh Chodesh Sh'vat": ["רֹאשׁ חוֹדֶשׁ שְׁבָט"], "Rosh Chodesh Sivan": ["רֹאשׁ חוֹדֶשׁ סִיוָן"], "Rosh Chodesh Tamuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tammuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tevet": ["רֹאשׁ חוֹדֶשׁ טֵבֵת"], "min": ["דַּקּוֹת"], "Fast begins": ["תְּחִילַּת הַצוֹם"], "Fast ends": ["סִיּוּם הַצוֹם"], "Rosh Hashana LaBehemot": ["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"], "Tish'a B'Av (observed)": ["(תִּשְׁעָה בְּאָב (נִדְחָה"], "Shabbat Mevarchim Chodesh": ["שַׁבַּת מְבָרְכִים חוֹדֶשׁ"], "Shabbat Shirah": ["שַׁבַּת שִׁירָה"], "Lovingkindness": ["חֶסֶד"], "Might": ["גְּבוּרָה"], "Beauty": ["תִּפְאֶרֶת"], "Eternity": ["נֶּצַח"], "Splendor": ["הוֹד"], "Foundation": ["יְּסוֹד"], "Majesty": ["מַּלְכוּת"], "day": ["יוֹם"], "Yom Kippur Katan": ["יוֹם כִּפּוּר קָטָן"], "Yizkor": ["יִזְכּוֹר"], "Family Day": ["יוֹם הַמִּשׁפָּחָה"], "Yitzhak Rabin Memorial Day": ["יוֹם הַזִּכָּרוֹן לְיִצְחָק רַבִּין"], "Jabotinsky Day": ["יוֹם זַ׳בּוֹטִינְסְקִי"], "Herzl Day": ["יוֹם הֶרְצְל"], "Ben-Gurion Day": ["יוֹם בֶּן־גּוּרִיּוֹן"], "Hebrew Language Day": ["יוֹם הַשָׂפָה הַעִברִית"], "Birkat Hachamah": ["בִּרְכַּת הַחַמָּה"], "Birkat HaChamah": ["בִּרְכַּת הַחַמָּה"], "Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"], "Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"], "Chag HaBanot": ["חַג הַבָּנוֹת"], "Molad": ["מוֹלָד הָלְּבָנָה"], "chalakim": ["חֲלָקִים"], "Alot HaShachar": ["עֲלוֹת הַשַּׁחַר"], "Misheyakir": ["מִשֶּׁיַּכִּיר"], "Misheyakir Machmir": ["מִשֶּׁיַּכִּיר מַחְמִיר"], "Sunrise": ["נֵץ הַחַמָּה"], "Kriat Shema, sof zeman": ["סוֹף זְמַן קְרִיאַת שְׁמַע"], "Tefilah, sof zeman": ["סוֹף זְמַן תְּפִלָּה"], "Kriat Shema, sof zeman (MGA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע (מג״א)"], "Kriat Shema, sof zeman (GRA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע (גְּרָ״א)"], "Tefilah, sof zeman (MGA)": ["סוֹף זְמַן תְּפִלָּה (מג״א)"], "Tefilah, sof zeman (GRA)": ["סוֹף זְמַן תְּפִלָּה (גְּרָ״א)"], "Chatzot HaLailah": ["חֲצוֹת הַלַּיְלָה"], "Chatzot HaYom": ["חֲצוֹת הַיּוֹם"], "Chatzot hayom": ["חֲצוֹת הַיּוֹם"], "Mincha Gedolah": ["מִנְחָה גְּדוֹלָה"], "Mincha Ketanah": ["מִנְחָה קְטַנָּה"], "Plag HaMincha": ["פְּלַג הַמִּנְחָה"], "Sunset": ["שְׁקִיעַת הַחַמָּה"], "Bein HaShemashot": ["בֵּין הַשְּׁמָשׁוֹת"], "Tzeit HaKochavim": ["צֵאת הַכּוֹכָבִים"], "Biur Chametz": ["בִּעוּר חָמֵץ"], "Finish eating chametz": ["סוֹף זְמַן אֲכִילַת חָמֵץ"], "Swords of Iron War Memorial Day": ["יוֹם הַזִּכָּרוֹן לְחַלְלֵי מִלְחֶמֶת חַרְבוֹת בַּרְזֶל"] } } };
|
|
2416
2493
|
|
|
2417
|
-
var noNikudOverride = { "headers": { "plural-forms": "nplurals=2; plural=(n != 1);", "language": "he-x-NoNikud" }, "contexts": { "": { "Korach": ["קורח"], "Chukat": ["חוקת"], "Erev Yom Kippur": ["ערב יום כיפור"], "Yom Kippur": ["יום כיפור"], "Yom Kippur Katan": ["יום כיפור קטן"], "Pesach Shabbat Chol ha-Moed": ["שבת חול המועד פסח"], "Sukkot Shabbat Chol ha-Moed": ["שבת חול המועד סוכות"], "Erev Sukkot": ["ערב סוכות"], "Sukkot": ["סוכות"], "Sukkot I": ["סוכות א׳"], "Sukkot II": ["סוכות ב׳"], "Sukkot II (CH''M)": ["סוכות ב׳ (חוה״מ)"], "Sukkot III (CH''M)": ["סוכות ג׳ (חוה״מ)"], "Sukkot IV (CH''M)": ["סוכות ד׳ (חוה״מ)"], "Sukkot V (CH''M)": ["סוכות ה׳ (חוה״מ)"], "Sukkot VI (CH''M)": ["סוכות ו׳ (חוה״מ)"], "Sukkot VII (Hoshana Raba)": ["סוכות ז׳ (הושענא רבה)"] } } };
|
|
2494
|
+
var noNikudOverride = { "headers": { "plural-forms": "nplurals=2; plural=(n != 1);", "language": "he-x-NoNikud" }, "contexts": { "": { "Korach": ["קורח"], "Chukat": ["חוקת"], "Erev Yom Kippur": ["ערב יום כיפור"], "Yom Kippur": ["יום כיפור"], "Yom Kippur Katan": ["יום כיפור קטן"], "Pesach Shabbat Chol ha-Moed": ["שבת חול המועד פסח"], "Sukkot Shabbat Chol ha-Moed": ["שבת חול המועד סוכות"], "Erev Sukkot": ["ערב סוכות"], "Sukkot": ["סוכות"], "Sukkot I": ["סוכות א׳"], "Sukkot II": ["סוכות ב׳"], "Sukkot II (CH''M)": ["סוכות ב׳ (חוה״מ)"], "Sukkot III (CH''M)": ["סוכות ג׳ (חוה״מ)"], "Sukkot IV (CH''M)": ["סוכות ד׳ (חוה״מ)"], "Sukkot V (CH''M)": ["סוכות ה׳ (חוה״מ)"], "Sukkot VI (CH''M)": ["סוכות ו׳ (חוה״מ)"], "Sukkot VII (Hoshana Raba)": ["סוכות ז׳ (הושענא רבה)"], "Swords of Iron War Memorial Day": ["יום הזיכרון לחללי מלחמת חרבות ברזל"] } } };
|
|
2418
2495
|
|
|
2419
2496
|
Locale.addTranslations('he', poHe);
|
|
2420
2497
|
Locale.addTranslations('ashkenazi', poAshkenazi);
|
|
@@ -2746,11 +2823,9 @@ class Event {
|
|
|
2746
2823
|
* .getCategories(); // ['roshchodesh']
|
|
2747
2824
|
*/
|
|
2748
2825
|
getCategories() {
|
|
2749
|
-
const
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
if (mask & attr0) {
|
|
2753
|
-
return attrs.slice(1);
|
|
2826
|
+
for (const [bit, ...categories] of flagToCategory) {
|
|
2827
|
+
if (this.mask & bit) {
|
|
2828
|
+
return categories;
|
|
2754
2829
|
}
|
|
2755
2830
|
}
|
|
2756
2831
|
return ['unknown'];
|
|
@@ -2789,15 +2864,11 @@ class HebrewDateEvent extends Event {
|
|
|
2789
2864
|
return hd.render(locale0, true);
|
|
2790
2865
|
}
|
|
2791
2866
|
}
|
|
2792
|
-
/**
|
|
2793
|
-
* @private
|
|
2794
|
-
* @param locale
|
|
2795
|
-
*/
|
|
2796
2867
|
renderBriefHebrew(locale) {
|
|
2797
2868
|
const hd = this.getDate();
|
|
2798
2869
|
const dd = hd.getDate();
|
|
2799
2870
|
const mm = Locale.gettext(hd.getMonthName(), locale);
|
|
2800
|
-
return gematriya(dd)
|
|
2871
|
+
return `${gematriya(dd)} ${mm}`;
|
|
2801
2872
|
}
|
|
2802
2873
|
/**
|
|
2803
2874
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
@@ -9072,14 +9143,12 @@ const ZIPCODES_TZ_MAP = {
|
|
|
9072
9143
|
'15': 'Pacific/Palau', // Palau (GMT +9:00)
|
|
9073
9144
|
'16': 'Pacific/Chuuk', // Micronesia (GMT +11:00)
|
|
9074
9145
|
};
|
|
9075
|
-
/** @private */
|
|
9076
9146
|
const timeFormatCache = new QuickLRU({
|
|
9077
9147
|
maxSize: 120,
|
|
9078
9148
|
});
|
|
9079
9149
|
/**
|
|
9080
9150
|
* Gets a 24-hour time formatter (e.g. 07:41 or 20:03) from cache
|
|
9081
9151
|
* or makes a new one if needed
|
|
9082
|
-
* @private
|
|
9083
9152
|
*/
|
|
9084
9153
|
function getFormatter(tzid) {
|
|
9085
9154
|
const fmt = timeFormatCache.get(tzid);
|
|
@@ -9155,11 +9224,8 @@ class Location extends GeoLocation {
|
|
|
9155
9224
|
cityName = String(cityName);
|
|
9156
9225
|
}
|
|
9157
9226
|
super(cityName || null, lat, long, elev, tzid);
|
|
9158
|
-
this.il = Boolean(il);
|
|
9227
|
+
this.il = Boolean(il) || countryCode === 'IL';
|
|
9159
9228
|
this.cc = countryCode;
|
|
9160
|
-
if (countryCode === 'IL') {
|
|
9161
|
-
this.il = true;
|
|
9162
|
-
}
|
|
9163
9229
|
this.geoid = geoid;
|
|
9164
9230
|
}
|
|
9165
9231
|
/**
|
|
@@ -9375,20 +9441,21 @@ class Location extends GeoLocation {
|
|
|
9375
9441
|
}
|
|
9376
9442
|
}
|
|
9377
9443
|
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9444
|
+
/** Countries that conventionally use a 12-hour clock */
|
|
9445
|
+
const hour12cc = new Set([
|
|
9446
|
+
'US',
|
|
9447
|
+
'CA',
|
|
9448
|
+
'BR',
|
|
9449
|
+
'AU',
|
|
9450
|
+
'NZ',
|
|
9451
|
+
'DO',
|
|
9452
|
+
'PR',
|
|
9453
|
+
'GR',
|
|
9454
|
+
'IN',
|
|
9455
|
+
'KR',
|
|
9456
|
+
'NP',
|
|
9457
|
+
'ZA',
|
|
9458
|
+
]);
|
|
9392
9459
|
/**
|
|
9393
9460
|
* Helper function to format a 24-hour (00:00-23:59) time string in either
|
|
9394
9461
|
* 12-hour US format (e.g. `"8:13pm"`) or keep it in 24-hour format (e.g.
|
|
@@ -9415,7 +9482,7 @@ function reformatTimeStr(timeStr, suffix, options) {
|
|
|
9415
9482
|
if (hour12 !== undefined && !hour12) {
|
|
9416
9483
|
return timeStr;
|
|
9417
9484
|
}
|
|
9418
|
-
if (!hour12 && hour12cc
|
|
9485
|
+
if (!hour12 && !hour12cc.has(cc)) {
|
|
9419
9486
|
return timeStr;
|
|
9420
9487
|
}
|
|
9421
9488
|
const hm = timeStr.split(':');
|
|
@@ -9515,13 +9582,12 @@ function calculateMolad(year, month) {
|
|
|
9515
9582
|
hd = hd.next();
|
|
9516
9583
|
}
|
|
9517
9584
|
hour = (hour + 18) % 24;
|
|
9518
|
-
|
|
9585
|
+
return {
|
|
9519
9586
|
hdate: hd,
|
|
9520
9587
|
hour,
|
|
9521
9588
|
minutes,
|
|
9522
9589
|
chalakim: adjustedChalakim - minutes * CHALAKIM_PER_MINUTE,
|
|
9523
9590
|
};
|
|
9524
|
-
return m;
|
|
9525
9591
|
}
|
|
9526
9592
|
|
|
9527
9593
|
/** constant for milliseconds in a minute (60,000) */
|
|
@@ -9860,7 +9926,7 @@ class Molad {
|
|
|
9860
9926
|
if (chalakim === 0) {
|
|
9861
9927
|
return result;
|
|
9862
9928
|
}
|
|
9863
|
-
return result
|
|
9929
|
+
return `${result} ${and} ${chalakim} ${chalakimStr}`;
|
|
9864
9930
|
}
|
|
9865
9931
|
}
|
|
9866
9932
|
/** Represents a Molad announcement on Shabbat Mevarchim */
|
|
@@ -9894,7 +9960,6 @@ class MoladEvent extends Event {
|
|
|
9894
9960
|
* `Temporal.ZonedDateTime`. Resolving the IANA zone to build a
|
|
9895
9961
|
* `ZonedDateTime` costs roughly 750ns and nothing downstream uses it, which
|
|
9896
9962
|
* made it the single most expensive step in a sunrise/sunset calculation.
|
|
9897
|
-
* @private
|
|
9898
9963
|
*/
|
|
9899
9964
|
function millisToDate(millis) {
|
|
9900
9965
|
const res = new Date(millis);
|
|
@@ -9926,11 +9991,17 @@ const CIVIL_ZENITH = GEOMETRIC_ZENITH + 6;
|
|
|
9926
9991
|
* Length of one temporal (halachic) hour in milliseconds, i.e. one twelfth of
|
|
9927
9992
|
* the day. Mirrors `NOAACalculator.getTemporalHour()`, including its floor, so
|
|
9928
9993
|
* that results stay identical to the `ZonedDateTime` code path.
|
|
9929
|
-
* @private
|
|
9930
9994
|
*/
|
|
9931
9995
|
function temporalHourMillis(startOfDay, endOfDay) {
|
|
9932
9996
|
return Math.floor((endOfDay - startOfDay) / 12);
|
|
9933
9997
|
}
|
|
9998
|
+
/**
|
|
9999
|
+
* Returns the moment `hours` temporal hours after `startOfDay`, where one
|
|
10000
|
+
* temporal hour lasts `temporalHour` milliseconds
|
|
10001
|
+
*/
|
|
10002
|
+
function addTemporalHours(startOfDay, temporalHour, hours) {
|
|
10003
|
+
return new Date(startOfDay.getTime() + Math.floor(hours * temporalHour));
|
|
10004
|
+
}
|
|
9934
10005
|
/**
|
|
9935
10006
|
* Calculate halachic times (zmanim / זְמַנִּים) for a given day and location.
|
|
9936
10007
|
* Calculations are available for tzeit / tzais (nightfall),
|
|
@@ -10023,7 +10094,6 @@ class Zmanim {
|
|
|
10023
10094
|
* as well; the adjustment is a no-op unless the zenith is exactly
|
|
10024
10095
|
* {@link GEOMETRIC_ZENITH}, which is why degree-based zmanim are unaffected
|
|
10025
10096
|
* by elevation.
|
|
10026
|
-
* @private
|
|
10027
10097
|
*/
|
|
10028
10098
|
sunriseMillis(zenith, useElevation) {
|
|
10029
10099
|
const utc = useElevation
|
|
@@ -10033,7 +10103,6 @@ class Zmanim {
|
|
|
10033
10103
|
}
|
|
10034
10104
|
/**
|
|
10035
10105
|
* Sunset counterpart of {@link sunriseMillis}.
|
|
10036
|
-
* @private
|
|
10037
10106
|
*/
|
|
10038
10107
|
sunsetMillis(zenith, useElevation) {
|
|
10039
10108
|
const utc = useElevation
|
|
@@ -10251,8 +10320,7 @@ class Zmanim {
|
|
|
10251
10320
|
sofZmanShmaMGA() {
|
|
10252
10321
|
// Magen Avraham
|
|
10253
10322
|
const [alot72, temporalHour] = this.getTemporalHour72(true);
|
|
10254
|
-
|
|
10255
|
-
return new Date(alot72.getTime() + offset);
|
|
10323
|
+
return addTemporalHours(alot72, temporalHour, 3);
|
|
10256
10324
|
}
|
|
10257
10325
|
/**
|
|
10258
10326
|
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
@@ -10261,8 +10329,7 @@ class Zmanim {
|
|
|
10261
10329
|
*/
|
|
10262
10330
|
sofZmanShmaMGA16Point1() {
|
|
10263
10331
|
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
10264
|
-
|
|
10265
|
-
return new Date(alot.getTime() + offset);
|
|
10332
|
+
return addTemporalHours(alot, temporalHour, 3);
|
|
10266
10333
|
}
|
|
10267
10334
|
/**
|
|
10268
10335
|
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
@@ -10275,8 +10342,7 @@ class Zmanim {
|
|
|
10275
10342
|
*/
|
|
10276
10343
|
sofZmanShmaMGA19Point8() {
|
|
10277
10344
|
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
10278
|
-
|
|
10279
|
-
return new Date(alot.getTime() + offset);
|
|
10345
|
+
return addTemporalHours(alot, temporalHour, 3);
|
|
10280
10346
|
}
|
|
10281
10347
|
/**
|
|
10282
10348
|
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
|
|
@@ -10284,8 +10350,7 @@ class Zmanim {
|
|
|
10284
10350
|
sofZmanTfillaMGA() {
|
|
10285
10351
|
// Magen Avraham
|
|
10286
10352
|
const [alot72, temporalHour] = this.getTemporalHour72(true);
|
|
10287
|
-
|
|
10288
|
-
return new Date(alot72.getTime() + offset);
|
|
10353
|
+
return addTemporalHours(alot72, temporalHour, 4);
|
|
10289
10354
|
}
|
|
10290
10355
|
/**
|
|
10291
10356
|
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
@@ -10294,8 +10359,7 @@ class Zmanim {
|
|
|
10294
10359
|
*/
|
|
10295
10360
|
sofZmanTfillaMGA16Point1() {
|
|
10296
10361
|
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
10297
|
-
|
|
10298
|
-
return new Date(alot.getTime() + offset);
|
|
10362
|
+
return addTemporalHours(alot, temporalHour, 4);
|
|
10299
10363
|
}
|
|
10300
10364
|
/**
|
|
10301
10365
|
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
@@ -10308,8 +10372,7 @@ class Zmanim {
|
|
|
10308
10372
|
*/
|
|
10309
10373
|
sofZmanTfillaMGA19Point8() {
|
|
10310
10374
|
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
10311
|
-
|
|
10312
|
-
return new Date(alot.getTime() + offset);
|
|
10375
|
+
return addTemporalHours(alot, temporalHour, 4);
|
|
10313
10376
|
}
|
|
10314
10377
|
/**
|
|
10315
10378
|
* Earliest Mincha – Mincha Gedola (GRA); Sunrise plus 6.5 halachic hours.
|
|
@@ -10337,8 +10400,7 @@ class Zmanim {
|
|
|
10337
10400
|
*/
|
|
10338
10401
|
minchaGedolaMGA() {
|
|
10339
10402
|
const [alot72, temporalHour] = this.getTemporalHour72(false);
|
|
10340
|
-
|
|
10341
|
-
return new Date(alot72.getTime() + offset);
|
|
10403
|
+
return addTemporalHours(alot72, temporalHour, 6.5);
|
|
10342
10404
|
}
|
|
10343
10405
|
/**
|
|
10344
10406
|
* Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours.
|
|
@@ -10363,7 +10425,7 @@ class Zmanim {
|
|
|
10363
10425
|
*/
|
|
10364
10426
|
minchaKetanaMGA() {
|
|
10365
10427
|
const [alot72, temporalHour] = this.getTemporalHour72(false);
|
|
10366
|
-
return
|
|
10428
|
+
return addTemporalHours(alot72, temporalHour, 9.5);
|
|
10367
10429
|
}
|
|
10368
10430
|
/**
|
|
10369
10431
|
* Plag haMincha; Sunrise plus 10.75 halachic hours.
|
|
@@ -10823,7 +10885,7 @@ class Zmanim {
|
|
|
10823
10885
|
time.charCodeAt(1) === 0x34 && // '4'
|
|
10824
10886
|
time.charCodeAt(2) === 0x3a // ':'
|
|
10825
10887
|
) {
|
|
10826
|
-
return
|
|
10888
|
+
return `00${time.substring(2)}`;
|
|
10827
10889
|
}
|
|
10828
10890
|
return time;
|
|
10829
10891
|
}
|
|
@@ -10856,7 +10918,8 @@ class Zmanim {
|
|
|
10856
10918
|
const offsetAbs = Math.abs(offset);
|
|
10857
10919
|
const hours = Math.floor(offsetAbs / 60);
|
|
10858
10920
|
const minutes = offsetAbs % 60;
|
|
10859
|
-
|
|
10921
|
+
const sign = offset < 0 ? '+' : '-';
|
|
10922
|
+
return `${sign}${pad2(hours)}:${pad2(minutes)}`;
|
|
10860
10923
|
}
|
|
10861
10924
|
/**
|
|
10862
10925
|
* Returns a string like "2022-04-01T13:06:00-11:00"
|
|
@@ -10949,1556 +11012,1374 @@ class Zmanim {
|
|
|
10949
11012
|
}
|
|
10950
11013
|
}
|
|
10951
11014
|
|
|
10952
|
-
const
|
|
10953
|
-
const
|
|
10954
|
-
const FRI$2 = 5;
|
|
10955
|
-
const SAT$3 = 6;
|
|
10956
|
-
const NISAN$3 = months.NISAN;
|
|
10957
|
-
const IYYAR$1 = months.IYYAR;
|
|
11015
|
+
const { NISAN: NISAN$4, IYYAR: IYYAR$2, SIVAN: SIVAN$2, AV: AV$2, ELUL: ELUL$1, TISHREI: TISHREI$2, SHVAT, ADAR_II: ADAR_II$1 } = months;
|
|
11016
|
+
const { CHAG: CHAG$1, LIGHT_CANDLES: LIGHT_CANDLES$2, YOM_TOV_ENDS: YOM_TOV_ENDS$1, CHUL_ONLY: CHUL_ONLY$1, IL_ONLY: IL_ONLY$2, LIGHT_CANDLES_TZEIS: LIGHT_CANDLES_TZEIS$3, MAJOR_FAST: MAJOR_FAST$2, MINOR_HOLIDAY: MINOR_HOLIDAY$2, EREV: EREV$2, CHOL_HAMOED: CHOL_HAMOED$1, } = flags;
|
|
10958
11017
|
/**
|
|
10959
|
-
*
|
|
10960
|
-
* When the actual date of Yom Hashoah falls on a Friday, the
|
|
10961
|
-
* state of Israel observes Yom Hashoah on the preceding
|
|
10962
|
-
* Thursday. When it falls on a Sunday, Yom Hashoah is observed
|
|
10963
|
-
* on the following Monday.
|
|
10964
|
-
* http://www.ushmm.org/remembrance/dor/calendar/
|
|
10965
|
-
* @private
|
|
10966
|
-
* @param year
|
|
11018
|
+
* Transliterated names of holidays, used by `Event.getDesc()`
|
|
10967
11019
|
*/
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
11020
|
+
const holidayDesc = {
|
|
11021
|
+
/** Asara B'Tevet */
|
|
11022
|
+
ASARA_BTEVET: "Asara B'Tevet",
|
|
11023
|
+
/** Birkat Hachamah */
|
|
11024
|
+
BIRKAT_HACHAMAH: 'Birkat Hachamah',
|
|
11025
|
+
/** Chag HaBanot */
|
|
11026
|
+
CHAG_HABANOT: 'Chag HaBanot',
|
|
11027
|
+
/** Chanukah: 8th Day */
|
|
11028
|
+
CHANUKAH_8TH_DAY: 'Chanukah: 8th Day',
|
|
11029
|
+
/** Erev Tish'a B'Av */
|
|
11030
|
+
EREV_TISHA_BAV: "Erev Tish'a B'Av",
|
|
11031
|
+
/** Leil Selichot */
|
|
11032
|
+
LEIL_SELICHOT: 'Leil Selichot',
|
|
11033
|
+
/** Purim Katan */
|
|
11034
|
+
PURIM_KATAN: 'Purim Katan',
|
|
11035
|
+
/** Purim Meshulash */
|
|
11036
|
+
PURIM_MESHULASH: 'Purim Meshulash',
|
|
11037
|
+
/** Shabbat Chazon */
|
|
11038
|
+
SHABBAT_CHAZON: 'Shabbat Chazon',
|
|
11039
|
+
/** Shabbat HaChodesh */
|
|
11040
|
+
SHABBAT_HACHODESH: 'Shabbat HaChodesh',
|
|
11041
|
+
/** Shabbat HaGadol */
|
|
11042
|
+
SHABBAT_HAGADOL: 'Shabbat HaGadol',
|
|
11043
|
+
/** Shabbat Nachamu */
|
|
11044
|
+
SHABBAT_NACHAMU: 'Shabbat Nachamu',
|
|
11045
|
+
/** Shabbat Parah */
|
|
11046
|
+
SHABBAT_PARAH: 'Shabbat Parah',
|
|
11047
|
+
/** Shabbat Shekalim */
|
|
11048
|
+
SHABBAT_SHEKALIM: 'Shabbat Shekalim',
|
|
11049
|
+
/** Shabbat Shirah */
|
|
11050
|
+
SHABBAT_SHIRAH: 'Shabbat Shirah',
|
|
11051
|
+
/** Shabbat Shuva */
|
|
11052
|
+
SHABBAT_SHUVA: 'Shabbat Shuva',
|
|
11053
|
+
/** Shabbat Zachor */
|
|
11054
|
+
SHABBAT_ZACHOR: 'Shabbat Zachor',
|
|
11055
|
+
/** Shushan Purim Katan */
|
|
11056
|
+
SHUSHAN_PURIM_KATAN: 'Shushan Purim Katan',
|
|
11057
|
+
/** Ta'anit Bechorot */
|
|
11058
|
+
TAANIT_BECHOROT: "Ta'anit Bechorot",
|
|
11059
|
+
/** Ta'anit BeHaB */
|
|
11060
|
+
TAANIT_BEHAB: "Ta'anit BeHaB",
|
|
11061
|
+
/** Ta'anit Esther */
|
|
11062
|
+
TAANIT_ESTHER: "Ta'anit Esther",
|
|
11063
|
+
/** Tish'a B'Av */
|
|
11064
|
+
TISHA_BAV: "Tish'a B'Av",
|
|
11065
|
+
/** Tzom Gedaliah */
|
|
11066
|
+
TZOM_GEDALIAH: 'Tzom Gedaliah',
|
|
11067
|
+
/** Tzom Tammuz */
|
|
11068
|
+
TZOM_TAMMUZ: 'Tzom Tammuz',
|
|
11069
|
+
/** Yom HaAtzma'ut */
|
|
11070
|
+
YOM_HAATZMA_UT: "Yom HaAtzma'ut",
|
|
11071
|
+
/** Yom HaShoah */
|
|
11072
|
+
YOM_HASHOAH: 'Yom HaShoah',
|
|
11073
|
+
/** Yom HaZikaron */
|
|
11074
|
+
YOM_HAZIKARON: 'Yom HaZikaron',
|
|
11075
|
+
/** Ben-Gurion Day */
|
|
11076
|
+
BEN_GURION_DAY: 'Ben-Gurion Day',
|
|
11077
|
+
/** Chanukah: 1 Candle */
|
|
11078
|
+
CHANUKAH_1_CANDLE: 'Chanukah: 1 Candle',
|
|
11079
|
+
/** Erev Pesach */
|
|
11080
|
+
EREV_PESACH: 'Erev Pesach',
|
|
11081
|
+
/** Erev Purim */
|
|
11082
|
+
EREV_PURIM: 'Erev Purim',
|
|
11083
|
+
/** Erev Rosh Hashana */
|
|
11084
|
+
EREV_ROSH_HASHANA: 'Erev Rosh Hashana',
|
|
11085
|
+
/** Erev Shavuot */
|
|
11086
|
+
EREV_SHAVUOT: 'Erev Shavuot',
|
|
11087
|
+
/** Erev Sukkot */
|
|
11088
|
+
EREV_SUKKOT: 'Erev Sukkot',
|
|
11089
|
+
/** Erev Yom Kippur */
|
|
11090
|
+
EREV_YOM_KIPPUR: 'Erev Yom Kippur',
|
|
11091
|
+
/** Family Day */
|
|
11092
|
+
FAMILY_DAY: 'Family Day',
|
|
11093
|
+
/** Hebrew Language Day */
|
|
11094
|
+
HEBREW_LANGUAGE_DAY: 'Hebrew Language Day',
|
|
11095
|
+
/** Herzl Day */
|
|
11096
|
+
HERZL_DAY: 'Herzl Day',
|
|
11097
|
+
/** Jabotinsky Day */
|
|
11098
|
+
JABOTINSKY_DAY: 'Jabotinsky Day',
|
|
11099
|
+
/** Lag BaOmer */
|
|
11100
|
+
LAG_BAOMER: 'Lag BaOmer',
|
|
11101
|
+
/** Pesach I */
|
|
11102
|
+
PESACH_I: 'Pesach I',
|
|
11103
|
+
/** Pesach II */
|
|
11104
|
+
PESACH_II: 'Pesach II',
|
|
11105
|
+
/** Pesach III (CH''M) */
|
|
11106
|
+
PESACH_III_CHM: "Pesach III (CH''M)",
|
|
11107
|
+
/** Pesach II (CH''M) */
|
|
11108
|
+
PESACH_II_CHM: "Pesach II (CH''M)",
|
|
11109
|
+
/** Pesach IV (CH''M) */
|
|
11110
|
+
PESACH_IV_CHM: "Pesach IV (CH''M)",
|
|
11111
|
+
/** Pesach Sheni */
|
|
11112
|
+
PESACH_SHENI: 'Pesach Sheni',
|
|
11113
|
+
/** Pesach VII */
|
|
11114
|
+
PESACH_VII: 'Pesach VII',
|
|
11115
|
+
/** Pesach VIII */
|
|
11116
|
+
PESACH_VIII: 'Pesach VIII',
|
|
11117
|
+
/** Pesach VI (CH''M) */
|
|
11118
|
+
PESACH_VI_CHM: "Pesach VI (CH''M)",
|
|
11119
|
+
/** Pesach V (CH''M) */
|
|
11120
|
+
PESACH_V_CHM: "Pesach V (CH''M)",
|
|
11121
|
+
/** Purim */
|
|
11122
|
+
PURIM: 'Purim',
|
|
11123
|
+
/** Rosh Hashana II */
|
|
11124
|
+
ROSH_HASHANA_II: 'Rosh Hashana II',
|
|
11125
|
+
/** Rosh Hashana LaBehemot */
|
|
11126
|
+
ROSH_HASHANA_LABEHEMOT: 'Rosh Hashana LaBehemot',
|
|
11127
|
+
/** Shavuot */
|
|
11128
|
+
SHAVUOT: 'Shavuot',
|
|
11129
|
+
/** Shavuot I */
|
|
11130
|
+
SHAVUOT_I: 'Shavuot I',
|
|
11131
|
+
/** Shavuot II */
|
|
11132
|
+
SHAVUOT_II: 'Shavuot II',
|
|
11133
|
+
/** Shmini Atzeret */
|
|
11134
|
+
SHMINI_ATZERET: 'Shmini Atzeret',
|
|
11135
|
+
/** Shushan Purim */
|
|
11136
|
+
SHUSHAN_PURIM: 'Shushan Purim',
|
|
11137
|
+
/** Sigd */
|
|
11138
|
+
SIGD: 'Sigd',
|
|
11139
|
+
/** Simchat Torah */
|
|
11140
|
+
SIMCHAT_TORAH: 'Simchat Torah',
|
|
11141
|
+
/** Sukkot I */
|
|
11142
|
+
SUKKOT_I: 'Sukkot I',
|
|
11143
|
+
/** Sukkot II */
|
|
11144
|
+
SUKKOT_II: 'Sukkot II',
|
|
11145
|
+
/** Sukkot III (CH''M) */
|
|
11146
|
+
SUKKOT_III_CHM: "Sukkot III (CH''M)",
|
|
11147
|
+
/** Sukkot II (CH''M) */
|
|
11148
|
+
SUKKOT_II_CHM: "Sukkot II (CH''M)",
|
|
11149
|
+
/** Sukkot IV (CH''M) */
|
|
11150
|
+
SUKKOT_IV_CHM: "Sukkot IV (CH''M)",
|
|
11151
|
+
/** Sukkot VII (Hoshana Raba) */
|
|
11152
|
+
SUKKOT_VII_HOSHANA_RABA: 'Sukkot VII (Hoshana Raba)',
|
|
11153
|
+
/** Sukkot VI (CH''M) */
|
|
11154
|
+
SUKKOT_VI_CHM: "Sukkot VI (CH''M)",
|
|
11155
|
+
/** Sukkot V (CH''M) */
|
|
11156
|
+
SUKKOT_V_CHM: "Sukkot V (CH''M)",
|
|
11157
|
+
/** Tu B'Av */
|
|
11158
|
+
TU_BAV: "Tu B'Av",
|
|
11159
|
+
/** Tu BiShvat */
|
|
11160
|
+
TU_BISHVAT: 'Tu BiShvat',
|
|
11161
|
+
/** Yitzhak Rabin Memorial Day */
|
|
11162
|
+
YITZHAK_RABIN_MEMORIAL_DAY: 'Yitzhak Rabin Memorial Day',
|
|
11163
|
+
/** Yom HaAliyah */
|
|
11164
|
+
YOM_HAALIYAH: 'Yom HaAliyah',
|
|
11165
|
+
/** Yom HaAliyah School Observance */
|
|
11166
|
+
YOM_HAALIYAH_SCHOOL_OBSERVANCE: 'Yom HaAliyah School Observance',
|
|
11167
|
+
/** Yom Kippur */
|
|
11168
|
+
YOM_KIPPUR: 'Yom Kippur',
|
|
11169
|
+
/** Yom Yerushalayim */
|
|
11170
|
+
YOM_YERUSHALAYIM: 'Yom Yerushalayim',
|
|
11171
|
+
/** Candle lighting */
|
|
11172
|
+
CANDLE_LIGHTING: 'Candle lighting',
|
|
11173
|
+
/** Havdalah */
|
|
11174
|
+
HAVDALAH: 'Havdalah',
|
|
11175
|
+
/** Fast begins */
|
|
11176
|
+
FAST_BEGINS: 'Fast begins',
|
|
11177
|
+
/** Fast ends */
|
|
11178
|
+
FAST_ENDS: 'Fast ends',
|
|
11179
|
+
/** Biur Chametz */
|
|
11180
|
+
BIUR_CHAMETZ: 'Biur Chametz',
|
|
11181
|
+
/** Finish eating chametz */
|
|
11182
|
+
SOF_ZMAN_ACHILAT_CHAMETZ: 'Finish eating chametz',
|
|
11183
|
+
/** Yizkor */
|
|
11184
|
+
YIZKOR: 'Yizkor',
|
|
11185
|
+
/** Remembrance Day for the Fallen of the Swords of Iron War (October 7) */
|
|
11186
|
+
SWORDS_OF_IRON_WAR_MEMORIAL: 'Swords of Iron War Memorial Day',
|
|
11187
|
+
};
|
|
11188
|
+
const d = holidayDesc;
|
|
11189
|
+
const emojiRoshHashana = '🍏🍯';
|
|
11190
|
+
const emojiSukkot = '🌿🍋';
|
|
11191
|
+
const emojiPurim = '🎭️📜';
|
|
11192
|
+
const emojiPesach = '🫓';
|
|
11193
|
+
const emojiErevPesach = '🫓🍷';
|
|
11194
|
+
const emojiShavuot = '⛰️🌸';
|
|
11195
|
+
function holiday(mm, dd, desc, holidayFlags, extras) {
|
|
11196
|
+
return { mm, dd, desc, flags: holidayFlags, ...extras };
|
|
10980
11197
|
}
|
|
10981
11198
|
/**
|
|
10982
|
-
*
|
|
10983
|
-
*
|
|
10984
|
-
* @param year
|
|
11199
|
+
* Holidays that fall on a fixed Hebrew date. Entries marked `IL_ONLY` or
|
|
11200
|
+
* `CHUL_ONLY` differ between Israel and the Diaspora.
|
|
10985
11201
|
*/
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
}
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
}
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
}
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
}
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
}
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11202
|
+
const staticHolidays = [
|
|
11203
|
+
holiday(TISHREI$2, 2, d.ROSH_HASHANA_II, CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11204
|
+
emoji: emojiRoshHashana,
|
|
11205
|
+
}),
|
|
11206
|
+
holiday(TISHREI$2, 9, d.EREV_YOM_KIPPUR, EREV$2 | LIGHT_CANDLES$2),
|
|
11207
|
+
holiday(TISHREI$2, 10, d.YOM_KIPPUR, CHAG$1 | MAJOR_FAST$2 | YOM_TOV_ENDS$1),
|
|
11208
|
+
// Sukkot chutz l'aretz
|
|
11209
|
+
holiday(TISHREI$2, 14, d.EREV_SUKKOT, CHUL_ONLY$1 | EREV$2 | LIGHT_CANDLES$2, {
|
|
11210
|
+
emoji: emojiSukkot,
|
|
11211
|
+
}),
|
|
11212
|
+
holiday(TISHREI$2, 15, d.SUKKOT_I, CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3, {
|
|
11213
|
+
emoji: emojiSukkot,
|
|
11214
|
+
}),
|
|
11215
|
+
holiday(TISHREI$2, 16, d.SUKKOT_II, CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11216
|
+
emoji: emojiSukkot,
|
|
11217
|
+
}),
|
|
11218
|
+
holiday(TISHREI$2, 17, d.SUKKOT_III_CHM, CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
11219
|
+
chmDay: 1,
|
|
11220
|
+
emoji: emojiSukkot,
|
|
11221
|
+
}),
|
|
11222
|
+
holiday(TISHREI$2, 18, d.SUKKOT_IV_CHM, CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
11223
|
+
chmDay: 2,
|
|
11224
|
+
emoji: emojiSukkot,
|
|
11225
|
+
}),
|
|
11226
|
+
holiday(TISHREI$2, 19, d.SUKKOT_V_CHM, CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
11227
|
+
chmDay: 3,
|
|
11228
|
+
emoji: emojiSukkot,
|
|
11229
|
+
}),
|
|
11230
|
+
holiday(TISHREI$2, 20, d.SUKKOT_VI_CHM, CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
11231
|
+
chmDay: 4,
|
|
11232
|
+
emoji: emojiSukkot,
|
|
11233
|
+
}),
|
|
11234
|
+
holiday(TISHREI$2, 22, d.SHMINI_ATZERET, CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3),
|
|
11235
|
+
holiday(TISHREI$2, 23, d.SIMCHAT_TORAH, CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1),
|
|
11236
|
+
// Sukkot Israel
|
|
11237
|
+
holiday(TISHREI$2, 14, d.EREV_SUKKOT, IL_ONLY$2 | EREV$2 | LIGHT_CANDLES$2, {
|
|
11238
|
+
emoji: emojiSukkot,
|
|
11239
|
+
}),
|
|
11240
|
+
holiday(TISHREI$2, 15, d.SUKKOT_I, IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11241
|
+
emoji: emojiSukkot,
|
|
11242
|
+
}),
|
|
11243
|
+
holiday(TISHREI$2, 16, d.SUKKOT_II_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11244
|
+
chmDay: 1,
|
|
11245
|
+
emoji: emojiSukkot,
|
|
11246
|
+
}),
|
|
11247
|
+
holiday(TISHREI$2, 17, d.SUKKOT_III_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11248
|
+
chmDay: 2,
|
|
11249
|
+
emoji: emojiSukkot,
|
|
11250
|
+
}),
|
|
11251
|
+
holiday(TISHREI$2, 18, d.SUKKOT_IV_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11252
|
+
chmDay: 3,
|
|
11253
|
+
emoji: emojiSukkot,
|
|
11254
|
+
}),
|
|
11255
|
+
holiday(TISHREI$2, 19, d.SUKKOT_V_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11256
|
+
chmDay: 4,
|
|
11257
|
+
emoji: emojiSukkot,
|
|
11258
|
+
}),
|
|
11259
|
+
holiday(TISHREI$2, 20, d.SUKKOT_VI_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11260
|
+
chmDay: 5,
|
|
11261
|
+
emoji: emojiSukkot,
|
|
11262
|
+
}),
|
|
11263
|
+
holiday(TISHREI$2, 22, d.SHMINI_ATZERET, IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1),
|
|
11264
|
+
// Hoshana Raba (both Israel and Diaspora)
|
|
11265
|
+
holiday(TISHREI$2, 21, d.SUKKOT_VII_HOSHANA_RABA, LIGHT_CANDLES$2 | CHOL_HAMOED$1, {
|
|
11266
|
+
chmDay: -1,
|
|
11267
|
+
emoji: emojiSukkot,
|
|
11268
|
+
}),
|
|
11269
|
+
holiday(SHVAT, 15, d.TU_BISHVAT, MINOR_HOLIDAY$2, { emoji: '🌳' }),
|
|
11270
|
+
holiday(ADAR_II$1, 13, d.EREV_PURIM, EREV$2 | MINOR_HOLIDAY$2, {
|
|
11271
|
+
emoji: emojiPurim,
|
|
11272
|
+
}),
|
|
11273
|
+
holiday(ADAR_II$1, 14, d.PURIM, MINOR_HOLIDAY$2, { emoji: emojiPurim }),
|
|
11274
|
+
holiday(ADAR_II$1, 15, d.SHUSHAN_PURIM, MINOR_HOLIDAY$2, { emoji: emojiPurim }),
|
|
11275
|
+
// Pesach Israel
|
|
11276
|
+
holiday(NISAN$4, 14, d.EREV_PESACH, IL_ONLY$2 | EREV$2 | LIGHT_CANDLES$2, {
|
|
11277
|
+
emoji: emojiErevPesach,
|
|
11278
|
+
}),
|
|
11279
|
+
holiday(NISAN$4, 15, d.PESACH_I, IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11280
|
+
emoji: emojiPesach,
|
|
11281
|
+
}),
|
|
11282
|
+
holiday(NISAN$4, 16, d.PESACH_II_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11283
|
+
chmDay: 1,
|
|
11284
|
+
emoji: emojiPesach,
|
|
11285
|
+
}),
|
|
11286
|
+
holiday(NISAN$4, 17, d.PESACH_III_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11287
|
+
chmDay: 2,
|
|
11288
|
+
emoji: emojiPesach,
|
|
11289
|
+
}),
|
|
11290
|
+
holiday(NISAN$4, 18, d.PESACH_IV_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11291
|
+
chmDay: 3,
|
|
11292
|
+
emoji: emojiPesach,
|
|
11293
|
+
}),
|
|
11294
|
+
holiday(NISAN$4, 19, d.PESACH_V_CHM, IL_ONLY$2 | CHOL_HAMOED$1, {
|
|
11295
|
+
chmDay: 4,
|
|
11296
|
+
emoji: emojiPesach,
|
|
11297
|
+
}),
|
|
11298
|
+
holiday(NISAN$4, 20, d.PESACH_VI_CHM, IL_ONLY$2 | CHOL_HAMOED$1 | LIGHT_CANDLES$2, {
|
|
11299
|
+
chmDay: 5,
|
|
11300
|
+
emoji: emojiPesach,
|
|
11301
|
+
}),
|
|
11302
|
+
holiday(NISAN$4, 21, d.PESACH_VII, IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11303
|
+
emoji: emojiPesach,
|
|
11304
|
+
}),
|
|
11305
|
+
// Pesach chutz l'aretz
|
|
11306
|
+
holiday(NISAN$4, 14, d.EREV_PESACH, CHUL_ONLY$1 | EREV$2 | LIGHT_CANDLES$2, {
|
|
11307
|
+
emoji: emojiErevPesach,
|
|
11308
|
+
}),
|
|
11309
|
+
holiday(NISAN$4, 15, d.PESACH_I, CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3, {
|
|
11310
|
+
emoji: emojiErevPesach,
|
|
11311
|
+
}),
|
|
11312
|
+
holiday(NISAN$4, 16, d.PESACH_II, CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11313
|
+
emoji: emojiPesach,
|
|
11314
|
+
}),
|
|
11315
|
+
holiday(NISAN$4, 17, d.PESACH_III_CHM, CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
11316
|
+
chmDay: 1,
|
|
11317
|
+
emoji: emojiPesach,
|
|
11318
|
+
}),
|
|
11319
|
+
holiday(NISAN$4, 18, d.PESACH_IV_CHM, CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
11320
|
+
chmDay: 2,
|
|
11321
|
+
emoji: emojiPesach,
|
|
11322
|
+
}),
|
|
11323
|
+
holiday(NISAN$4, 19, d.PESACH_V_CHM, CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
11324
|
+
chmDay: 3,
|
|
11325
|
+
emoji: emojiPesach,
|
|
11326
|
+
}),
|
|
11327
|
+
holiday(NISAN$4, 20, d.PESACH_VI_CHM, CHUL_ONLY$1 | CHOL_HAMOED$1 | LIGHT_CANDLES$2, {
|
|
11328
|
+
chmDay: 4,
|
|
11329
|
+
emoji: emojiPesach,
|
|
11330
|
+
}),
|
|
11331
|
+
holiday(NISAN$4, 21, d.PESACH_VII, CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3, {
|
|
11332
|
+
emoji: emojiPesach,
|
|
11333
|
+
}),
|
|
11334
|
+
holiday(NISAN$4, 22, d.PESACH_VIII, CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11335
|
+
emoji: emojiPesach,
|
|
11336
|
+
}),
|
|
11337
|
+
holiday(IYYAR$2, 14, d.PESACH_SHENI, MINOR_HOLIDAY$2),
|
|
11338
|
+
holiday(IYYAR$2, 18, d.LAG_BAOMER, MINOR_HOLIDAY$2, { emoji: '🔥' }),
|
|
11339
|
+
holiday(SIVAN$2, 5, d.EREV_SHAVUOT, EREV$2 | LIGHT_CANDLES$2, {
|
|
11340
|
+
emoji: emojiShavuot,
|
|
11341
|
+
}),
|
|
11342
|
+
holiday(SIVAN$2, 6, d.SHAVUOT, IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11343
|
+
emoji: emojiShavuot,
|
|
11344
|
+
}),
|
|
11345
|
+
holiday(SIVAN$2, 6, d.SHAVUOT_I, CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3, {
|
|
11346
|
+
emoji: emojiShavuot,
|
|
11347
|
+
}),
|
|
11348
|
+
holiday(SIVAN$2, 7, d.SHAVUOT_II, CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1, {
|
|
11349
|
+
emoji: emojiShavuot,
|
|
11350
|
+
}),
|
|
11351
|
+
holiday(AV$2, 15, d.TU_BAV, MINOR_HOLIDAY$2, { emoji: '❤️' }),
|
|
11352
|
+
holiday(ELUL$1, 1, d.ROSH_HASHANA_LABEHEMOT, MINOR_HOLIDAY$2, { emoji: '🐑' }),
|
|
11353
|
+
holiday(ELUL$1, 29, d.EREV_ROSH_HASHANA, EREV$2 | LIGHT_CANDLES$2, {
|
|
11354
|
+
emoji: emojiRoshHashana,
|
|
11355
|
+
}),
|
|
11356
|
+
];
|
|
11017
11357
|
|
|
11018
|
-
This program is free software; you can redistribute it and/or
|
|
11019
|
-
modify it under the terms of the GNU General Public License
|
|
11020
|
-
as published by the Free Software Foundation; either version 2
|
|
11021
|
-
of the License, or (at your option) any later version.
|
|
11022
|
-
|
|
11023
|
-
This program is distributed in the hope that it will be useful,
|
|
11024
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11025
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11026
|
-
GNU General Public License for more details.
|
|
11027
|
-
|
|
11028
|
-
You should have received a copy of the GNU General Public License
|
|
11029
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
11030
|
-
*/
|
|
11031
|
-
/*
|
|
11032
|
-
* Many of the following algorithms were taken from hebrew calendar
|
|
11033
|
-
* routines by Maimonedes, from his Mishneh Torah, and implemented by
|
|
11034
|
-
* Nachum Dershowitz Department of Computer Science
|
|
11035
|
-
* (217) 333-4219 University of Illinois at Urbana-Champaign
|
|
11036
|
-
* nachum@cs.uiuedu 1304 West Springfield Avenue
|
|
11037
|
-
* Urbana, Illinois 61801
|
|
11038
|
-
*
|
|
11039
|
-
* The routines were included in the emacs 19 distribution.
|
|
11040
|
-
*
|
|
11041
|
-
*/
|
|
11042
|
-
const INCOMPLETE = 0;
|
|
11043
|
-
const REGULAR = 1;
|
|
11044
|
-
const COMPLETE = 2;
|
|
11045
|
-
function yearType(hyear) {
|
|
11046
|
-
const longC = HDate.longCheshvan(hyear);
|
|
11047
|
-
const shortK = HDate.shortKislev(hyear);
|
|
11048
|
-
if (longC && !shortK) {
|
|
11049
|
-
return COMPLETE;
|
|
11050
|
-
}
|
|
11051
|
-
if (!longC && shortK) {
|
|
11052
|
-
return INCOMPLETE;
|
|
11053
|
-
}
|
|
11054
|
-
return REGULAR;
|
|
11055
|
-
}
|
|
11056
11358
|
/**
|
|
11057
|
-
* Represents
|
|
11058
|
-
* entire Hebrew year.
|
|
11359
|
+
* Represents a built-in holiday like Pesach, Purim or Tu BiShvat.
|
|
11059
11360
|
*
|
|
11060
|
-
*
|
|
11061
|
-
*
|
|
11062
|
-
*
|
|
11063
|
-
*
|
|
11064
|
-
* or the 2nd day of Shavuot fall on Shabbat).
|
|
11361
|
+
* Most holiday-related events emitted by {@link calendar}
|
|
11362
|
+
* are instances of `HolidayEvent` or one of its subclasses
|
|
11363
|
+
* ({@link ChanukahEvent}, {@link AsaraBTevetEvent},
|
|
11364
|
+
* {@link RoshHashanaEvent}, {@link RoshChodeshEvent}).
|
|
11065
11365
|
*
|
|
11066
|
-
*
|
|
11067
|
-
* calling this constructor directly, since both cache their results.
|
|
11366
|
+
* Adds two notable behaviors over the base {@link Event}:
|
|
11068
11367
|
*
|
|
11069
|
-
* @
|
|
11070
|
-
*
|
|
11071
|
-
*
|
|
11072
|
-
*
|
|
11073
|
-
*
|
|
11368
|
+
* - {@link HolidayEvent.basename} strips qualifiers like `Erev `, ` I`/`II`,
|
|
11369
|
+
* `(CH''M)`, `(observed)`, candle counts, etc. (e.g. `"Erev Pesach"` →
|
|
11370
|
+
* `"Pesach"`).
|
|
11371
|
+
* - {@link HolidayEvent.url} returns a `https://www.hebcal.com/holidays/...`
|
|
11372
|
+
* link for the holiday.
|
|
11074
11373
|
*/
|
|
11075
|
-
class
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
*/
|
|
11081
|
-
constructor(hyear, il) {
|
|
11082
|
-
hyear = +hyear;
|
|
11083
|
-
this.year = hyear;
|
|
11084
|
-
const rh0 = new HDate(1, months.TISHREI, hyear);
|
|
11085
|
-
const rh = (this.rh = rh0.abs());
|
|
11086
|
-
const rhDay = rh0.getDay() + 1;
|
|
11087
|
-
// find the first Saturday on or after Rosh Hashana
|
|
11088
|
-
this.firstSaturday = HDate.dayOnOrBefore(6, rh + 6);
|
|
11089
|
-
const leap = +HDate.isLeapYear(hyear);
|
|
11090
|
-
this.il = Boolean(il);
|
|
11091
|
-
const type = yearType(hyear);
|
|
11092
|
-
let key = `${leap}${rhDay}${type}`;
|
|
11093
|
-
if (types[key]) {
|
|
11094
|
-
this.theSedraArray = types[key];
|
|
11095
|
-
this.yearKey = key;
|
|
11096
|
-
}
|
|
11097
|
-
else {
|
|
11098
|
-
key = key + +this.il; // cast to num, then concat
|
|
11099
|
-
this.theSedraArray = types[key];
|
|
11100
|
-
this.yearKey = key;
|
|
11101
|
-
}
|
|
11102
|
-
if (!this.theSedraArray) {
|
|
11103
|
-
throw new Error(`improper sedra year type ${key} calculated for ${hyear}`);
|
|
11374
|
+
class HolidayEvent extends Event {
|
|
11375
|
+
constructor(date, desc, mask = 0, attrs) {
|
|
11376
|
+
super(date, desc, mask, attrs);
|
|
11377
|
+
if (typeof attrs === 'object' && attrs !== null) {
|
|
11378
|
+
Object.assign(this, attrs);
|
|
11104
11379
|
}
|
|
11105
11380
|
}
|
|
11106
11381
|
/**
|
|
11107
|
-
* Returns
|
|
11108
|
-
*
|
|
11109
|
-
*
|
|
11110
|
-
* A doubled parsha (e.g. `'Matot-Masei'`) will only return a date in years
|
|
11111
|
-
* where that pair is actually read together; in years where they are read
|
|
11112
|
-
* separately, this returns `null`. Use {@link findContaining} to find the
|
|
11113
|
-
* date a parsha is read regardless of whether it is doubled.
|
|
11382
|
+
* Returns a simplified (untranslated) name for this holiday, stripping
|
|
11383
|
+
* qualifiers so that related events group under one name.
|
|
11114
11384
|
*
|
|
11115
|
-
*
|
|
11116
|
-
*
|
|
11385
|
+
* Strips trailing 4-digit years, `(CH''M)`, `(observed)`, `(Hoshana Raba)`,
|
|
11386
|
+
* Roman-numeral day numbers (` I`, ` II`, ...), Chanukah candle counts,
|
|
11387
|
+
* `: 8th Day`, and a leading `"Erev "`.
|
|
11117
11388
|
* @example
|
|
11118
|
-
*
|
|
11119
|
-
*
|
|
11120
|
-
*
|
|
11121
|
-
*
|
|
11122
|
-
* // Matot and Masei are doubled in 5784, so the pair has a date...
|
|
11123
|
-
* sedra.find('Matot-Masei')?.toString(); // '28 Tamuz 5784'
|
|
11124
|
-
* sedra.find(['Matot', 'Masei'])?.toString(); // '28 Tamuz 5784'
|
|
11125
|
-
* // ...but neither half is read on its own that year:
|
|
11126
|
-
* sedra.find('Matot'); // null
|
|
11127
|
-
* @param parsha if a `string`, specified with Sephardic transliterations
|
|
11128
|
-
* like `'Noach'` or `'Matot-Masei'`. If an array, must be a 1- or 2-element
|
|
11129
|
-
* array such as `['Noach']` or `['Matot', 'Masei']`. If a `number`, should
|
|
11130
|
-
* be a 0-based parsha index (`0` for Bereshit, `1` for Noach) or a negative
|
|
11131
|
-
* number for a doubled parsha (e.g. `-21` for Vayakhel-Pekudei).
|
|
11132
|
-
* Note that this index is 0-based, unlike {@link SedraResult.num} which
|
|
11133
|
-
* is 1-based.
|
|
11389
|
+
* // 'Erev Pesach' => 'Pesach'
|
|
11390
|
+
* // 'Sukkot III (CH''M)' => 'Sukkot'
|
|
11391
|
+
* // 'Chanukah: 5 Candles' => 'Chanukah'
|
|
11392
|
+
* // 'Rosh Hashana 5784' => 'Rosh Hashana'
|
|
11134
11393
|
*/
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11394
|
+
basename() {
|
|
11395
|
+
return this.getDesc()
|
|
11396
|
+
.replace(/ \d{4}$/, '')
|
|
11397
|
+
.replace(/ \(CH''M\)$/, '')
|
|
11398
|
+
.replace(/ \(observed\)$/, '')
|
|
11399
|
+
.replace(/ \(Hoshana Raba\)$/, '')
|
|
11400
|
+
.replace(/ [IV]+$/, '')
|
|
11401
|
+
.replace(/: \d Candles?$/, '')
|
|
11402
|
+
.replace(/: 8th Day$/, '')
|
|
11403
|
+
.replace(/^Erev /, '');
|
|
11404
|
+
}
|
|
11405
|
+
/**
|
|
11406
|
+
* Returns a `https://www.hebcal.com/holidays/...` URL for more detail on
|
|
11407
|
+
* this holiday. Israel-only holidays get an `?i=on` query parameter.
|
|
11408
|
+
* Returns `undefined` for years outside `[100, 2999]`.
|
|
11409
|
+
*/
|
|
11410
|
+
url() {
|
|
11411
|
+
const year = this.greg().getFullYear();
|
|
11412
|
+
if (year < 100 || year > 2999) {
|
|
11413
|
+
return undefined;
|
|
11141
11414
|
}
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
return this.
|
|
11415
|
+
const url = `https://www.hebcal.com/holidays/${urlFriendly(this.basename())}-${this.urlDateSuffix()}`;
|
|
11416
|
+
return this.hasFlag('IL_ONLY') ? `${url}?i=on` : url;
|
|
11417
|
+
}
|
|
11418
|
+
/**
|
|
11419
|
+
* The date portion of {@link url}. For most holidays this is just the
|
|
11420
|
+
* Gregorian year; subclasses override it when a year alone is ambiguous.
|
|
11421
|
+
*/
|
|
11422
|
+
urlDateSuffix() {
|
|
11423
|
+
return String(this.greg().getFullYear());
|
|
11424
|
+
}
|
|
11425
|
+
getEmoji() {
|
|
11426
|
+
if (this.emoji) {
|
|
11427
|
+
return this.emoji;
|
|
11155
11428
|
}
|
|
11156
|
-
if (
|
|
11157
|
-
|
|
11158
|
-
if ((plen !== 1 && plen !== 2) || typeof parsha[0] !== 'string') {
|
|
11159
|
-
throw new TypeError(`Invalid parsha argument: ${JSON.stringify(parsha)}`);
|
|
11160
|
-
}
|
|
11161
|
-
if (plen === 1) {
|
|
11162
|
-
return this.find(parsha[0]);
|
|
11163
|
-
}
|
|
11164
|
-
const p1 = parsha[0];
|
|
11165
|
-
const p2 = parsha[1];
|
|
11166
|
-
const num1 = parsha2id.get(p1);
|
|
11167
|
-
const num2 = parsha2id.get(p2);
|
|
11168
|
-
if (typeof num1 !== 'number' ||
|
|
11169
|
-
typeof num2 !== 'number' ||
|
|
11170
|
-
num2 !== num1 + 1 ||
|
|
11171
|
-
!isValidDouble(-num1)) {
|
|
11172
|
-
throw new RangeError(`Unrecognized parsha name: ${p1}-${p2}`);
|
|
11173
|
-
}
|
|
11174
|
-
return this.find(-num1);
|
|
11429
|
+
if (this.hasFlag('SPECIAL_SHABBAT')) {
|
|
11430
|
+
return '🕍';
|
|
11175
11431
|
}
|
|
11176
|
-
return
|
|
11432
|
+
return '✡️';
|
|
11177
11433
|
}
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
return null; // doesn't occur this year
|
|
11434
|
+
getCategories() {
|
|
11435
|
+
if (this.cholHaMoedDay) {
|
|
11436
|
+
return ['holiday', 'major', 'cholhamoed'];
|
|
11182
11437
|
}
|
|
11183
|
-
|
|
11438
|
+
const cats = super.getCategories();
|
|
11439
|
+
if (cats[0] !== 'unknown') {
|
|
11440
|
+
return cats;
|
|
11441
|
+
}
|
|
11442
|
+
// Don't depend on flags.MINOR_HOLIDAY always being set. Look for minor holidays.
|
|
11443
|
+
const desc = this.getDesc();
|
|
11444
|
+
switch (desc) {
|
|
11445
|
+
case holidayDesc.LAG_BAOMER:
|
|
11446
|
+
case holidayDesc.LEIL_SELICHOT:
|
|
11447
|
+
case holidayDesc.PESACH_SHENI:
|
|
11448
|
+
case holidayDesc.EREV_PURIM:
|
|
11449
|
+
case holidayDesc.PURIM_KATAN:
|
|
11450
|
+
case holidayDesc.SHUSHAN_PURIM:
|
|
11451
|
+
case holidayDesc.TU_BAV:
|
|
11452
|
+
case holidayDesc.TU_BISHVAT:
|
|
11453
|
+
case holidayDesc.ROSH_HASHANA_LABEHEMOT:
|
|
11454
|
+
return ['holiday', 'minor'];
|
|
11455
|
+
}
|
|
11456
|
+
return ['holiday', 'major'];
|
|
11184
11457
|
}
|
|
11185
11458
|
/**
|
|
11186
|
-
* Returns
|
|
11187
|
-
*
|
|
11188
|
-
*
|
|
11189
|
-
* For example, if `'Matot'` is read individually this year, this returns
|
|
11190
|
-
* its date; if it is read as part of `'Matot-Masei'` this year, this
|
|
11191
|
-
* returns the date of `'Matot-Masei'` (and similarly for `'Masei'`).
|
|
11192
|
-
* Conversely, asking for `'Matot-Masei'` in a year where they are split
|
|
11193
|
-
* will return the date of `'Matot'` alone.
|
|
11194
|
-
* @example
|
|
11195
|
-
* import {Sedra} from '@hebcal/core';
|
|
11196
|
-
* // Matot and Masei are doubled in 5784, so each half resolves to the
|
|
11197
|
-
* // date of the combined reading:
|
|
11198
|
-
* const sedra = new Sedra(5784, false);
|
|
11199
|
-
* sedra.findContaining('Matot')?.toString(); // '28 Tamuz 5784'
|
|
11200
|
-
* sedra.findContaining('Masei')?.toString(); // '28 Tamuz 5784'
|
|
11201
|
-
* @example
|
|
11202
|
-
* import {Sedra} from '@hebcal/core';
|
|
11203
|
-
* // They are read separately in 5795, so each half has its own date, and
|
|
11204
|
-
* // asking for the doubled name returns the date of the first half:
|
|
11205
|
-
* const sedra = new Sedra(5795, false);
|
|
11206
|
-
* sedra.findContaining('Matot')?.toString(); // '21 Tamuz 5795'
|
|
11207
|
-
* sedra.findContaining('Masei')?.toString(); // '28 Tamuz 5795'
|
|
11208
|
-
* sedra.findContaining('Matot-Masei')?.toString(); // '21 Tamuz 5795'
|
|
11459
|
+
* Returns (translated) description of this event
|
|
11460
|
+
* @param [locale] Optional locale name (defaults to empty locale)
|
|
11209
11461
|
*/
|
|
11210
|
-
|
|
11211
|
-
const
|
|
11212
|
-
|
|
11213
|
-
return hdate;
|
|
11214
|
-
}
|
|
11215
|
-
if (typeof parsha === 'number') {
|
|
11216
|
-
// a valid negative number (double parsha in a year where they are
|
|
11217
|
-
// combined) would've been found above, and a invalid negative number
|
|
11218
|
-
// would've thrown an error, so this parsha must be a positive number
|
|
11219
|
-
// representing either p1 or p2
|
|
11220
|
-
const p1 = -parsha;
|
|
11221
|
-
if (isValidDouble(p1)) {
|
|
11222
|
-
return this.find(p1);
|
|
11223
|
-
}
|
|
11224
|
-
else {
|
|
11225
|
-
// this must be the second individual parsha of a doubled pair
|
|
11226
|
-
// for example 29 for Kedoshim, so check for -28 for Achrei Mot-Kedoshim
|
|
11227
|
-
return this.find(p1 + 1);
|
|
11228
|
-
}
|
|
11229
|
-
}
|
|
11230
|
-
else {
|
|
11231
|
-
const num = parsha2id.get(parsha);
|
|
11232
|
-
if (num) {
|
|
11233
|
-
// parsha is either the first or second individual parsha of
|
|
11234
|
-
// a pair that is doubled this year
|
|
11235
|
-
const p1 = -num;
|
|
11236
|
-
if (isValidDouble(p1)) {
|
|
11237
|
-
return this.find(p1);
|
|
11238
|
-
}
|
|
11239
|
-
else {
|
|
11240
|
-
return this.find(p1 + 1);
|
|
11241
|
-
}
|
|
11242
|
-
}
|
|
11243
|
-
else {
|
|
11244
|
-
// this was indeed a doubled parsha, so return date of the first half
|
|
11245
|
-
const [p1] = parsha.split('-');
|
|
11246
|
-
return this.find(p1);
|
|
11247
|
-
}
|
|
11248
|
-
}
|
|
11462
|
+
render(locale) {
|
|
11463
|
+
const str = super.render(locale);
|
|
11464
|
+
return smartApostrophe(str);
|
|
11249
11465
|
}
|
|
11250
11466
|
/**
|
|
11251
|
-
* Returns
|
|
11252
|
-
*
|
|
11253
|
-
*
|
|
11254
|
-
*
|
|
11255
|
-
* *Bereshit*)
|
|
11256
|
-
* - a negative `number`: the negated first index of a doubled parsha
|
|
11257
|
-
* (e.g. `-21` for *Vayakhel-Pekudei*)
|
|
11258
|
-
* - a `string`: a holiday name when a Yom Tov displaces the weekly reading
|
|
11259
|
-
* (e.g. `'Pesach Shabbat Chol ha-Moed'`, `'Yom Kippur'`)
|
|
11260
|
-
*
|
|
11261
|
-
* Used by `@hebcal/triennial`.
|
|
11467
|
+
* Returns a brief (translated) description of this event.
|
|
11468
|
+
* For most events, this is the same as render(). For some events, it procudes
|
|
11469
|
+
* a shorter text (e.g. without a time or added description).
|
|
11470
|
+
* @param [locale] Optional locale name (defaults to empty locale)
|
|
11262
11471
|
*/
|
|
11263
|
-
|
|
11264
|
-
|
|
11472
|
+
renderBrief(locale) {
|
|
11473
|
+
const str = super.renderBrief(locale);
|
|
11474
|
+
return smartApostrophe(str);
|
|
11475
|
+
}
|
|
11476
|
+
}
|
|
11477
|
+
/**
|
|
11478
|
+
* Because Asara B'Tevet often occurs twice in the same Gregorian year,
|
|
11479
|
+
* we subclass HolidayEvent to generate the correct URL.
|
|
11480
|
+
*/
|
|
11481
|
+
class AsaraBTevetEvent extends HolidayEvent {
|
|
11482
|
+
/** Full `YYYYMMDD` date, since the Gregorian year alone is ambiguous here */
|
|
11483
|
+
urlDateSuffix() {
|
|
11484
|
+
const isoDate = isoDateString(this.greg());
|
|
11485
|
+
return isoDate.replaceAll('-', '');
|
|
11265
11486
|
}
|
|
11487
|
+
}
|
|
11488
|
+
const chanukahEmoji = '🕎';
|
|
11489
|
+
const KEYCAP_DIGITS = [
|
|
11490
|
+
'0️⃣',
|
|
11491
|
+
'1️⃣',
|
|
11492
|
+
'2️⃣',
|
|
11493
|
+
'3️⃣',
|
|
11494
|
+
'4️⃣',
|
|
11495
|
+
'5️⃣',
|
|
11496
|
+
'6️⃣',
|
|
11497
|
+
'7️⃣',
|
|
11498
|
+
'8️⃣',
|
|
11499
|
+
'9️⃣',
|
|
11500
|
+
];
|
|
11501
|
+
/**
|
|
11502
|
+
* Because Chanukah sometimes starts in December and ends in January,
|
|
11503
|
+
* we subclass HolidayEvent to generate the correct URL.
|
|
11504
|
+
*/
|
|
11505
|
+
class ChanukahEvent extends HolidayEvent {
|
|
11266
11506
|
/**
|
|
11267
|
-
*
|
|
11268
|
-
* first Saturday on or after Rosh Hashana of this year. This is the
|
|
11269
|
-
* anchor point for {@link getSedraArray} — index `0` of that array
|
|
11270
|
-
* corresponds to this date.
|
|
11507
|
+
* @param chanukahDay should be undefined for 1st night of Chanukah
|
|
11271
11508
|
*/
|
|
11272
|
-
|
|
11273
|
-
|
|
11509
|
+
constructor(date, desc, mask, chanukahDay) {
|
|
11510
|
+
super(date, desc, mask);
|
|
11511
|
+
this.chanukahDay = chanukahDay;
|
|
11512
|
+
this.emoji = chanukahEmoji;
|
|
11513
|
+
if (chanukahDay !== 8) {
|
|
11514
|
+
const candles = chanukahDay ? chanukahDay + 1 : 1;
|
|
11515
|
+
this.emoji += KEYCAP_DIGITS[candles];
|
|
11516
|
+
}
|
|
11274
11517
|
}
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11518
|
+
urlDateSuffix() {
|
|
11519
|
+
const dt = this.greg();
|
|
11520
|
+
let year = dt.getFullYear();
|
|
11521
|
+
if (dt.getMonth() === 0) {
|
|
11522
|
+
year--;
|
|
11523
|
+
}
|
|
11524
|
+
return String(year);
|
|
11278
11525
|
}
|
|
11526
|
+
}
|
|
11527
|
+
/** Represents Rosh Hashana, the Jewish New Year */
|
|
11528
|
+
class RoshHashanaEvent extends HolidayEvent {
|
|
11279
11529
|
/**
|
|
11280
|
-
*
|
|
11281
|
-
*
|
|
11282
|
-
*
|
|
11283
|
-
*
|
|
11284
|
-
* If the given date falls in the final days of the Hebrew year (after
|
|
11285
|
-
* the last reading of this year's schedule), this method transparently
|
|
11286
|
-
* delegates to the next year's `Sedra`.
|
|
11287
|
-
* @example
|
|
11288
|
-
* import {Sedra, HDate, months} from '@hebcal/core';
|
|
11289
|
-
* const sedra = new Sedra(5784, false);
|
|
11290
|
-
* // A Friday — returns the upcoming Shabbat's reading
|
|
11291
|
-
* const result = sedra.lookup(new HDate(12, months.CHESHVAN, 5784));
|
|
11292
|
-
* console.log(result.parsha); // ['Lech-Lecha']
|
|
11293
|
-
* console.log(result.chag); // false
|
|
11294
|
-
* console.log(result.hdate.toString()); // '13 Cheshvan 5784' (Saturday)
|
|
11295
|
-
* @param hd Hebrew date or R.D. days
|
|
11530
|
+
* Normally created by {@link calendar} rather than directly.
|
|
11531
|
+
* @param date Hebrew date event occurs
|
|
11532
|
+
* @param hyear Hebrew year
|
|
11533
|
+
* @param mask optional holiday flags
|
|
11296
11534
|
*/
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
throw new TypeError(`Bad date argument: ${hd}`);
|
|
11301
|
-
}
|
|
11302
|
-
if (abs < this.rh) {
|
|
11303
|
-
throw new RangeError(`Date ${hd} before start of Hebrew year ${this.year}`);
|
|
11304
|
-
}
|
|
11305
|
-
// find the first saturday on or after today's date
|
|
11306
|
-
const saturday = HDate.dayOnOrBefore(6, abs + 6);
|
|
11307
|
-
const weekNum = (saturday - this.firstSaturday) / 7;
|
|
11308
|
-
const index = this.theSedraArray[weekNum];
|
|
11309
|
-
if (index === undefined) {
|
|
11310
|
-
const sedra = getSedra(this.year + 1, this.il);
|
|
11311
|
-
return sedra.lookup(saturday); // must be next year
|
|
11312
|
-
}
|
|
11313
|
-
const hdate = new HDate(saturday);
|
|
11314
|
-
if (typeof index === 'string') {
|
|
11315
|
-
// Shabbat has a chag. Return a description
|
|
11316
|
-
return { parsha: [index], chag: true, hdate, il: this.il, num: 0 };
|
|
11317
|
-
}
|
|
11318
|
-
if (index >= 0) {
|
|
11319
|
-
return {
|
|
11320
|
-
parsha: [parshiot[index]],
|
|
11321
|
-
chag: false,
|
|
11322
|
-
num: index + 1,
|
|
11323
|
-
hdate,
|
|
11324
|
-
il: this.il,
|
|
11325
|
-
};
|
|
11326
|
-
}
|
|
11327
|
-
const p1 = D(index); // undouble the parsha
|
|
11328
|
-
return {
|
|
11329
|
-
parsha: [parshiot[p1], parshiot[p1 + 1]],
|
|
11330
|
-
chag: false,
|
|
11331
|
-
num: [p1 + 1, p1 + 2],
|
|
11332
|
-
hdate,
|
|
11333
|
-
il: this.il,
|
|
11334
|
-
};
|
|
11535
|
+
constructor(date, hyear, mask) {
|
|
11536
|
+
super(date, `Rosh Hashana ${hyear}`, mask);
|
|
11537
|
+
this.hyear = hyear;
|
|
11335
11538
|
}
|
|
11336
11539
|
/**
|
|
11337
|
-
* Returns
|
|
11338
|
-
*
|
|
11339
|
-
*
|
|
11340
|
-
* Weekday Torah readings generally begin the upcoming Shabbat parsha. When
|
|
11341
|
-
* the upcoming Shabbat is a holiday, this method returns the next regular
|
|
11342
|
-
* parsha instead.
|
|
11343
|
-
*
|
|
11344
|
-
* For the Tishrei weekdays before Sukkot or Simchat Torah, the weekday
|
|
11345
|
-
* reading is *Vezot Haberakhah* even though it is not read on Shabbat.
|
|
11346
|
-
* @example
|
|
11347
|
-
* import {Sedra, HDate, months} from '@hebcal/core';
|
|
11348
|
-
* const sedra = new Sedra(5784, false);
|
|
11349
|
-
* // Monday 8 Cheshvan — begins the upcoming Shabbat's parsha
|
|
11350
|
-
* sedra.lookupWeekday(new HDate(8, months.CHESHVAN, 5784))?.parsha; // ['Lech-Lecha']
|
|
11351
|
-
* // Tuesday is neither Monday nor Thursday
|
|
11352
|
-
* sedra.lookupWeekday(new HDate(9, months.CHESHVAN, 5784)); // undefined
|
|
11353
|
-
* // Thursday 17 Nisan — the upcoming Shabbat is Chol ha-Moed Pesach,
|
|
11354
|
-
* // so the next regular parsha is returned instead
|
|
11355
|
-
* sedra.lookupWeekday(new HDate(17, months.NISAN, 5784))?.parsha; // ['Achrei Mot']
|
|
11356
|
-
* @param hd Hebrew date or R.D. days
|
|
11540
|
+
* Returns (translated) description of this event
|
|
11541
|
+
* @param [locale] Optional locale name (defaults to empty locale)
|
|
11357
11542
|
*/
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
if (isNaN(abs)) {
|
|
11361
|
-
throw new TypeError(`Bad date argument: ${hd}`);
|
|
11362
|
-
}
|
|
11363
|
-
if (abs < this.rh) {
|
|
11364
|
-
throw new RangeError(`Date ${hd} before start of Hebrew year ${this.year}`);
|
|
11365
|
-
}
|
|
11366
|
-
const hdate = new HDate(abs);
|
|
11367
|
-
const day = hdate.getDay();
|
|
11368
|
-
if (day !== 1 && day !== 4) {
|
|
11369
|
-
return undefined;
|
|
11370
|
-
}
|
|
11371
|
-
const saturday = new HDate(HDate.dayOnOrBefore(6, abs + 6));
|
|
11372
|
-
const parsha = this.lookup(saturday);
|
|
11373
|
-
if (!parsha.chag) {
|
|
11374
|
-
return parsha;
|
|
11375
|
-
}
|
|
11376
|
-
return this.findWeekdayParsha(saturday);
|
|
11543
|
+
render(locale) {
|
|
11544
|
+
return `${Locale.gettext('Rosh Hashana', locale)} ${this.hyear}`;
|
|
11377
11545
|
}
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
const il = this.il;
|
|
11381
|
-
if (saturday.getMonth() === months.TISHREI) {
|
|
11382
|
-
const dd = saturday.getDate();
|
|
11383
|
-
const simchatTorah = il ? 22 : 23;
|
|
11384
|
-
if (dd > 2 && dd <= simchatTorah) {
|
|
11385
|
-
return {
|
|
11386
|
-
parsha: ['Vezot Haberakhah'],
|
|
11387
|
-
chag: false,
|
|
11388
|
-
num: 54,
|
|
11389
|
-
hdate: saturday,
|
|
11390
|
-
il,
|
|
11391
|
-
};
|
|
11392
|
-
}
|
|
11393
|
-
}
|
|
11394
|
-
const sedra = hyear === this.year ? this : getSedra(hyear, il);
|
|
11395
|
-
const endOfYear = new HDate(1, months.TISHREI, hyear + 1).abs() - 1;
|
|
11396
|
-
const endAbs = endOfYear + 30;
|
|
11397
|
-
for (let sat2 = saturday.abs() + 7; sat2 <= endAbs; sat2 += 7) {
|
|
11398
|
-
const sedra2 = sat2 > endOfYear ? getSedra(hyear + 1, il) : sedra;
|
|
11399
|
-
const parsha2 = sedra2.lookup(sat2);
|
|
11400
|
-
if (!parsha2.chag) {
|
|
11401
|
-
return parsha2;
|
|
11402
|
-
}
|
|
11403
|
-
}
|
|
11404
|
-
/* NOTREACHED */
|
|
11405
|
-
throw new Error(`can't find weekday parsha for ${saturday}/${il}`);
|
|
11546
|
+
getEmoji() {
|
|
11547
|
+
return '🍏🍯';
|
|
11406
11548
|
}
|
|
11407
11549
|
}
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
const
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
const
|
|
11513
|
-
const PESACH8 = 'Pesach VIII';
|
|
11514
|
-
const SHAVUOT$1 = 'Shavuot'; // 33
|
|
11515
|
-
/**
|
|
11516
|
-
* Returns an array from start to end
|
|
11517
|
-
* @private
|
|
11518
|
-
* @param start beginning number, inclusive
|
|
11519
|
-
* @param stop ending number, inclusive
|
|
11520
|
-
*/
|
|
11521
|
-
function range$1(start, stop) {
|
|
11522
|
-
return Array.from({ length: stop - start + 1 }, (v, k) => k + start);
|
|
11523
|
-
}
|
|
11524
|
-
const yearStartVayeilech = [51, 52, CHMSUKOT];
|
|
11525
|
-
const yearStartHaazinu = [52, YK, CHMSUKOT];
|
|
11526
|
-
const yearStartRH = [RH, 52, SUKKOT, SHMINI];
|
|
11527
|
-
const r020 = range$1(0, 20);
|
|
11528
|
-
const r027 = range$1(0, 27);
|
|
11529
|
-
const r3340 = range$1(33, 40);
|
|
11530
|
-
const r4349 = range$1(43, 49);
|
|
11531
|
-
const r4350 = range$1(43, 50);
|
|
11532
|
-
/**
|
|
11533
|
-
* The ordinary year types (keviot)
|
|
11534
|
-
* names are leap/nonleap - day - incomplete/regular/complete - diaspora/Israel
|
|
11535
|
-
* @private
|
|
11536
|
-
* @readonly
|
|
11537
|
-
*/
|
|
11538
|
-
const types = {
|
|
11539
|
-
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
11540
|
-
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
11541
|
-
// e.g. 5753
|
|
11542
|
-
'020': yearStartVayeilech.concat(r020, D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), r3340, D(41), r4349, D(50)),
|
|
11543
|
-
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
11544
|
-
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
11545
|
-
// e.g. 5756
|
|
11546
|
-
'0220': yearStartVayeilech.concat(r020, D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), 33, SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
11547
|
-
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
11548
|
-
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
11549
|
-
// e.g. 5701
|
|
11550
|
-
'0510': yearStartHaazinu.concat(r020, D(21), 23, 24, PESACH1, PESACH8, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
11551
|
-
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
11552
|
-
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
11553
|
-
// e.g. 5745
|
|
11554
|
-
'0511': yearStartHaazinu.concat(r020, D(21), 23, 24, PESACH, 25, D(26), D(28), range$1(30, 40), D(41), r4350),
|
|
11555
|
-
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
11556
|
-
* Kislev each have 30 days), and has Passover start on Sunday. */
|
|
11557
|
-
// e.g. 5754
|
|
11558
|
-
'052': yearStartHaazinu.concat(range$1(0, 24), PESACH7, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
11559
|
-
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev
|
|
11560
|
-
* each have 29 days), and has Passover start on Sunday. */
|
|
11561
|
-
// e.g. 5761
|
|
11562
|
-
'070': yearStartRH.concat(r020, D(21), 23, 24, PESACH7, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
11563
|
-
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
11564
|
-
* Kislev each have 30 days), and has Passover start on Tuesday. */
|
|
11565
|
-
// e.g. 5716
|
|
11566
|
-
'072': yearStartRH.concat(r020, D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), r3340, D(41), r4349, D(50)),
|
|
11567
|
-
/* -- The leap year types (keviot) -- */
|
|
11568
|
-
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
11569
|
-
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
11570
|
-
// e.g. 5746
|
|
11571
|
-
'1200': yearStartVayeilech.concat(r027, CHMPESACH, range$1(28, 33), SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
11572
|
-
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
11573
|
-
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
11574
|
-
// e.g. 5746
|
|
11575
|
-
'1201': yearStartVayeilech.concat(r027, CHMPESACH, range$1(28, 40), D(41), r4349, D(50)),
|
|
11576
|
-
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
11577
|
-
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
11578
|
-
// e.g.5752
|
|
11579
|
-
'1220': yearStartVayeilech.concat(r027, PESACH1, PESACH8, range$1(28, 40), D(41), r4350),
|
|
11580
|
-
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
11581
|
-
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
11582
|
-
// e.g.5752
|
|
11583
|
-
'1221': yearStartVayeilech.concat(r027, PESACH, range$1(28, 50)),
|
|
11584
|
-
/* Hebrew year that starts on Thursday, is `incomplete' (Heshvan and
|
|
11585
|
-
* Kislev both have 29 days), and has Passover start on Sunday. */
|
|
11586
|
-
// e.g. 5768
|
|
11587
|
-
'150': yearStartHaazinu.concat(range$1(0, 28), PESACH7, range$1(29, 50)),
|
|
11588
|
-
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
11589
|
-
* Kislev both have 30 days), and has Passover start on Tuesday. */
|
|
11590
|
-
// eg. 5771
|
|
11591
|
-
'152': yearStartHaazinu.concat(range$1(0, 28), CHMPESACH, range$1(29, 49), D(50)),
|
|
11592
|
-
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and
|
|
11593
|
-
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
11594
|
-
// e.g.5757
|
|
11595
|
-
'170': yearStartRH.concat(r027, CHMPESACH, range$1(28, 40), D(41), r4349, D(50)),
|
|
11596
|
-
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
11597
|
-
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
11598
|
-
'1720': yearStartRH.concat(r027, CHMPESACH, range$1(28, 33), SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
11599
|
-
};
|
|
11600
|
-
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
11601
|
-
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
11602
|
-
types['0221'] = types['020'];
|
|
11603
|
-
/* Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29
|
|
11604
|
-
* days and Kislev has 30 days), and has Passover start on Thursday. */
|
|
11605
|
-
// e.g. 5715
|
|
11606
|
-
types['0310'] = types['0220'];
|
|
11607
|
-
/* Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29
|
|
11608
|
-
* days and Kislev has 30 days), and has Passover start on Thursday. */
|
|
11609
|
-
types['0311'] = types['020'];
|
|
11610
|
-
/* Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29
|
|
11611
|
-
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
11612
|
-
// e.g. 5715
|
|
11613
|
-
types['1310'] = types['1220'];
|
|
11614
|
-
/* Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29
|
|
11615
|
-
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
11616
|
-
types['1311'] = types['1221'];
|
|
11617
|
-
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
11618
|
-
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
11619
|
-
types['1721'] = types['170'];
|
|
11620
|
-
const sedraCache = new QuickLRU({ maxSize: 120 });
|
|
11621
|
-
/**
|
|
11622
|
-
* Convenience function to create an instance of {@link Sedra} or reuse a
|
|
11623
|
-
* previously created and cached instance for the same year and schedule.
|
|
11624
|
-
*
|
|
11625
|
-
* Prefer this over `new Sedra(...)` when calling repeatedly — an internal
|
|
11626
|
-
* LRU cache (~120 entries) avoids recomputing the keviyah-specific schedule.
|
|
11627
|
-
* @example
|
|
11628
|
-
* import {getSedra, HDate, months} from '@hebcal/core';
|
|
11629
|
-
* const sedra = getSedra(5784, false);
|
|
11630
|
-
* const {parsha} = sedra.lookup(new HDate(15, months.CHESHVAN, 5784));
|
|
11631
|
-
* console.log(parsha); // ['Vayera']
|
|
11632
|
-
* @param hyear Hebrew year
|
|
11633
|
-
* @param il Use Israel sedra schedule (`false` for Diaspora)
|
|
11634
|
-
*/
|
|
11635
|
-
function getSedra(hyear, il) {
|
|
11636
|
-
const cacheKey = `${hyear}-${il ? 1 : 0}`;
|
|
11637
|
-
let sedra = sedraCache.get(cacheKey);
|
|
11638
|
-
if (!sedra) {
|
|
11639
|
-
sedra = new Sedra(hyear, il);
|
|
11640
|
-
sedraCache.set(cacheKey, sedra);
|
|
11641
|
-
}
|
|
11642
|
-
return sedra;
|
|
11643
|
-
}
|
|
11644
|
-
|
|
11645
|
-
const Nisan = months.NISAN;
|
|
11646
|
-
const Iyyar = months.IYYAR;
|
|
11647
|
-
const Sivan = months.SIVAN;
|
|
11648
|
-
const Tamuz = months.TAMUZ;
|
|
11649
|
-
const Av = months.AV;
|
|
11650
|
-
const Elul = months.ELUL;
|
|
11651
|
-
const Tishrei = months.TISHREI;
|
|
11652
|
-
const Cheshvan = months.CHESHVAN;
|
|
11653
|
-
const Kislev = months.KISLEV;
|
|
11654
|
-
const Shvat = months.SHVAT;
|
|
11655
|
-
const Adar2 = months.ADAR_II;
|
|
11656
|
-
const CHAG$1 = flags.CHAG;
|
|
11657
|
-
const LIGHT_CANDLES$2 = flags.LIGHT_CANDLES;
|
|
11658
|
-
const YOM_TOV_ENDS$1 = flags.YOM_TOV_ENDS;
|
|
11659
|
-
const CHUL_ONLY$1 = flags.CHUL_ONLY;
|
|
11660
|
-
const IL_ONLY$2 = flags.IL_ONLY;
|
|
11661
|
-
const LIGHT_CANDLES_TZEIS$3 = flags.LIGHT_CANDLES_TZEIS;
|
|
11662
|
-
const MAJOR_FAST$2 = flags.MAJOR_FAST;
|
|
11663
|
-
const MINOR_HOLIDAY$2 = flags.MINOR_HOLIDAY;
|
|
11664
|
-
const EREV$2 = flags.EREV;
|
|
11665
|
-
const CHOL_HAMOED$1 = flags.CHOL_HAMOED;
|
|
11666
|
-
const emojiPesach = '🫓';
|
|
11667
|
-
const emojiSukkot = '🌿🍋';
|
|
11668
|
-
const ROSH_HASHANA_II = 'Rosh Hashana II';
|
|
11669
|
-
const EREV_YOM_KIPPUR = 'Erev Yom Kippur';
|
|
11670
|
-
const YOM_KIPPUR = 'Yom Kippur';
|
|
11671
|
-
const EREV_SUKKOT = 'Erev Sukkot';
|
|
11672
|
-
const SUKKOT_I = 'Sukkot I';
|
|
11673
|
-
const SUKKOT_II = 'Sukkot II';
|
|
11674
|
-
const SUKKOT_III_CHM = "Sukkot III (CH''M)";
|
|
11675
|
-
const SUKKOT_IV_CHM = "Sukkot IV (CH''M)";
|
|
11676
|
-
const SUKKOT_V_CHM = "Sukkot V (CH''M)";
|
|
11677
|
-
const SUKKOT_VI_CHM = "Sukkot VI (CH''M)";
|
|
11678
|
-
const SHMINI_ATZERET = 'Shmini Atzeret';
|
|
11679
|
-
const SIMCHAT_TORAH = 'Simchat Torah';
|
|
11680
|
-
const SUKKOT_II_CHM = "Sukkot II (CH''M)";
|
|
11681
|
-
const SUKKOT_VII_HOSHANA_RABA = 'Sukkot VII (Hoshana Raba)';
|
|
11682
|
-
const CHANUKAH_1_CANDLE = 'Chanukah: 1 Candle';
|
|
11683
|
-
const TU_BISHVAT = 'Tu BiShvat';
|
|
11684
|
-
const EREV_PURIM = 'Erev Purim';
|
|
11685
|
-
const PURIM = 'Purim';
|
|
11686
|
-
const SHUSHAN_PURIM = 'Shushan Purim';
|
|
11687
|
-
const EREV_PESACH = 'Erev Pesach';
|
|
11688
|
-
const PESACH_I = 'Pesach I';
|
|
11689
|
-
const PESACH_II = 'Pesach II';
|
|
11690
|
-
const PESACH_II_CHM = "Pesach II (CH''M)";
|
|
11691
|
-
const PESACH_III_CHM = "Pesach III (CH''M)";
|
|
11692
|
-
const PESACH_IV_CHM = "Pesach IV (CH''M)";
|
|
11693
|
-
const PESACH_V_CHM = "Pesach V (CH''M)";
|
|
11694
|
-
const PESACH_VI_CHM = "Pesach VI (CH''M)";
|
|
11695
|
-
const PESACH_VII = 'Pesach VII';
|
|
11696
|
-
const PESACH_VIII = 'Pesach VIII';
|
|
11697
|
-
const PESACH_SHENI = 'Pesach Sheni';
|
|
11698
|
-
const LAG_BAOMER = 'Lag BaOmer';
|
|
11699
|
-
const EREV_SHAVUOT = 'Erev Shavuot';
|
|
11700
|
-
const SHAVUOT = 'Shavuot';
|
|
11701
|
-
const SHAVUOT_I = 'Shavuot I';
|
|
11702
|
-
const SHAVUOT_II = 'Shavuot II';
|
|
11703
|
-
const TU_BAV = "Tu B'Av";
|
|
11704
|
-
const ROSH_HASHANA_LABEHEMOT = 'Rosh Hashana LaBehemot';
|
|
11705
|
-
const EREV_ROSH_HASHANA = 'Erev Rosh Hashana';
|
|
11706
|
-
const YOM_YERUSHALAYIM = 'Yom Yerushalayim';
|
|
11707
|
-
const BEN_GURION_DAY = 'Ben-Gurion Day';
|
|
11708
|
-
const FAMILY_DAY = 'Family Day';
|
|
11709
|
-
const YITZHAK_RABIN_MEMORIAL_DAY = 'Yitzhak Rabin Memorial Day';
|
|
11710
|
-
const HERZL_DAY = 'Herzl Day';
|
|
11711
|
-
const JABOTINSKY_DAY = 'Jabotinsky Day';
|
|
11712
|
-
const SIGD = 'Sigd';
|
|
11713
|
-
const YOM_HAALIYAH = 'Yom HaAliyah';
|
|
11714
|
-
const YOM_HAALIYAH_SCHOOL_OBSERVANCE = 'Yom HaAliyah School Observance';
|
|
11715
|
-
const HEBREW_LANGUAGE_DAY = 'Hebrew Language Day';
|
|
11716
|
-
const CANDLE_LIGHTING$1 = 'Candle lighting';
|
|
11717
|
-
const HAVDALAH$1 = 'Havdalah';
|
|
11718
|
-
const FAST_BEGINS$1 = 'Fast begins';
|
|
11719
|
-
const FAST_ENDS$1 = 'Fast ends';
|
|
11720
|
-
const BIUR_CHAMETZ = 'Biur Chametz';
|
|
11721
|
-
const SOF_ZMAN_ACHILAT_CHAMETZ = 'Finish eating chametz';
|
|
11722
|
-
const YIZKOR$1 = 'Yizkor';
|
|
11723
|
-
/**
|
|
11724
|
-
* Transliterated names of holidays, used by `Event.getDesc()`
|
|
11725
|
-
*/
|
|
11726
|
-
const holidayDesc = {
|
|
11727
|
-
/** Asara B'Tevet */
|
|
11728
|
-
ASARA_BTEVET: "Asara B'Tevet",
|
|
11729
|
-
/** Birkat Hachamah */
|
|
11730
|
-
BIRKAT_HACHAMAH: 'Birkat Hachamah',
|
|
11731
|
-
/** Chag HaBanot */
|
|
11732
|
-
CHAG_HABANOT: 'Chag HaBanot',
|
|
11733
|
-
/** Chanukah: 8th Day */
|
|
11734
|
-
CHANUKAH_8TH_DAY: 'Chanukah: 8th Day',
|
|
11735
|
-
/** Erev Tish'a B'Av */
|
|
11736
|
-
EREV_TISHA_BAV: "Erev Tish'a B'Av",
|
|
11737
|
-
/** Leil Selichot */
|
|
11738
|
-
LEIL_SELICHOT: 'Leil Selichot',
|
|
11739
|
-
/** Purim Katan */
|
|
11740
|
-
PURIM_KATAN: 'Purim Katan',
|
|
11741
|
-
/** Purim Meshulash */
|
|
11742
|
-
PURIM_MESHULASH: 'Purim Meshulash',
|
|
11743
|
-
/** Shabbat Chazon */
|
|
11744
|
-
SHABBAT_CHAZON: 'Shabbat Chazon',
|
|
11745
|
-
/** Shabbat HaChodesh */
|
|
11746
|
-
SHABBAT_HACHODESH: 'Shabbat HaChodesh',
|
|
11747
|
-
/** Shabbat HaGadol */
|
|
11748
|
-
SHABBAT_HAGADOL: 'Shabbat HaGadol',
|
|
11749
|
-
/** Shabbat Nachamu */
|
|
11750
|
-
SHABBAT_NACHAMU: 'Shabbat Nachamu',
|
|
11751
|
-
/** Shabbat Parah */
|
|
11752
|
-
SHABBAT_PARAH: 'Shabbat Parah',
|
|
11753
|
-
/** Shabbat Shekalim */
|
|
11754
|
-
SHABBAT_SHEKALIM: 'Shabbat Shekalim',
|
|
11755
|
-
/** Shabbat Shirah */
|
|
11756
|
-
SHABBAT_SHIRAH: 'Shabbat Shirah',
|
|
11757
|
-
/** Shabbat Shuva */
|
|
11758
|
-
SHABBAT_SHUVA: 'Shabbat Shuva',
|
|
11759
|
-
/** Shabbat Zachor */
|
|
11760
|
-
SHABBAT_ZACHOR: 'Shabbat Zachor',
|
|
11761
|
-
/** Shushan Purim Katan */
|
|
11762
|
-
SHUSHAN_PURIM_KATAN: 'Shushan Purim Katan',
|
|
11763
|
-
/** Ta'anit Bechorot */
|
|
11764
|
-
TAANIT_BECHOROT: "Ta'anit Bechorot",
|
|
11765
|
-
/** Ta'anit BeHaB */
|
|
11766
|
-
TAANIT_BEHAB: "Ta'anit BeHaB",
|
|
11767
|
-
/** Ta'anit Esther */
|
|
11768
|
-
TAANIT_ESTHER: "Ta'anit Esther",
|
|
11769
|
-
/** Tish'a B'Av */
|
|
11770
|
-
TISHA_BAV: "Tish'a B'Av",
|
|
11771
|
-
/** Tzom Gedaliah */
|
|
11772
|
-
TZOM_GEDALIAH: 'Tzom Gedaliah',
|
|
11773
|
-
/** Tzom Tammuz */
|
|
11774
|
-
TZOM_TAMMUZ: 'Tzom Tammuz',
|
|
11775
|
-
/** Yom HaAtzma'ut */
|
|
11776
|
-
YOM_HAATZMA_UT: "Yom HaAtzma'ut",
|
|
11777
|
-
/** Yom HaShoah */
|
|
11778
|
-
YOM_HASHOAH: 'Yom HaShoah',
|
|
11779
|
-
/** Yom HaZikaron */
|
|
11780
|
-
YOM_HAZIKARON: 'Yom HaZikaron',
|
|
11781
|
-
/** Ben-Gurion Day */
|
|
11782
|
-
BEN_GURION_DAY,
|
|
11783
|
-
/** Chanukah: 1 Candle */
|
|
11784
|
-
CHANUKAH_1_CANDLE,
|
|
11785
|
-
/** Erev Pesach */
|
|
11786
|
-
EREV_PESACH,
|
|
11787
|
-
/** Erev Purim */
|
|
11788
|
-
EREV_PURIM,
|
|
11789
|
-
/** Erev Rosh Hashana */
|
|
11790
|
-
EREV_ROSH_HASHANA,
|
|
11791
|
-
/** Erev Shavuot */
|
|
11792
|
-
EREV_SHAVUOT,
|
|
11793
|
-
/** Erev Sukkot */
|
|
11794
|
-
EREV_SUKKOT,
|
|
11795
|
-
/** Erev Yom Kippur */
|
|
11796
|
-
EREV_YOM_KIPPUR,
|
|
11797
|
-
/** Family Day */
|
|
11798
|
-
FAMILY_DAY,
|
|
11799
|
-
/** Hebrew Language Day */
|
|
11800
|
-
HEBREW_LANGUAGE_DAY,
|
|
11801
|
-
/** Herzl Day */
|
|
11802
|
-
HERZL_DAY,
|
|
11803
|
-
/** Jabotinsky Day */
|
|
11804
|
-
JABOTINSKY_DAY,
|
|
11805
|
-
/** Lag BaOmer */
|
|
11806
|
-
LAG_BAOMER,
|
|
11807
|
-
/** Pesach I */
|
|
11808
|
-
PESACH_I,
|
|
11809
|
-
/** Pesach II */
|
|
11810
|
-
PESACH_II,
|
|
11811
|
-
/** Pesach III (CH''M) */
|
|
11812
|
-
PESACH_III_CHM,
|
|
11813
|
-
/** Pesach II (CH''M) */
|
|
11814
|
-
PESACH_II_CHM,
|
|
11815
|
-
/** Pesach IV (CH''M) */
|
|
11816
|
-
PESACH_IV_CHM,
|
|
11817
|
-
/** Pesach Sheni */
|
|
11818
|
-
PESACH_SHENI,
|
|
11819
|
-
/** Pesach VII */
|
|
11820
|
-
PESACH_VII,
|
|
11821
|
-
/** Pesach VIII */
|
|
11822
|
-
PESACH_VIII,
|
|
11823
|
-
/** Pesach VI (CH''M) */
|
|
11824
|
-
PESACH_VI_CHM,
|
|
11825
|
-
/** Pesach V (CH''M) */
|
|
11826
|
-
PESACH_V_CHM,
|
|
11827
|
-
/** Purim */
|
|
11828
|
-
PURIM,
|
|
11829
|
-
/** Rosh Hashana II */
|
|
11830
|
-
ROSH_HASHANA_II,
|
|
11831
|
-
/** Rosh Hashana LaBehemot */
|
|
11832
|
-
ROSH_HASHANA_LABEHEMOT,
|
|
11833
|
-
/** Shavuot */
|
|
11834
|
-
SHAVUOT,
|
|
11835
|
-
/** Shavuot I */
|
|
11836
|
-
SHAVUOT_I,
|
|
11837
|
-
/** Shavuot II */
|
|
11838
|
-
SHAVUOT_II,
|
|
11839
|
-
/** Shmini Atzeret */
|
|
11840
|
-
SHMINI_ATZERET,
|
|
11841
|
-
/** Shushan Purim */
|
|
11842
|
-
SHUSHAN_PURIM,
|
|
11843
|
-
/** Sigd */
|
|
11844
|
-
SIGD,
|
|
11845
|
-
/** Simchat Torah */
|
|
11846
|
-
SIMCHAT_TORAH,
|
|
11847
|
-
/** Sukkot I */
|
|
11848
|
-
SUKKOT_I,
|
|
11849
|
-
/** Sukkot II */
|
|
11850
|
-
SUKKOT_II,
|
|
11851
|
-
/** Sukkot III (CH''M) */
|
|
11852
|
-
SUKKOT_III_CHM,
|
|
11853
|
-
/** Sukkot II (CH''M) */
|
|
11854
|
-
SUKKOT_II_CHM,
|
|
11855
|
-
/** Sukkot IV (CH''M) */
|
|
11856
|
-
SUKKOT_IV_CHM,
|
|
11857
|
-
/** Sukkot VII (Hoshana Raba) */
|
|
11858
|
-
SUKKOT_VII_HOSHANA_RABA,
|
|
11859
|
-
/** Sukkot VI (CH''M) */
|
|
11860
|
-
SUKKOT_VI_CHM,
|
|
11861
|
-
/** Sukkot V (CH''M) */
|
|
11862
|
-
SUKKOT_V_CHM,
|
|
11863
|
-
/** Tu B\'Av */
|
|
11864
|
-
TU_BAV,
|
|
11865
|
-
/** Tu BiShvat */
|
|
11866
|
-
TU_BISHVAT,
|
|
11867
|
-
/** Yitzhak Rabin Memorial Day */
|
|
11868
|
-
YITZHAK_RABIN_MEMORIAL_DAY,
|
|
11869
|
-
/** Yom HaAliyah */
|
|
11870
|
-
YOM_HAALIYAH,
|
|
11871
|
-
/** Yom HaAliyah School Observance */
|
|
11872
|
-
YOM_HAALIYAH_SCHOOL_OBSERVANCE,
|
|
11873
|
-
/** Yom Kippur */
|
|
11874
|
-
YOM_KIPPUR,
|
|
11875
|
-
/** Yom Yerushalayim */
|
|
11876
|
-
YOM_YERUSHALAYIM,
|
|
11877
|
-
/** Candle lighting */
|
|
11878
|
-
CANDLE_LIGHTING: CANDLE_LIGHTING$1,
|
|
11879
|
-
/** Havdalah */
|
|
11880
|
-
HAVDALAH: HAVDALAH$1,
|
|
11881
|
-
/** Fast begins */
|
|
11882
|
-
FAST_BEGINS: FAST_BEGINS$1,
|
|
11883
|
-
/** Fast ends */
|
|
11884
|
-
FAST_ENDS: FAST_ENDS$1,
|
|
11885
|
-
/** Biur Chametz */
|
|
11886
|
-
BIUR_CHAMETZ,
|
|
11887
|
-
/** Finish eating chametz */
|
|
11888
|
-
SOF_ZMAN_ACHILAT_CHAMETZ,
|
|
11889
|
-
/** Yizkor */
|
|
11890
|
-
YIZKOR: YIZKOR$1,
|
|
11891
|
-
};
|
|
11892
|
-
const staticHolidays = [
|
|
11893
|
-
{
|
|
11894
|
-
mm: Tishrei,
|
|
11895
|
-
dd: 2,
|
|
11896
|
-
desc: ROSH_HASHANA_II,
|
|
11897
|
-
flags: CHAG$1 | YOM_TOV_ENDS$1,
|
|
11898
|
-
emoji: '🍏🍯',
|
|
11899
|
-
},
|
|
11900
|
-
{ mm: Tishrei, dd: 9, desc: EREV_YOM_KIPPUR, flags: EREV$2 | LIGHT_CANDLES$2 },
|
|
11901
|
-
{
|
|
11902
|
-
mm: Tishrei,
|
|
11903
|
-
dd: 10,
|
|
11904
|
-
desc: YOM_KIPPUR,
|
|
11905
|
-
flags: CHAG$1 | MAJOR_FAST$2 | YOM_TOV_ENDS$1,
|
|
11906
|
-
},
|
|
11907
|
-
{
|
|
11908
|
-
mm: Tishrei,
|
|
11909
|
-
dd: 14,
|
|
11910
|
-
desc: EREV_SUKKOT,
|
|
11911
|
-
flags: CHUL_ONLY$1 | EREV$2 | LIGHT_CANDLES$2,
|
|
11912
|
-
emoji: emojiSukkot,
|
|
11913
|
-
},
|
|
11914
|
-
{
|
|
11915
|
-
mm: Tishrei,
|
|
11916
|
-
dd: 15,
|
|
11917
|
-
desc: SUKKOT_I,
|
|
11918
|
-
flags: CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3,
|
|
11919
|
-
emoji: emojiSukkot,
|
|
11920
|
-
},
|
|
11921
|
-
{
|
|
11922
|
-
mm: Tishrei,
|
|
11923
|
-
dd: 16,
|
|
11924
|
-
desc: SUKKOT_II,
|
|
11925
|
-
flags: CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
11926
|
-
emoji: emojiSukkot,
|
|
11927
|
-
},
|
|
11928
|
-
{
|
|
11929
|
-
mm: Tishrei,
|
|
11930
|
-
dd: 17,
|
|
11931
|
-
desc: SUKKOT_III_CHM,
|
|
11932
|
-
flags: CHUL_ONLY$1 | CHOL_HAMOED$1,
|
|
11933
|
-
chmDay: 1,
|
|
11934
|
-
emoji: emojiSukkot,
|
|
11935
|
-
},
|
|
11936
|
-
{
|
|
11937
|
-
mm: Tishrei,
|
|
11938
|
-
dd: 18,
|
|
11939
|
-
desc: SUKKOT_IV_CHM,
|
|
11940
|
-
flags: CHUL_ONLY$1 | CHOL_HAMOED$1,
|
|
11941
|
-
chmDay: 2,
|
|
11942
|
-
emoji: emojiSukkot,
|
|
11943
|
-
},
|
|
11944
|
-
{
|
|
11945
|
-
mm: Tishrei,
|
|
11946
|
-
dd: 19,
|
|
11947
|
-
desc: SUKKOT_V_CHM,
|
|
11948
|
-
flags: CHUL_ONLY$1 | CHOL_HAMOED$1,
|
|
11949
|
-
chmDay: 3,
|
|
11950
|
-
emoji: emojiSukkot,
|
|
11951
|
-
},
|
|
11952
|
-
{
|
|
11953
|
-
mm: Tishrei,
|
|
11954
|
-
dd: 20,
|
|
11955
|
-
desc: SUKKOT_VI_CHM,
|
|
11956
|
-
flags: CHUL_ONLY$1 | CHOL_HAMOED$1,
|
|
11957
|
-
chmDay: 4,
|
|
11958
|
-
emoji: emojiSukkot,
|
|
11959
|
-
},
|
|
11960
|
-
{
|
|
11961
|
-
mm: Tishrei,
|
|
11962
|
-
dd: 22,
|
|
11963
|
-
desc: SHMINI_ATZERET,
|
|
11964
|
-
flags: CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3,
|
|
11965
|
-
},
|
|
11966
|
-
{
|
|
11967
|
-
mm: Tishrei,
|
|
11968
|
-
dd: 23,
|
|
11969
|
-
desc: SIMCHAT_TORAH,
|
|
11970
|
-
flags: CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
11971
|
-
},
|
|
11972
|
-
{
|
|
11973
|
-
mm: Tishrei,
|
|
11974
|
-
dd: 14,
|
|
11975
|
-
desc: EREV_SUKKOT,
|
|
11976
|
-
flags: IL_ONLY$2 | EREV$2 | LIGHT_CANDLES$2,
|
|
11977
|
-
emoji: emojiSukkot,
|
|
11978
|
-
},
|
|
11979
|
-
{
|
|
11980
|
-
mm: Tishrei,
|
|
11981
|
-
dd: 15,
|
|
11982
|
-
desc: SUKKOT_I,
|
|
11983
|
-
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
11984
|
-
emoji: emojiSukkot,
|
|
11985
|
-
},
|
|
11986
|
-
{
|
|
11987
|
-
mm: Tishrei,
|
|
11988
|
-
dd: 16,
|
|
11989
|
-
desc: SUKKOT_II_CHM,
|
|
11990
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
11991
|
-
chmDay: 1,
|
|
11992
|
-
emoji: emojiSukkot,
|
|
11993
|
-
},
|
|
11994
|
-
{
|
|
11995
|
-
mm: Tishrei,
|
|
11996
|
-
dd: 17,
|
|
11997
|
-
desc: SUKKOT_III_CHM,
|
|
11998
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
11999
|
-
chmDay: 2,
|
|
12000
|
-
emoji: emojiSukkot,
|
|
12001
|
-
},
|
|
12002
|
-
{
|
|
12003
|
-
mm: Tishrei,
|
|
12004
|
-
dd: 18,
|
|
12005
|
-
desc: SUKKOT_IV_CHM,
|
|
12006
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
12007
|
-
chmDay: 3,
|
|
12008
|
-
emoji: emojiSukkot,
|
|
12009
|
-
},
|
|
12010
|
-
{
|
|
12011
|
-
mm: Tishrei,
|
|
12012
|
-
dd: 19,
|
|
12013
|
-
desc: SUKKOT_V_CHM,
|
|
12014
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
12015
|
-
chmDay: 4,
|
|
12016
|
-
emoji: emojiSukkot,
|
|
12017
|
-
},
|
|
12018
|
-
{
|
|
12019
|
-
mm: Tishrei,
|
|
12020
|
-
dd: 20,
|
|
12021
|
-
desc: SUKKOT_VI_CHM,
|
|
12022
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
12023
|
-
chmDay: 5,
|
|
12024
|
-
emoji: emojiSukkot,
|
|
12025
|
-
},
|
|
12026
|
-
{
|
|
12027
|
-
mm: Tishrei,
|
|
12028
|
-
dd: 22,
|
|
12029
|
-
desc: SHMINI_ATZERET,
|
|
12030
|
-
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
12031
|
-
},
|
|
12032
|
-
{
|
|
12033
|
-
mm: Tishrei,
|
|
12034
|
-
dd: 21,
|
|
12035
|
-
desc: SUKKOT_VII_HOSHANA_RABA,
|
|
12036
|
-
flags: LIGHT_CANDLES$2 | CHOL_HAMOED$1,
|
|
12037
|
-
chmDay: -1,
|
|
12038
|
-
emoji: emojiSukkot,
|
|
12039
|
-
},
|
|
12040
|
-
{ mm: Shvat, dd: 15, desc: TU_BISHVAT, flags: MINOR_HOLIDAY$2, emoji: '🌳' },
|
|
12041
|
-
{
|
|
12042
|
-
mm: Adar2,
|
|
12043
|
-
dd: 13,
|
|
12044
|
-
desc: EREV_PURIM,
|
|
12045
|
-
flags: EREV$2 | MINOR_HOLIDAY$2,
|
|
12046
|
-
emoji: '🎭️📜',
|
|
12047
|
-
},
|
|
12048
|
-
{ mm: Adar2, dd: 14, desc: PURIM, flags: MINOR_HOLIDAY$2, emoji: '🎭️📜' },
|
|
12049
|
-
{
|
|
12050
|
-
mm: Adar2,
|
|
12051
|
-
dd: 15,
|
|
12052
|
-
desc: SHUSHAN_PURIM,
|
|
12053
|
-
flags: MINOR_HOLIDAY$2,
|
|
12054
|
-
emoji: '🎭️📜',
|
|
12055
|
-
},
|
|
12056
|
-
// Pesach Israel
|
|
12057
|
-
{
|
|
12058
|
-
mm: Nisan,
|
|
12059
|
-
dd: 14,
|
|
12060
|
-
desc: EREV_PESACH,
|
|
12061
|
-
flags: IL_ONLY$2 | EREV$2 | LIGHT_CANDLES$2,
|
|
12062
|
-
emoji: '🫓🍷',
|
|
12063
|
-
},
|
|
12064
|
-
{
|
|
12065
|
-
mm: Nisan,
|
|
12066
|
-
dd: 15,
|
|
12067
|
-
desc: PESACH_I,
|
|
12068
|
-
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
12069
|
-
emoji: emojiPesach,
|
|
12070
|
-
},
|
|
12071
|
-
{
|
|
12072
|
-
mm: Nisan,
|
|
12073
|
-
dd: 16,
|
|
12074
|
-
desc: PESACH_II_CHM,
|
|
12075
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
12076
|
-
chmDay: 1,
|
|
12077
|
-
emoji: emojiPesach,
|
|
12078
|
-
},
|
|
12079
|
-
{
|
|
12080
|
-
mm: Nisan,
|
|
12081
|
-
dd: 17,
|
|
12082
|
-
desc: PESACH_III_CHM,
|
|
12083
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
12084
|
-
chmDay: 2,
|
|
12085
|
-
emoji: emojiPesach,
|
|
12086
|
-
},
|
|
12087
|
-
{
|
|
12088
|
-
mm: Nisan,
|
|
12089
|
-
dd: 18,
|
|
12090
|
-
desc: PESACH_IV_CHM,
|
|
12091
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
12092
|
-
chmDay: 3,
|
|
12093
|
-
emoji: emojiPesach,
|
|
12094
|
-
},
|
|
12095
|
-
{
|
|
12096
|
-
mm: Nisan,
|
|
12097
|
-
dd: 19,
|
|
12098
|
-
desc: PESACH_V_CHM,
|
|
12099
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
12100
|
-
chmDay: 4,
|
|
12101
|
-
emoji: emojiPesach,
|
|
12102
|
-
},
|
|
12103
|
-
{
|
|
12104
|
-
mm: Nisan,
|
|
12105
|
-
dd: 20,
|
|
12106
|
-
desc: PESACH_VI_CHM,
|
|
12107
|
-
flags: IL_ONLY$2 | CHOL_HAMOED$1 | LIGHT_CANDLES$2,
|
|
12108
|
-
chmDay: 5,
|
|
12109
|
-
emoji: emojiPesach,
|
|
12110
|
-
},
|
|
12111
|
-
{
|
|
12112
|
-
mm: Nisan,
|
|
12113
|
-
dd: 21,
|
|
12114
|
-
desc: PESACH_VII,
|
|
12115
|
-
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
12116
|
-
emoji: emojiPesach,
|
|
12117
|
-
},
|
|
12118
|
-
// Pesach chutz l'aretz
|
|
12119
|
-
{
|
|
12120
|
-
mm: Nisan,
|
|
12121
|
-
dd: 14,
|
|
12122
|
-
desc: EREV_PESACH,
|
|
12123
|
-
flags: CHUL_ONLY$1 | EREV$2 | LIGHT_CANDLES$2,
|
|
12124
|
-
emoji: '🫓🍷',
|
|
12125
|
-
},
|
|
12126
|
-
{
|
|
12127
|
-
mm: Nisan,
|
|
12128
|
-
dd: 15,
|
|
12129
|
-
desc: PESACH_I,
|
|
12130
|
-
flags: CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3,
|
|
12131
|
-
emoji: '🫓🍷',
|
|
12132
|
-
},
|
|
12133
|
-
{
|
|
12134
|
-
mm: Nisan,
|
|
12135
|
-
dd: 16,
|
|
12136
|
-
desc: PESACH_II,
|
|
12137
|
-
flags: CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
12138
|
-
emoji: emojiPesach,
|
|
12139
|
-
},
|
|
12140
|
-
{
|
|
12141
|
-
mm: Nisan,
|
|
12142
|
-
dd: 17,
|
|
12143
|
-
desc: PESACH_III_CHM,
|
|
12144
|
-
flags: CHUL_ONLY$1 | CHOL_HAMOED$1,
|
|
12145
|
-
chmDay: 1,
|
|
12146
|
-
emoji: emojiPesach,
|
|
12147
|
-
},
|
|
12148
|
-
{
|
|
12149
|
-
mm: Nisan,
|
|
12150
|
-
dd: 18,
|
|
12151
|
-
desc: PESACH_IV_CHM,
|
|
12152
|
-
flags: CHUL_ONLY$1 | CHOL_HAMOED$1,
|
|
12153
|
-
chmDay: 2,
|
|
12154
|
-
emoji: emojiPesach,
|
|
12155
|
-
},
|
|
12156
|
-
{
|
|
12157
|
-
mm: Nisan,
|
|
12158
|
-
dd: 19,
|
|
12159
|
-
desc: PESACH_V_CHM,
|
|
12160
|
-
flags: CHUL_ONLY$1 | CHOL_HAMOED$1,
|
|
12161
|
-
chmDay: 3,
|
|
12162
|
-
emoji: emojiPesach,
|
|
12163
|
-
},
|
|
12164
|
-
{
|
|
12165
|
-
mm: Nisan,
|
|
12166
|
-
dd: 20,
|
|
12167
|
-
desc: PESACH_VI_CHM,
|
|
12168
|
-
flags: CHUL_ONLY$1 | CHOL_HAMOED$1 | LIGHT_CANDLES$2,
|
|
12169
|
-
chmDay: 4,
|
|
12170
|
-
emoji: emojiPesach,
|
|
12171
|
-
},
|
|
12172
|
-
{
|
|
12173
|
-
mm: Nisan,
|
|
12174
|
-
dd: 21,
|
|
12175
|
-
desc: PESACH_VII,
|
|
12176
|
-
flags: CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3,
|
|
12177
|
-
emoji: emojiPesach,
|
|
12178
|
-
},
|
|
12179
|
-
{
|
|
12180
|
-
mm: Nisan,
|
|
12181
|
-
dd: 22,
|
|
12182
|
-
desc: PESACH_VIII,
|
|
12183
|
-
flags: CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
12184
|
-
emoji: emojiPesach,
|
|
12185
|
-
},
|
|
12186
|
-
{ mm: Iyyar, dd: 14, desc: PESACH_SHENI, flags: MINOR_HOLIDAY$2 },
|
|
12187
|
-
{ mm: Iyyar, dd: 18, desc: LAG_BAOMER, flags: MINOR_HOLIDAY$2, emoji: '🔥' },
|
|
12188
|
-
{
|
|
12189
|
-
mm: Sivan,
|
|
12190
|
-
dd: 5,
|
|
12191
|
-
desc: EREV_SHAVUOT,
|
|
12192
|
-
flags: EREV$2 | LIGHT_CANDLES$2,
|
|
12193
|
-
emoji: '⛰️🌸',
|
|
12194
|
-
},
|
|
12195
|
-
{
|
|
12196
|
-
mm: Sivan,
|
|
12197
|
-
dd: 6,
|
|
12198
|
-
desc: SHAVUOT,
|
|
12199
|
-
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
12200
|
-
emoji: '⛰️🌸',
|
|
12201
|
-
},
|
|
12202
|
-
{
|
|
12203
|
-
mm: Sivan,
|
|
12204
|
-
dd: 6,
|
|
12205
|
-
desc: SHAVUOT_I,
|
|
12206
|
-
flags: CHUL_ONLY$1 | CHAG$1 | LIGHT_CANDLES_TZEIS$3,
|
|
12207
|
-
emoji: '⛰️🌸',
|
|
12208
|
-
},
|
|
12209
|
-
{
|
|
12210
|
-
mm: Sivan,
|
|
12211
|
-
dd: 7,
|
|
12212
|
-
desc: SHAVUOT_II,
|
|
12213
|
-
flags: CHUL_ONLY$1 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
12214
|
-
emoji: '⛰️🌸',
|
|
12215
|
-
},
|
|
12216
|
-
{ mm: Av, dd: 15, desc: TU_BAV, flags: MINOR_HOLIDAY$2, emoji: '❤️' },
|
|
12217
|
-
{
|
|
12218
|
-
mm: Elul,
|
|
12219
|
-
dd: 1,
|
|
12220
|
-
desc: ROSH_HASHANA_LABEHEMOT,
|
|
12221
|
-
flags: MINOR_HOLIDAY$2,
|
|
12222
|
-
emoji: '🐑',
|
|
12223
|
-
},
|
|
11550
|
+
const roshChodeshStr = 'Rosh Chodesh';
|
|
11551
|
+
/** Represents Rosh Chodesh, the beginning of a new month */
|
|
11552
|
+
class RoshChodeshEvent extends HolidayEvent {
|
|
11553
|
+
/**
|
|
11554
|
+
* Constructs Rosh Chodesh event
|
|
11555
|
+
* @param date Hebrew date event occurs
|
|
11556
|
+
* @param monthName Hebrew month name (not translated)
|
|
11557
|
+
*/
|
|
11558
|
+
constructor(date, monthName) {
|
|
11559
|
+
super(date, `${roshChodeshStr} ${monthName}`, flags.ROSH_CHODESH);
|
|
11560
|
+
}
|
|
11561
|
+
/**
|
|
11562
|
+
* Returns (translated) description of this event
|
|
11563
|
+
* @param [locale] Optional locale name (defaults to empty locale)
|
|
11564
|
+
*/
|
|
11565
|
+
render(locale) {
|
|
11566
|
+
const monthName = this.getDesc().substring(roshChodeshStr.length + 1);
|
|
11567
|
+
const monthName0 = Locale.gettext(monthName, locale);
|
|
11568
|
+
const monthName1 = smartApostrophe(monthName0);
|
|
11569
|
+
return `${Locale.gettext(roshChodeshStr, locale)} ${monthName1}`;
|
|
11570
|
+
}
|
|
11571
|
+
basename() {
|
|
11572
|
+
return this.getDesc();
|
|
11573
|
+
}
|
|
11574
|
+
getEmoji() {
|
|
11575
|
+
return this.emoji || '🌒';
|
|
11576
|
+
}
|
|
11577
|
+
}
|
|
11578
|
+
|
|
11579
|
+
var Day;
|
|
11580
|
+
(function (Day) {
|
|
11581
|
+
Day[Day["SUN"] = 0] = "SUN";
|
|
11582
|
+
Day[Day["TUE"] = 2] = "TUE";
|
|
11583
|
+
Day[Day["THU"] = 4] = "THU";
|
|
11584
|
+
Day[Day["FRI"] = 5] = "FRI";
|
|
11585
|
+
Day[Day["SAT"] = 6] = "SAT";
|
|
11586
|
+
})(Day || (Day = {}));
|
|
11587
|
+
const { NISAN: NISAN$3, IYYAR: IYYAR$1, CHESHVAN: CHESHVAN$1 } = months;
|
|
11588
|
+
/**
|
|
11589
|
+
* Yom HaShoah first observed in 1951.
|
|
11590
|
+
* When the actual date of Yom Hashoah falls on a Friday, the
|
|
11591
|
+
* state of Israel observes Yom Hashoah on the preceding
|
|
11592
|
+
* Thursday. When it falls on a Sunday, Yom Hashoah is observed
|
|
11593
|
+
* on the following Monday.
|
|
11594
|
+
* http://www.ushmm.org/remembrance/dor/calendar/
|
|
11595
|
+
*/
|
|
11596
|
+
function dateYomHaShoah(year) {
|
|
11597
|
+
if (year < 5711) {
|
|
11598
|
+
return null;
|
|
11599
|
+
}
|
|
11600
|
+
let nisan27dt = new HDate(27, NISAN$3, year);
|
|
11601
|
+
if (nisan27dt.getDay() === Day.FRI) {
|
|
11602
|
+
nisan27dt = new HDate(26, NISAN$3, year);
|
|
11603
|
+
}
|
|
11604
|
+
else if (nisan27dt.getDay() === Day.SUN) {
|
|
11605
|
+
nisan27dt = new HDate(28, NISAN$3, year);
|
|
11606
|
+
}
|
|
11607
|
+
return nisan27dt;
|
|
11608
|
+
}
|
|
11609
|
+
/**
|
|
11610
|
+
* Yom HaAtzma'ut only celebrated after 1948
|
|
11611
|
+
* @internal
|
|
11612
|
+
*/
|
|
11613
|
+
function dateYomHaZikaron(year) {
|
|
11614
|
+
if (year < 5708) {
|
|
11615
|
+
return null;
|
|
11616
|
+
}
|
|
11617
|
+
let day;
|
|
11618
|
+
const pesach = new HDate(15, NISAN$3, year);
|
|
11619
|
+
const pdow = pesach.getDay();
|
|
11620
|
+
if (pdow === Day.SUN) {
|
|
11621
|
+
day = 2;
|
|
11622
|
+
}
|
|
11623
|
+
else if (pdow === Day.SAT) {
|
|
11624
|
+
day = 3;
|
|
11625
|
+
}
|
|
11626
|
+
else if (year < 5764) {
|
|
11627
|
+
day = 4;
|
|
11628
|
+
}
|
|
11629
|
+
else if (pdow === Day.TUE) {
|
|
11630
|
+
day = 5;
|
|
11631
|
+
}
|
|
11632
|
+
else {
|
|
11633
|
+
day = 4;
|
|
11634
|
+
}
|
|
11635
|
+
return new HDate(day, IYYAR$1, year);
|
|
11636
|
+
}
|
|
11637
|
+
function postpone(hd, rule) {
|
|
11638
|
+
const dow = hd.getDay();
|
|
11639
|
+
switch (rule) {
|
|
11640
|
+
case 'friSatToThu':
|
|
11641
|
+
return dow === Day.FRI || dow === Day.SAT ? hd.onOrBefore(Day.THU) : hd;
|
|
11642
|
+
case 'friSatToSun':
|
|
11643
|
+
if (dow === Day.FRI)
|
|
11644
|
+
return hd.next().next();
|
|
11645
|
+
return dow === Day.SAT ? hd.next() : hd;
|
|
11646
|
+
case 'satToSun':
|
|
11647
|
+
return dow === Day.SAT ? hd.next() : hd;
|
|
11648
|
+
case undefined:
|
|
11649
|
+
return hd;
|
|
11650
|
+
default:
|
|
11651
|
+
return rule;
|
|
11652
|
+
}
|
|
11653
|
+
}
|
|
11654
|
+
const staticModernHolidays = [
|
|
12224
11655
|
{
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
|
|
11656
|
+
firstYear: 5727,
|
|
11657
|
+
mm: IYYAR$1,
|
|
11658
|
+
dd: 28,
|
|
11659
|
+
desc: holidayDesc.YOM_YERUSHALAYIM,
|
|
11660
|
+
chul: true,
|
|
12230
11661
|
},
|
|
12231
|
-
];
|
|
12232
|
-
const staticModernHolidays = [
|
|
12233
|
-
{ firstYear: 5727, mm: Iyyar, dd: 28, desc: YOM_YERUSHALAYIM, chul: true },
|
|
12234
11662
|
{
|
|
12235
11663
|
firstYear: 5737,
|
|
12236
|
-
mm:
|
|
11664
|
+
mm: months.KISLEV,
|
|
12237
11665
|
dd: 6,
|
|
12238
|
-
desc: BEN_GURION_DAY,
|
|
12239
|
-
|
|
12240
|
-
friPostponeToSun: true,
|
|
11666
|
+
desc: holidayDesc.BEN_GURION_DAY,
|
|
11667
|
+
postpone: 'friSatToSun',
|
|
12241
11668
|
},
|
|
12242
|
-
{ firstYear: 5750, mm:
|
|
11669
|
+
{ firstYear: 5750, mm: months.SHVAT, dd: 30, desc: holidayDesc.FAMILY_DAY },
|
|
12243
11670
|
{
|
|
12244
11671
|
firstYear: 5758,
|
|
12245
|
-
mm:
|
|
11672
|
+
mm: CHESHVAN$1,
|
|
12246
11673
|
dd: 12,
|
|
12247
|
-
desc: YITZHAK_RABIN_MEMORIAL_DAY,
|
|
12248
|
-
|
|
11674
|
+
desc: holidayDesc.YITZHAK_RABIN_MEMORIAL_DAY,
|
|
11675
|
+
postpone: 'friSatToThu',
|
|
11676
|
+
},
|
|
11677
|
+
{
|
|
11678
|
+
firstYear: 5764,
|
|
11679
|
+
mm: IYYAR$1,
|
|
11680
|
+
dd: 10,
|
|
11681
|
+
desc: holidayDesc.HERZL_DAY,
|
|
11682
|
+
postpone: 'satToSun',
|
|
12249
11683
|
},
|
|
12250
|
-
{ firstYear: 5764, mm: Iyyar, dd: 10, desc: HERZL_DAY, satPostponeToSun: true },
|
|
12251
11684
|
{
|
|
12252
11685
|
firstYear: 5765,
|
|
12253
|
-
mm:
|
|
11686
|
+
mm: months.TAMUZ,
|
|
12254
11687
|
dd: 29,
|
|
12255
|
-
desc: JABOTINSKY_DAY,
|
|
12256
|
-
|
|
11688
|
+
desc: holidayDesc.JABOTINSKY_DAY,
|
|
11689
|
+
postpone: 'satToSun',
|
|
12257
11690
|
},
|
|
12258
11691
|
{
|
|
12259
11692
|
firstYear: 5769,
|
|
12260
|
-
mm:
|
|
11693
|
+
mm: CHESHVAN$1,
|
|
12261
11694
|
dd: 29,
|
|
12262
|
-
desc: SIGD,
|
|
11695
|
+
desc: holidayDesc.SIGD,
|
|
12263
11696
|
chul: true,
|
|
12264
11697
|
suppressEmoji: true,
|
|
12265
|
-
|
|
11698
|
+
postpone: 'friSatToThu',
|
|
11699
|
+
},
|
|
11700
|
+
{ firstYear: 5777, mm: NISAN$3, dd: 10, desc: holidayDesc.YOM_HAALIYAH, chul: true },
|
|
11701
|
+
{
|
|
11702
|
+
firstYear: 5777,
|
|
11703
|
+
mm: CHESHVAN$1,
|
|
11704
|
+
dd: 7,
|
|
11705
|
+
desc: holidayDesc.YOM_HAALIYAH_SCHOOL_OBSERVANCE,
|
|
12266
11706
|
},
|
|
12267
|
-
{ firstYear: 5777, mm: Nisan, dd: 10, desc: YOM_HAALIYAH, chul: true },
|
|
12268
|
-
{ firstYear: 5777, mm: Cheshvan, dd: 7, desc: YOM_HAALIYAH_SCHOOL_OBSERVANCE },
|
|
12269
11707
|
// https://www.gov.il/he/departments/policies/2012_des5234
|
|
12270
11708
|
{
|
|
12271
11709
|
firstYear: 5773,
|
|
12272
11710
|
mm: months.TEVET,
|
|
12273
11711
|
dd: 21,
|
|
12274
|
-
desc: HEBREW_LANGUAGE_DAY,
|
|
12275
|
-
|
|
11712
|
+
desc: holidayDesc.HEBREW_LANGUAGE_DAY,
|
|
11713
|
+
postpone: 'friSatToThu',
|
|
11714
|
+
},
|
|
11715
|
+
/**
|
|
11716
|
+
* https://fs.knesset.gov.il/25/law/25_lsr_14184773.pdf
|
|
11717
|
+
* (Published in Sefer HaChukim No. 3567 on 8 Av 5786 / July 22, 2026)
|
|
11718
|
+
*/
|
|
11719
|
+
{
|
|
11720
|
+
firstYear: 5786,
|
|
11721
|
+
mm: months.TISHREI,
|
|
11722
|
+
dd: 24,
|
|
11723
|
+
desc: holidayDesc.SWORDS_OF_IRON_WAR_MEMORIAL,
|
|
11724
|
+
chul: true,
|
|
11725
|
+
postpone: 'satToSun',
|
|
12276
11726
|
},
|
|
12277
11727
|
];
|
|
11728
|
+
const { MODERN_HOLIDAY: MODERN_HOLIDAY$1, IL_ONLY: IL_ONLY$1 } = flags;
|
|
11729
|
+
const ISRAEL_FLAG = '🇮🇱';
|
|
11730
|
+
const emojiIsraelFlag = { emoji: ISRAEL_FLAG };
|
|
11731
|
+
/**
|
|
11732
|
+
* Generates the modern Israeli holidays and memorial days for a Hebrew year.
|
|
11733
|
+
* @internal
|
|
11734
|
+
* @param year Hebrew year
|
|
11735
|
+
*/
|
|
11736
|
+
function modernHolidaysForYear(year) {
|
|
11737
|
+
const events = [];
|
|
11738
|
+
const nisan27dt = dateYomHaShoah(year);
|
|
11739
|
+
if (nisan27dt) {
|
|
11740
|
+
events.push(new HolidayEvent(nisan27dt, holidayDesc.YOM_HASHOAH, MODERN_HOLIDAY$1));
|
|
11741
|
+
}
|
|
11742
|
+
const yomHaZikaronDt = dateYomHaZikaron(year);
|
|
11743
|
+
if (yomHaZikaronDt) {
|
|
11744
|
+
events.push(new HolidayEvent(yomHaZikaronDt, holidayDesc.YOM_HAZIKARON, MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(yomHaZikaronDt.next(), holidayDesc.YOM_HAATZMA_UT, MODERN_HOLIDAY$1, emojiIsraelFlag));
|
|
11745
|
+
}
|
|
11746
|
+
for (const h of staticModernHolidays) {
|
|
11747
|
+
if (year >= h.firstYear) {
|
|
11748
|
+
const hd = postpone(new HDate(h.dd, h.mm, year), h.postpone);
|
|
11749
|
+
const mask = h.chul ? MODERN_HOLIDAY$1 : MODERN_HOLIDAY$1 | IL_ONLY$1;
|
|
11750
|
+
const ev = new HolidayEvent(hd, h.desc, mask);
|
|
11751
|
+
if (!h.suppressEmoji) {
|
|
11752
|
+
ev.emoji = ISRAEL_FLAG;
|
|
11753
|
+
}
|
|
11754
|
+
events.push(ev);
|
|
11755
|
+
}
|
|
11756
|
+
}
|
|
11757
|
+
return events;
|
|
11758
|
+
}
|
|
12278
11759
|
|
|
11760
|
+
/*
|
|
11761
|
+
Hebcal - A Jewish Calendar Generator
|
|
11762
|
+
Copyright (c) 1994-2020 Danny Sadinoff
|
|
11763
|
+
Portions copyright Eyal Schachter and Michael J. Radwin
|
|
11764
|
+
|
|
11765
|
+
https://github.com/hebcal/hebcal-es6
|
|
11766
|
+
|
|
11767
|
+
This program is free software; you can redistribute it and/or
|
|
11768
|
+
modify it under the terms of the GNU General Public License
|
|
11769
|
+
as published by the Free Software Foundation; either version 2
|
|
11770
|
+
of the License, or (at your option) any later version.
|
|
11771
|
+
|
|
11772
|
+
This program is distributed in the hope that it will be useful,
|
|
11773
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11774
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11775
|
+
GNU General Public License for more details.
|
|
11776
|
+
|
|
11777
|
+
You should have received a copy of the GNU General Public License
|
|
11778
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
11779
|
+
*/
|
|
11780
|
+
/*
|
|
11781
|
+
* Many of the following algorithms were taken from hebrew calendar
|
|
11782
|
+
* routines by Maimonedes, from his Mishneh Torah, and implemented by
|
|
11783
|
+
* Nachum Dershowitz Department of Computer Science
|
|
11784
|
+
* (217) 333-4219 University of Illinois at Urbana-Champaign
|
|
11785
|
+
* nachum@cs.uiuedu 1304 West Springfield Avenue
|
|
11786
|
+
* Urbana, Illinois 61801
|
|
11787
|
+
*
|
|
11788
|
+
* The routines were included in the emacs 19 distribution.
|
|
11789
|
+
*
|
|
11790
|
+
*/
|
|
11791
|
+
const INCOMPLETE = 0;
|
|
11792
|
+
const REGULAR = 1;
|
|
11793
|
+
const COMPLETE = 2;
|
|
11794
|
+
function yearType(hyear) {
|
|
11795
|
+
const longC = HDate.longCheshvan(hyear);
|
|
11796
|
+
const shortK = HDate.shortKislev(hyear);
|
|
11797
|
+
if (longC && !shortK) {
|
|
11798
|
+
return COMPLETE;
|
|
11799
|
+
}
|
|
11800
|
+
if (!longC && shortK) {
|
|
11801
|
+
return INCOMPLETE;
|
|
11802
|
+
}
|
|
11803
|
+
return REGULAR;
|
|
11804
|
+
}
|
|
12279
11805
|
/**
|
|
12280
|
-
* Represents
|
|
11806
|
+
* Represents the weekly Torah-reading (Parashat HaShavua) schedule for an
|
|
11807
|
+
* entire Hebrew year.
|
|
12281
11808
|
*
|
|
12282
|
-
*
|
|
12283
|
-
*
|
|
12284
|
-
*
|
|
12285
|
-
*
|
|
11809
|
+
* The schedule depends on the year's *keviyah* — the day of week of Rosh
|
|
11810
|
+
* Hashana, whether the year is leap, whether Cheshvan/Kislev are long or
|
|
11811
|
+
* short, and whether the schedule is for Israel or the Diaspora (since
|
|
11812
|
+
* Israel and the Diaspora diverge in some years when the 8th day of Pesach
|
|
11813
|
+
* or the 2nd day of Shavuot fall on Shabbat).
|
|
12286
11814
|
*
|
|
12287
|
-
*
|
|
11815
|
+
* Prefer {@link getSedra} over
|
|
11816
|
+
* calling this constructor directly, since both cache their results.
|
|
12288
11817
|
*
|
|
12289
|
-
*
|
|
12290
|
-
*
|
|
12291
|
-
*
|
|
12292
|
-
*
|
|
12293
|
-
*
|
|
11818
|
+
* @example
|
|
11819
|
+
* import {Sedra, HDate, months} from '@hebcal/core';
|
|
11820
|
+
* const sedra = new Sedra(5784, false);
|
|
11821
|
+
* const result = sedra.lookup(new HDate(15, months.CHESHVAN, 5784));
|
|
11822
|
+
* console.log(result.parsha); // ['Vayera']
|
|
12294
11823
|
*/
|
|
12295
|
-
class
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
11824
|
+
class Sedra {
|
|
11825
|
+
/**
|
|
11826
|
+
* Calculates the Parashat HaShavua schedule for an entire Hebrew year.
|
|
11827
|
+
* @param hyear - Hebrew year (e.g. 5749)
|
|
11828
|
+
* @param il - Use Israel sedra schedule (false for Diaspora)
|
|
11829
|
+
*/
|
|
11830
|
+
constructor(hyear, il) {
|
|
11831
|
+
hyear = +hyear;
|
|
11832
|
+
this.year = hyear;
|
|
11833
|
+
const rh0 = new HDate(1, months.TISHREI, hyear);
|
|
11834
|
+
const rh = (this.rh = rh0.abs());
|
|
11835
|
+
const rhDay = rh0.getDay() + 1;
|
|
11836
|
+
// find the first Saturday on or after Rosh Hashana
|
|
11837
|
+
this.firstSaturday = HDate.dayOnOrBefore(6, rh + 6);
|
|
11838
|
+
const leap = +HDate.isLeapYear(hyear);
|
|
11839
|
+
this.il = Boolean(il);
|
|
11840
|
+
const type = yearType(hyear);
|
|
11841
|
+
let key = `${leap}${rhDay}${type}`;
|
|
11842
|
+
if (types[key]) {
|
|
11843
|
+
this.theSedraArray = types[key];
|
|
11844
|
+
this.yearKey = key;
|
|
11845
|
+
}
|
|
11846
|
+
else {
|
|
11847
|
+
key = key + +this.il; // cast to num, then concat
|
|
11848
|
+
this.theSedraArray = types[key];
|
|
11849
|
+
this.yearKey = key;
|
|
11850
|
+
}
|
|
11851
|
+
if (!this.theSedraArray) {
|
|
11852
|
+
throw new Error(`improper sedra year type ${key} calculated for ${hyear}`);
|
|
11853
|
+
}
|
|
11854
|
+
}
|
|
11855
|
+
/**
|
|
11856
|
+
* Returns the date a parsha is read this year, or `null` if it does not
|
|
11857
|
+
* occur in this year's schedule.
|
|
11858
|
+
*
|
|
11859
|
+
* A doubled parsha (e.g. `'Matot-Masei'`) will only return a date in years
|
|
11860
|
+
* where that pair is actually read together; in years where they are read
|
|
11861
|
+
* separately, this returns `null`. Use {@link findContaining} to find the
|
|
11862
|
+
* date a parsha is read regardless of whether it is doubled.
|
|
11863
|
+
*
|
|
11864
|
+
* Throws `RangeError` for an out-of-range numeric input or an invalid
|
|
11865
|
+
* doubled-parsha pair, and `TypeError` for a malformed array argument.
|
|
11866
|
+
* @example
|
|
11867
|
+
* import {Sedra} from '@hebcal/core';
|
|
11868
|
+
* const sedra = new Sedra(5784, false);
|
|
11869
|
+
* sedra.find('Noach')?.toString(); // '6 Cheshvan 5784'
|
|
11870
|
+
* sedra.find(1)?.toString(); // '6 Cheshvan 5784', by 0-based index
|
|
11871
|
+
* // Matot and Masei are doubled in 5784, so the pair has a date...
|
|
11872
|
+
* sedra.find('Matot-Masei')?.toString(); // '28 Tamuz 5784'
|
|
11873
|
+
* sedra.find(['Matot', 'Masei'])?.toString(); // '28 Tamuz 5784'
|
|
11874
|
+
* // ...but neither half is read on its own that year:
|
|
11875
|
+
* sedra.find('Matot'); // null
|
|
11876
|
+
* @param parsha if a `string`, specified with Sephardic transliterations
|
|
11877
|
+
* like `'Noach'` or `'Matot-Masei'`. If an array, must be a 1- or 2-element
|
|
11878
|
+
* array such as `['Noach']` or `['Matot', 'Masei']`. If a `number`, should
|
|
11879
|
+
* be a 0-based parsha index (`0` for Bereshit, `1` for Noach) or a negative
|
|
11880
|
+
* number for a doubled parsha (e.g. `-21` for Vayakhel-Pekudei).
|
|
11881
|
+
* Note that this index is 0-based, unlike {@link SedraResult.num} which
|
|
11882
|
+
* is 1-based.
|
|
11883
|
+
*/
|
|
11884
|
+
find(parsha) {
|
|
11885
|
+
if (typeof parsha === 'number') {
|
|
11886
|
+
if (parsha >= parshiot.length || (parsha < 0 && !isValidDouble(parsha))) {
|
|
11887
|
+
throw new RangeError(`Invalid parsha number: ${parsha}`);
|
|
11888
|
+
}
|
|
11889
|
+
return this.findInternal(parsha);
|
|
11890
|
+
}
|
|
11891
|
+
if (typeof parsha === 'string') {
|
|
11892
|
+
const num = parsha2id.get(parsha);
|
|
11893
|
+
if (typeof num === 'number') {
|
|
11894
|
+
return this.find(num);
|
|
11895
|
+
}
|
|
11896
|
+
if (parsha.includes('-')) {
|
|
11897
|
+
if (parsha === CHMPESACH || parsha === CHMSUKOT) {
|
|
11898
|
+
return this.findInternal(parsha);
|
|
11899
|
+
}
|
|
11900
|
+
return this.find(parsha.split('-'));
|
|
11901
|
+
}
|
|
11902
|
+
// try to find Saturday holiday like 'Yom Kippur'
|
|
11903
|
+
return this.findInternal(parsha);
|
|
11904
|
+
}
|
|
11905
|
+
if (Array.isArray(parsha)) {
|
|
11906
|
+
const plen = parsha.length;
|
|
11907
|
+
if ((plen !== 1 && plen !== 2) || typeof parsha[0] !== 'string') {
|
|
11908
|
+
throw new TypeError(`Invalid parsha argument: ${JSON.stringify(parsha)}`);
|
|
11909
|
+
}
|
|
11910
|
+
if (plen === 1) {
|
|
11911
|
+
return this.find(parsha[0]);
|
|
11912
|
+
}
|
|
11913
|
+
const p1 = parsha[0];
|
|
11914
|
+
const p2 = parsha[1];
|
|
11915
|
+
const num1 = parsha2id.get(p1);
|
|
11916
|
+
const num2 = parsha2id.get(p2);
|
|
11917
|
+
if (typeof num1 !== 'number' ||
|
|
11918
|
+
typeof num2 !== 'number' ||
|
|
11919
|
+
num2 !== num1 + 1 ||
|
|
11920
|
+
!isValidDouble(-num1)) {
|
|
11921
|
+
throw new RangeError(`Unrecognized parsha name: ${p1}-${p2}`);
|
|
11922
|
+
}
|
|
11923
|
+
return this.find(-num1);
|
|
11924
|
+
}
|
|
11925
|
+
return null; /* NOTREACHED */
|
|
11926
|
+
}
|
|
11927
|
+
findInternal(parsha) {
|
|
11928
|
+
const idx = this.theSedraArray.indexOf(parsha);
|
|
11929
|
+
if (idx === -1) {
|
|
11930
|
+
return null; // doesn't occur this year
|
|
12300
11931
|
}
|
|
11932
|
+
return new HDate(this.firstSaturday + idx * 7);
|
|
12301
11933
|
}
|
|
12302
11934
|
/**
|
|
12303
|
-
* Returns a
|
|
12304
|
-
*
|
|
11935
|
+
* Returns the date a parsha is read this year, looking through both
|
|
11936
|
+
* single and doubled forms.
|
|
12305
11937
|
*
|
|
12306
|
-
*
|
|
12307
|
-
*
|
|
12308
|
-
*
|
|
11938
|
+
* For example, if `'Matot'` is read individually this year, this returns
|
|
11939
|
+
* its date; if it is read as part of `'Matot-Masei'` this year, this
|
|
11940
|
+
* returns the date of `'Matot-Masei'` (and similarly for `'Masei'`).
|
|
11941
|
+
* Conversely, asking for `'Matot-Masei'` in a year where they are split
|
|
11942
|
+
* will return the date of `'Matot'` alone.
|
|
12309
11943
|
* @example
|
|
12310
|
-
*
|
|
12311
|
-
* //
|
|
12312
|
-
* //
|
|
12313
|
-
*
|
|
11944
|
+
* import {Sedra} from '@hebcal/core';
|
|
11945
|
+
* // Matot and Masei are doubled in 5784, so each half resolves to the
|
|
11946
|
+
* // date of the combined reading:
|
|
11947
|
+
* const sedra = new Sedra(5784, false);
|
|
11948
|
+
* sedra.findContaining('Matot')?.toString(); // '28 Tamuz 5784'
|
|
11949
|
+
* sedra.findContaining('Masei')?.toString(); // '28 Tamuz 5784'
|
|
11950
|
+
* @example
|
|
11951
|
+
* import {Sedra} from '@hebcal/core';
|
|
11952
|
+
* // They are read separately in 5795, so each half has its own date, and
|
|
11953
|
+
* // asking for the doubled name returns the date of the first half:
|
|
11954
|
+
* const sedra = new Sedra(5795, false);
|
|
11955
|
+
* sedra.findContaining('Matot')?.toString(); // '21 Tamuz 5795'
|
|
11956
|
+
* sedra.findContaining('Masei')?.toString(); // '28 Tamuz 5795'
|
|
11957
|
+
* sedra.findContaining('Matot-Masei')?.toString(); // '21 Tamuz 5795'
|
|
12314
11958
|
*/
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
|
|
11959
|
+
findContaining(parsha) {
|
|
11960
|
+
const hdate = this.find(parsha);
|
|
11961
|
+
if (hdate) {
|
|
11962
|
+
return hdate;
|
|
11963
|
+
}
|
|
11964
|
+
if (typeof parsha === 'number') {
|
|
11965
|
+
// a valid negative number (double parsha in a year where they are
|
|
11966
|
+
// combined) would've been found above, and a invalid negative number
|
|
11967
|
+
// would've thrown an error, so this parsha must be a positive number
|
|
11968
|
+
// representing either p1 or p2
|
|
11969
|
+
const p1 = -parsha;
|
|
11970
|
+
if (isValidDouble(p1)) {
|
|
11971
|
+
return this.find(p1);
|
|
11972
|
+
}
|
|
11973
|
+
else {
|
|
11974
|
+
// this must be the second individual parsha of a doubled pair
|
|
11975
|
+
// for example 29 for Kedoshim, so check for -28 for Achrei Mot-Kedoshim
|
|
11976
|
+
return this.find(p1 + 1);
|
|
11977
|
+
}
|
|
11978
|
+
}
|
|
11979
|
+
else {
|
|
11980
|
+
const num = parsha2id.get(parsha);
|
|
11981
|
+
if (num) {
|
|
11982
|
+
// parsha is either the first or second individual parsha of
|
|
11983
|
+
// a pair that is doubled this year
|
|
11984
|
+
const p1 = -num;
|
|
11985
|
+
if (isValidDouble(p1)) {
|
|
11986
|
+
return this.find(p1);
|
|
11987
|
+
}
|
|
11988
|
+
else {
|
|
11989
|
+
return this.find(p1 + 1);
|
|
11990
|
+
}
|
|
11991
|
+
}
|
|
11992
|
+
else {
|
|
11993
|
+
// this was indeed a doubled parsha, so return date of the first half
|
|
11994
|
+
const [p1] = parsha.split('-');
|
|
11995
|
+
return this.find(p1);
|
|
11996
|
+
}
|
|
11997
|
+
}
|
|
12325
11998
|
}
|
|
12326
11999
|
/**
|
|
12327
|
-
* Returns
|
|
12328
|
-
*
|
|
12329
|
-
*
|
|
12000
|
+
* Returns the underlying annual reading schedule as an array, where each
|
|
12001
|
+
* entry corresponds to one Saturday (starting from the first Shabbat on
|
|
12002
|
+
* or after Rosh Hashana). Entries are either:
|
|
12003
|
+
* - a non-negative `number`: a 0-based parsha index (e.g. `0` for
|
|
12004
|
+
* *Bereshit*)
|
|
12005
|
+
* - a negative `number`: the negated first index of a doubled parsha
|
|
12006
|
+
* (e.g. `-21` for *Vayakhel-Pekudei*)
|
|
12007
|
+
* - a `string`: a holiday name when a Yom Tov displaces the weekly reading
|
|
12008
|
+
* (e.g. `'Pesach Shabbat Chol ha-Moed'`, `'Yom Kippur'`)
|
|
12009
|
+
*
|
|
12010
|
+
* Used by `@hebcal/triennial`.
|
|
12330
12011
|
*/
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
if (year < 100 || year > 2999) {
|
|
12334
|
-
return undefined;
|
|
12335
|
-
}
|
|
12336
|
-
const url = 'https://www.hebcal.com/holidays/' +
|
|
12337
|
-
urlFriendly(this.basename()) +
|
|
12338
|
-
'-' +
|
|
12339
|
-
this.urlDateSuffix();
|
|
12340
|
-
return this.hasFlag('IL_ONLY') ? url + '?i=on' : url;
|
|
12012
|
+
getSedraArray() {
|
|
12013
|
+
return this.theSedraArray;
|
|
12341
12014
|
}
|
|
12342
12015
|
/**
|
|
12343
|
-
*
|
|
12344
|
-
*
|
|
12016
|
+
* Returns the R.D. (Rata Die / Fixed Date) absolute day number of the
|
|
12017
|
+
* first Saturday on or after Rosh Hashana of this year. This is the
|
|
12018
|
+
* anchor point for {@link getSedraArray} — index `0` of that array
|
|
12019
|
+
* corresponds to this date.
|
|
12345
12020
|
*/
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
return String(year);
|
|
12021
|
+
getFirstSaturday() {
|
|
12022
|
+
return this.firstSaturday;
|
|
12349
12023
|
}
|
|
12350
|
-
|
|
12351
|
-
|
|
12352
|
-
|
|
12024
|
+
/** Returns the Hebrew year this `Sedra` instance covers. */
|
|
12025
|
+
getYear() {
|
|
12026
|
+
return this.year;
|
|
12027
|
+
}
|
|
12028
|
+
/**
|
|
12029
|
+
* Returns details about the parsha read on the first Saturday on or after
|
|
12030
|
+
* `hd`. If `hd` is itself a Saturday, the reading for that date is
|
|
12031
|
+
* returned; otherwise the reading for the upcoming Saturday is returned.
|
|
12032
|
+
*
|
|
12033
|
+
* If the given date falls in the final days of the Hebrew year (after
|
|
12034
|
+
* the last reading of this year's schedule), this method transparently
|
|
12035
|
+
* delegates to the next year's `Sedra`.
|
|
12036
|
+
* @example
|
|
12037
|
+
* import {Sedra, HDate, months} from '@hebcal/core';
|
|
12038
|
+
* const sedra = new Sedra(5784, false);
|
|
12039
|
+
* // A Friday — returns the upcoming Shabbat's reading
|
|
12040
|
+
* const result = sedra.lookup(new HDate(12, months.CHESHVAN, 5784));
|
|
12041
|
+
* console.log(result.parsha); // ['Lech-Lecha']
|
|
12042
|
+
* console.log(result.chag); // false
|
|
12043
|
+
* console.log(result.hdate.toString()); // '13 Cheshvan 5784' (Saturday)
|
|
12044
|
+
* @param hd Hebrew date or R.D. days
|
|
12045
|
+
*/
|
|
12046
|
+
lookup(hd) {
|
|
12047
|
+
const abs = toAbsInYear(hd, this.rh, this.year);
|
|
12048
|
+
// find the first saturday on or after today's date
|
|
12049
|
+
const saturday = HDate.dayOnOrBefore(6, abs + 6);
|
|
12050
|
+
const weekNum = (saturday - this.firstSaturday) / 7;
|
|
12051
|
+
const index = this.theSedraArray[weekNum];
|
|
12052
|
+
if (index === undefined) {
|
|
12053
|
+
const sedra = getSedra(this.year + 1, this.il);
|
|
12054
|
+
return sedra.lookup(saturday); // must be next year
|
|
12353
12055
|
}
|
|
12354
|
-
|
|
12355
|
-
|
|
12056
|
+
const hdate = new HDate(saturday);
|
|
12057
|
+
if (typeof index === 'string') {
|
|
12058
|
+
// Shabbat has a chag. Return a description
|
|
12059
|
+
return { parsha: [index], chag: true, hdate, il: this.il, num: 0 };
|
|
12060
|
+
}
|
|
12061
|
+
if (index >= 0) {
|
|
12062
|
+
return {
|
|
12063
|
+
parsha: [parshiot[index]],
|
|
12064
|
+
chag: false,
|
|
12065
|
+
num: index + 1,
|
|
12066
|
+
hdate,
|
|
12067
|
+
il: this.il,
|
|
12068
|
+
};
|
|
12069
|
+
}
|
|
12070
|
+
const p1 = D(index); // undouble the parsha
|
|
12071
|
+
return {
|
|
12072
|
+
parsha: [parshiot[p1], parshiot[p1 + 1]],
|
|
12073
|
+
chag: false,
|
|
12074
|
+
num: [p1 + 1, p1 + 2],
|
|
12075
|
+
hdate,
|
|
12076
|
+
il: this.il,
|
|
12077
|
+
};
|
|
12078
|
+
}
|
|
12079
|
+
/**
|
|
12080
|
+
* Returns details about the parsha read on Monday or Thursday for `hd`, or
|
|
12081
|
+
* `undefined` if `hd` is not a Monday or Thursday.
|
|
12082
|
+
*
|
|
12083
|
+
* Weekday Torah readings generally begin the upcoming Shabbat parsha. When
|
|
12084
|
+
* the upcoming Shabbat is a holiday, this method returns the next regular
|
|
12085
|
+
* parsha instead.
|
|
12086
|
+
*
|
|
12087
|
+
* For the Tishrei weekdays before Sukkot or Simchat Torah, the weekday
|
|
12088
|
+
* reading is *Vezot Haberakhah* even though it is not read on Shabbat.
|
|
12089
|
+
* @example
|
|
12090
|
+
* import {Sedra, HDate, months} from '@hebcal/core';
|
|
12091
|
+
* const sedra = new Sedra(5784, false);
|
|
12092
|
+
* // Monday 8 Cheshvan — begins the upcoming Shabbat's parsha
|
|
12093
|
+
* sedra.lookupWeekday(new HDate(8, months.CHESHVAN, 5784))?.parsha; // ['Lech-Lecha']
|
|
12094
|
+
* // Tuesday is neither Monday nor Thursday
|
|
12095
|
+
* sedra.lookupWeekday(new HDate(9, months.CHESHVAN, 5784)); // undefined
|
|
12096
|
+
* // Thursday 17 Nisan — the upcoming Shabbat is Chol ha-Moed Pesach,
|
|
12097
|
+
* // so the next regular parsha is returned instead
|
|
12098
|
+
* sedra.lookupWeekday(new HDate(17, months.NISAN, 5784))?.parsha; // ['Achrei Mot']
|
|
12099
|
+
* @param hd Hebrew date or R.D. days
|
|
12100
|
+
*/
|
|
12101
|
+
lookupWeekday(hd) {
|
|
12102
|
+
const abs = toAbsInYear(hd, this.rh, this.year);
|
|
12103
|
+
const hdate = new HDate(abs);
|
|
12104
|
+
const day = hdate.getDay();
|
|
12105
|
+
if (day !== 1 && day !== 4) {
|
|
12106
|
+
return undefined;
|
|
12107
|
+
}
|
|
12108
|
+
const saturday = new HDate(HDate.dayOnOrBefore(6, abs + 6));
|
|
12109
|
+
const parsha = this.lookup(saturday);
|
|
12110
|
+
if (!parsha.chag) {
|
|
12111
|
+
return parsha;
|
|
12356
12112
|
}
|
|
12357
|
-
return
|
|
12113
|
+
return this.findWeekdayParsha(saturday);
|
|
12358
12114
|
}
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12115
|
+
findWeekdayParsha(saturday) {
|
|
12116
|
+
const hyear = saturday.getFullYear();
|
|
12117
|
+
const il = this.il;
|
|
12118
|
+
if (saturday.getMonth() === months.TISHREI) {
|
|
12119
|
+
const dd = saturday.getDate();
|
|
12120
|
+
const simchatTorah = il ? 22 : 23;
|
|
12121
|
+
if (dd > 2 && dd <= simchatTorah) {
|
|
12122
|
+
return {
|
|
12123
|
+
parsha: ['Vezot Haberakhah'],
|
|
12124
|
+
chag: false,
|
|
12125
|
+
num: 54,
|
|
12126
|
+
hdate: saturday,
|
|
12127
|
+
il,
|
|
12128
|
+
};
|
|
12129
|
+
}
|
|
12366
12130
|
}
|
|
12367
|
-
|
|
12368
|
-
const
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
case holidayDesc.TU_BAV:
|
|
12377
|
-
case holidayDesc.TU_BISHVAT:
|
|
12378
|
-
case holidayDesc.ROSH_HASHANA_LABEHEMOT:
|
|
12379
|
-
return ['holiday', 'minor'];
|
|
12131
|
+
const sedra = hyear === this.year ? this : getSedra(hyear, il);
|
|
12132
|
+
const endOfYear = new HDate(1, months.TISHREI, hyear + 1).abs() - 1;
|
|
12133
|
+
const endAbs = endOfYear + 30;
|
|
12134
|
+
for (let sat2 = saturday.abs() + 7; sat2 <= endAbs; sat2 += 7) {
|
|
12135
|
+
const sedra2 = sat2 > endOfYear ? getSedra(hyear + 1, il) : sedra;
|
|
12136
|
+
const parsha2 = sedra2.lookup(sat2);
|
|
12137
|
+
if (!parsha2.chag) {
|
|
12138
|
+
return parsha2;
|
|
12139
|
+
}
|
|
12380
12140
|
}
|
|
12381
|
-
|
|
12141
|
+
/* NOTREACHED */
|
|
12142
|
+
throw new Error(`can't find weekday parsha for ${saturday}/${il}`);
|
|
12382
12143
|
}
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
|
|
12144
|
+
}
|
|
12145
|
+
/**
|
|
12146
|
+
* The 54 parshiyot of the Torah as transilterated strings.
|
|
12147
|
+
* * parshiot[0] == `Bereshit`
|
|
12148
|
+
* * parshiot[1] == `Noach`
|
|
12149
|
+
* * parshiot[52] == `Ha'azinu`
|
|
12150
|
+
* * parshiot[53] == `Vezot Haberakhah`
|
|
12151
|
+
*/
|
|
12152
|
+
const parshiot = [
|
|
12153
|
+
'Bereshit',
|
|
12154
|
+
'Noach',
|
|
12155
|
+
'Lech-Lecha',
|
|
12156
|
+
'Vayera',
|
|
12157
|
+
'Chayei Sara',
|
|
12158
|
+
'Toldot',
|
|
12159
|
+
'Vayetzei',
|
|
12160
|
+
'Vayishlach',
|
|
12161
|
+
'Vayeshev',
|
|
12162
|
+
'Miketz',
|
|
12163
|
+
'Vayigash',
|
|
12164
|
+
'Vayechi',
|
|
12165
|
+
'Shemot',
|
|
12166
|
+
'Vaera',
|
|
12167
|
+
'Bo',
|
|
12168
|
+
'Beshalach',
|
|
12169
|
+
'Yitro',
|
|
12170
|
+
'Mishpatim',
|
|
12171
|
+
'Terumah',
|
|
12172
|
+
'Tetzaveh',
|
|
12173
|
+
'Ki Tisa',
|
|
12174
|
+
'Vayakhel',
|
|
12175
|
+
'Pekudei',
|
|
12176
|
+
'Vayikra',
|
|
12177
|
+
'Tzav',
|
|
12178
|
+
'Shmini',
|
|
12179
|
+
'Tazria',
|
|
12180
|
+
'Metzora',
|
|
12181
|
+
'Achrei Mot',
|
|
12182
|
+
'Kedoshim',
|
|
12183
|
+
'Emor',
|
|
12184
|
+
'Behar',
|
|
12185
|
+
'Bechukotai',
|
|
12186
|
+
'Bamidbar',
|
|
12187
|
+
'Nasso',
|
|
12188
|
+
"Beha'alotcha",
|
|
12189
|
+
"Sh'lach",
|
|
12190
|
+
'Korach',
|
|
12191
|
+
'Chukat',
|
|
12192
|
+
'Balak',
|
|
12193
|
+
'Pinchas',
|
|
12194
|
+
'Matot',
|
|
12195
|
+
'Masei',
|
|
12196
|
+
'Devarim',
|
|
12197
|
+
'Vaetchanan',
|
|
12198
|
+
'Eikev',
|
|
12199
|
+
"Re'eh",
|
|
12200
|
+
'Shoftim',
|
|
12201
|
+
'Ki Teitzei',
|
|
12202
|
+
'Ki Tavo',
|
|
12203
|
+
'Nitzavim',
|
|
12204
|
+
'Vayeilech',
|
|
12205
|
+
"Ha'azinu",
|
|
12206
|
+
'Vezot Haberakhah',
|
|
12207
|
+
];
|
|
12208
|
+
/**
|
|
12209
|
+
* Converts a `Sedra.lookup*()` argument to R.D. days, validating that it is a
|
|
12210
|
+
* date on or after Rosh Hashana of `year` (whose R.D. day is `rh`)
|
|
12211
|
+
*/
|
|
12212
|
+
function toAbsInYear(hd, rh, year) {
|
|
12213
|
+
const abs = typeof hd === 'number' ? hd : HDate.isHDate(hd) ? hd.abs() : NaN;
|
|
12214
|
+
if (isNaN(abs)) {
|
|
12215
|
+
throw new TypeError(`Bad date argument: ${hd}`);
|
|
12390
12216
|
}
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
* For most events, this is the same as render(). For some events, it procudes
|
|
12394
|
-
* a shorter text (e.g. without a time or added description).
|
|
12395
|
-
* @param [locale] Optional locale name (defaults to empty locale)
|
|
12396
|
-
*/
|
|
12397
|
-
renderBrief(locale) {
|
|
12398
|
-
const str = super.renderBrief(locale);
|
|
12399
|
-
return smartApostrophe(str);
|
|
12217
|
+
if (abs < rh) {
|
|
12218
|
+
throw new RangeError(`Date ${hd} before start of Hebrew year ${year}`);
|
|
12400
12219
|
}
|
|
12220
|
+
return abs;
|
|
12401
12221
|
}
|
|
12222
|
+
// 0-based parsha IDs
|
|
12223
|
+
const parsha2id = new Map(parshiot.map((name, id) => [name, id]));
|
|
12224
|
+
// 0-based parsha IDs
|
|
12225
|
+
const doubles = new Set([
|
|
12226
|
+
21, // Vayakhel-Pekudei
|
|
12227
|
+
26, // Tazria-Metzora
|
|
12228
|
+
28, // Achrei Mot-Kedoshim
|
|
12229
|
+
31, // Behar-Bechukotai
|
|
12230
|
+
38, // Chukat-Balak
|
|
12231
|
+
41, // Matot-Masei
|
|
12232
|
+
50, // Nitzavim-Vayeilech
|
|
12233
|
+
]);
|
|
12402
12234
|
/**
|
|
12403
|
-
*
|
|
12404
|
-
* we subclass HolidayEvent to generate the correct URL.
|
|
12235
|
+
* @param id a negative number
|
|
12405
12236
|
*/
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
urlDateSuffix() {
|
|
12409
|
-
const isoDate = isoDateString(this.greg());
|
|
12410
|
-
return isoDate.replaceAll('-', '');
|
|
12411
|
-
}
|
|
12237
|
+
function isValidDouble(id) {
|
|
12238
|
+
return doubles.has(-id);
|
|
12412
12239
|
}
|
|
12413
|
-
const chanukahEmoji = '🕎';
|
|
12414
|
-
const KEYCAP_DIGITS = [
|
|
12415
|
-
'0️⃣',
|
|
12416
|
-
'1️⃣',
|
|
12417
|
-
'2️⃣',
|
|
12418
|
-
'3️⃣',
|
|
12419
|
-
'4️⃣',
|
|
12420
|
-
'5️⃣',
|
|
12421
|
-
'6️⃣',
|
|
12422
|
-
'7️⃣',
|
|
12423
|
-
'8️⃣',
|
|
12424
|
-
'9️⃣',
|
|
12425
|
-
];
|
|
12426
12240
|
/**
|
|
12427
|
-
*
|
|
12428
|
-
*
|
|
12241
|
+
* parsha doubler/undoubler
|
|
12242
|
+
* @param p
|
|
12243
|
+
*/
|
|
12244
|
+
function D(p) {
|
|
12245
|
+
return -p;
|
|
12246
|
+
}
|
|
12247
|
+
const RH = 'Rosh Hashana'; // 0
|
|
12248
|
+
const YK = 'Yom Kippur'; // 1
|
|
12249
|
+
const SUKKOT = 'Sukkot'; // 0
|
|
12250
|
+
const CHMSUKOT = 'Sukkot Shabbat Chol ha-Moed'; // 0
|
|
12251
|
+
const SHMINI = 'Shmini Atzeret'; // 0
|
|
12252
|
+
const PESACH = 'Pesach'; // 25
|
|
12253
|
+
const PESACH1 = 'Pesach I';
|
|
12254
|
+
const CHMPESACH = 'Pesach Shabbat Chol ha-Moed'; // 25
|
|
12255
|
+
const PESACH7 = 'Pesach VII'; // 25
|
|
12256
|
+
const PESACH8 = 'Pesach VIII';
|
|
12257
|
+
const SHAVUOT = 'Shavuot'; // 33
|
|
12258
|
+
/**
|
|
12259
|
+
* Returns an array from start to end
|
|
12260
|
+
* @param start beginning number, inclusive
|
|
12261
|
+
* @param stop ending number, inclusive
|
|
12262
|
+
*/
|
|
12263
|
+
function range$1(start, stop) {
|
|
12264
|
+
return Array.from({ length: stop - start + 1 }, (_, k) => k + start);
|
|
12265
|
+
}
|
|
12266
|
+
const yearStartVayeilech = [51, 52, CHMSUKOT];
|
|
12267
|
+
const yearStartHaazinu = [52, YK, CHMSUKOT];
|
|
12268
|
+
const yearStartRH = [RH, 52, SUKKOT, SHMINI];
|
|
12269
|
+
const r020 = range$1(0, 20);
|
|
12270
|
+
const r027 = range$1(0, 27);
|
|
12271
|
+
const r3340 = range$1(33, 40);
|
|
12272
|
+
const r4349 = range$1(43, 49);
|
|
12273
|
+
const r4350 = range$1(43, 50);
|
|
12274
|
+
/**
|
|
12275
|
+
* The ordinary year types (keviot)
|
|
12276
|
+
* names are leap/nonleap - day - incomplete/regular/complete - diaspora/Israel
|
|
12277
|
+
*/
|
|
12278
|
+
const types = {
|
|
12279
|
+
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
12280
|
+
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
12281
|
+
// e.g. 5753
|
|
12282
|
+
'020': yearStartVayeilech.concat(r020, D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), r3340, D(41), r4349, D(50)),
|
|
12283
|
+
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
12284
|
+
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
12285
|
+
// e.g. 5756
|
|
12286
|
+
'0220': yearStartVayeilech.concat(r020, D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), 33, SHAVUOT, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
12287
|
+
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
12288
|
+
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
12289
|
+
// e.g. 5701
|
|
12290
|
+
'0510': yearStartHaazinu.concat(r020, D(21), 23, 24, PESACH1, PESACH8, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
12291
|
+
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
12292
|
+
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
12293
|
+
// e.g. 5745
|
|
12294
|
+
'0511': yearStartHaazinu.concat(r020, D(21), 23, 24, PESACH, 25, D(26), D(28), range$1(30, 40), D(41), r4350),
|
|
12295
|
+
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
12296
|
+
* Kislev each have 30 days), and has Passover start on Sunday. */
|
|
12297
|
+
// e.g. 5754
|
|
12298
|
+
'052': yearStartHaazinu.concat(range$1(0, 24), PESACH7, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
12299
|
+
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev
|
|
12300
|
+
* each have 29 days), and has Passover start on Sunday. */
|
|
12301
|
+
// e.g. 5761
|
|
12302
|
+
'070': yearStartRH.concat(r020, D(21), 23, 24, PESACH7, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
12303
|
+
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
12304
|
+
* Kislev each have 30 days), and has Passover start on Tuesday. */
|
|
12305
|
+
// e.g. 5716
|
|
12306
|
+
'072': yearStartRH.concat(r020, D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), r3340, D(41), r4349, D(50)),
|
|
12307
|
+
/* -- The leap year types (keviot) -- */
|
|
12308
|
+
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
12309
|
+
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
12310
|
+
// e.g. 5746
|
|
12311
|
+
'1200': yearStartVayeilech.concat(r027, CHMPESACH, range$1(28, 33), SHAVUOT, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
12312
|
+
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
12313
|
+
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
12314
|
+
// e.g. 5746
|
|
12315
|
+
'1201': yearStartVayeilech.concat(r027, CHMPESACH, range$1(28, 40), D(41), r4349, D(50)),
|
|
12316
|
+
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
12317
|
+
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
12318
|
+
// e.g.5752
|
|
12319
|
+
'1220': yearStartVayeilech.concat(r027, PESACH1, PESACH8, range$1(28, 40), D(41), r4350),
|
|
12320
|
+
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
12321
|
+
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
12322
|
+
// e.g.5752
|
|
12323
|
+
'1221': yearStartVayeilech.concat(r027, PESACH, range$1(28, 50)),
|
|
12324
|
+
/* Hebrew year that starts on Thursday, is `incomplete' (Heshvan and
|
|
12325
|
+
* Kislev both have 29 days), and has Passover start on Sunday. */
|
|
12326
|
+
// e.g. 5768
|
|
12327
|
+
'150': yearStartHaazinu.concat(range$1(0, 28), PESACH7, range$1(29, 50)),
|
|
12328
|
+
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
12329
|
+
* Kislev both have 30 days), and has Passover start on Tuesday. */
|
|
12330
|
+
// eg. 5771
|
|
12331
|
+
'152': yearStartHaazinu.concat(range$1(0, 28), CHMPESACH, range$1(29, 49), D(50)),
|
|
12332
|
+
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and
|
|
12333
|
+
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
12334
|
+
// e.g.5757
|
|
12335
|
+
'170': yearStartRH.concat(r027, CHMPESACH, range$1(28, 40), D(41), r4349, D(50)),
|
|
12336
|
+
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
12337
|
+
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
12338
|
+
'1720': yearStartRH.concat(r027, CHMPESACH, range$1(28, 33), SHAVUOT, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
12339
|
+
};
|
|
12340
|
+
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
12341
|
+
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
12342
|
+
types['0221'] = types['020'];
|
|
12343
|
+
/* Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29
|
|
12344
|
+
* days and Kislev has 30 days), and has Passover start on Thursday. */
|
|
12345
|
+
// e.g. 5715
|
|
12346
|
+
types['0310'] = types['0220'];
|
|
12347
|
+
/* Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29
|
|
12348
|
+
* days and Kislev has 30 days), and has Passover start on Thursday. */
|
|
12349
|
+
types['0311'] = types['020'];
|
|
12350
|
+
/* Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29
|
|
12351
|
+
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
12352
|
+
// e.g. 5715
|
|
12353
|
+
types['1310'] = types['1220'];
|
|
12354
|
+
/* Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29
|
|
12355
|
+
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
12356
|
+
types['1311'] = types['1221'];
|
|
12357
|
+
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
12358
|
+
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
12359
|
+
types['1721'] = types['170'];
|
|
12360
|
+
const sedraCache = new QuickLRU({ maxSize: 120 });
|
|
12361
|
+
/**
|
|
12362
|
+
* Convenience function to create an instance of {@link Sedra} or reuse a
|
|
12363
|
+
* previously created and cached instance for the same year and schedule.
|
|
12364
|
+
*
|
|
12365
|
+
* Prefer this over `new Sedra(...)` when calling repeatedly — an internal
|
|
12366
|
+
* LRU cache (~120 entries) avoids recomputing the keviyah-specific schedule.
|
|
12367
|
+
* @example
|
|
12368
|
+
* import {getSedra, HDate, months} from '@hebcal/core';
|
|
12369
|
+
* const sedra = getSedra(5784, false);
|
|
12370
|
+
* const {parsha} = sedra.lookup(new HDate(15, months.CHESHVAN, 5784));
|
|
12371
|
+
* console.log(parsha); // ['Vayera']
|
|
12372
|
+
* @param hyear Hebrew year
|
|
12373
|
+
* @param il Use Israel sedra schedule (`false` for Diaspora)
|
|
12429
12374
|
*/
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
this.chanukahDay = chanukahDay;
|
|
12437
|
-
this.emoji = chanukahEmoji;
|
|
12438
|
-
if (chanukahDay !== 8) {
|
|
12439
|
-
const candles = chanukahDay ? chanukahDay + 1 : 1;
|
|
12440
|
-
this.emoji += KEYCAP_DIGITS[candles];
|
|
12441
|
-
}
|
|
12442
|
-
}
|
|
12443
|
-
urlDateSuffix() {
|
|
12444
|
-
const dt = this.greg();
|
|
12445
|
-
let year = dt.getFullYear();
|
|
12446
|
-
if (dt.getMonth() === 0) {
|
|
12447
|
-
year--;
|
|
12448
|
-
}
|
|
12449
|
-
return String(year);
|
|
12450
|
-
}
|
|
12451
|
-
}
|
|
12452
|
-
/** Represents Rosh Hashana, the Jewish New Year */
|
|
12453
|
-
class RoshHashanaEvent extends HolidayEvent {
|
|
12454
|
-
/**
|
|
12455
|
-
* Normally created by {@link calendar} rather than directly.
|
|
12456
|
-
* @param date Hebrew date event occurs
|
|
12457
|
-
* @param hyear Hebrew year
|
|
12458
|
-
* @param mask optional holiday flags
|
|
12459
|
-
*/
|
|
12460
|
-
constructor(date, hyear, mask) {
|
|
12461
|
-
super(date, `Rosh Hashana ${hyear}`, mask);
|
|
12462
|
-
this.hyear = hyear;
|
|
12463
|
-
}
|
|
12464
|
-
/**
|
|
12465
|
-
* Returns (translated) description of this event
|
|
12466
|
-
* @param [locale] Optional locale name (defaults to empty locale)
|
|
12467
|
-
*/
|
|
12468
|
-
render(locale) {
|
|
12469
|
-
return Locale.gettext('Rosh Hashana', locale) + ' ' + this.hyear;
|
|
12470
|
-
}
|
|
12471
|
-
getEmoji() {
|
|
12472
|
-
return '🍏🍯';
|
|
12473
|
-
}
|
|
12474
|
-
}
|
|
12475
|
-
const roshChodeshStr = 'Rosh Chodesh';
|
|
12476
|
-
/** Represents Rosh Chodesh, the beginning of a new month */
|
|
12477
|
-
class RoshChodeshEvent extends HolidayEvent {
|
|
12478
|
-
/**
|
|
12479
|
-
* Constructs Rosh Chodesh event
|
|
12480
|
-
* @param date Hebrew date event occurs
|
|
12481
|
-
* @param monthName Hebrew month name (not translated)
|
|
12482
|
-
*/
|
|
12483
|
-
constructor(date, monthName) {
|
|
12484
|
-
super(date, `${roshChodeshStr} ${monthName}`, flags.ROSH_CHODESH);
|
|
12485
|
-
}
|
|
12486
|
-
/**
|
|
12487
|
-
* Returns (translated) description of this event
|
|
12488
|
-
* @param [locale] Optional locale name (defaults to empty locale)
|
|
12489
|
-
*/
|
|
12490
|
-
render(locale) {
|
|
12491
|
-
const monthName = this.getDesc().substring(roshChodeshStr.length + 1);
|
|
12492
|
-
const monthName0 = Locale.gettext(monthName, locale);
|
|
12493
|
-
const monthName1 = smartApostrophe(monthName0);
|
|
12494
|
-
return Locale.gettext(roshChodeshStr, locale) + ' ' + monthName1;
|
|
12495
|
-
}
|
|
12496
|
-
basename() {
|
|
12497
|
-
return this.getDesc();
|
|
12498
|
-
}
|
|
12499
|
-
getEmoji() {
|
|
12500
|
-
return this.emoji || '🌒';
|
|
12375
|
+
function getSedra(hyear, il) {
|
|
12376
|
+
const cacheKey = `${hyear}-${il ? 1 : 0}`;
|
|
12377
|
+
let sedra = sedraCache.get(cacheKey);
|
|
12378
|
+
if (!sedra) {
|
|
12379
|
+
sedra = new Sedra(hyear, il);
|
|
12380
|
+
sedraCache.set(cacheKey, sedra);
|
|
12501
12381
|
}
|
|
12382
|
+
return sedra;
|
|
12502
12383
|
}
|
|
12503
12384
|
|
|
12504
12385
|
const ykk = 'Yom Kippur Katan';
|
|
@@ -12524,7 +12405,7 @@ class YomKippurKatanEvent extends HolidayEvent {
|
|
|
12524
12405
|
render(locale) {
|
|
12525
12406
|
const monthName0 = Locale.gettext(this.nextMonthName, locale);
|
|
12526
12407
|
const monthName = smartApostrophe(monthName0);
|
|
12527
|
-
return Locale.gettext(ykk, locale)
|
|
12408
|
+
return `${Locale.gettext(ykk, locale)} ${monthName}`;
|
|
12528
12409
|
}
|
|
12529
12410
|
/**
|
|
12530
12411
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
@@ -12581,74 +12462,34 @@ function getHolidaysOnDate(date, il) {
|
|
|
12581
12462
|
if (il === undefined || events === undefined) {
|
|
12582
12463
|
return events;
|
|
12583
12464
|
}
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
}
|
|
12587
|
-
const CHAG = flags.CHAG;
|
|
12588
|
-
const IL_ONLY$1 = flags.IL_ONLY;
|
|
12589
|
-
const LIGHT_CANDLES_TZEIS$2 = flags.LIGHT_CANDLES_TZEIS;
|
|
12590
|
-
const CHANUKAH_CANDLES$1 = flags.CHANUKAH_CANDLES;
|
|
12591
|
-
const BEHAB$1 = flags.BEHAB;
|
|
12592
|
-
const MINOR_FAST$1 = flags.MINOR_FAST;
|
|
12593
|
-
const SPECIAL_SHABBAT$1 = flags.SPECIAL_SHABBAT;
|
|
12594
|
-
const MODERN_HOLIDAY$1 = flags.MODERN_HOLIDAY;
|
|
12595
|
-
const MAJOR_FAST$1 = flags.MAJOR_FAST;
|
|
12596
|
-
const MINOR_HOLIDAY$1 = flags.MINOR_HOLIDAY;
|
|
12597
|
-
const EREV$1 = flags.EREV;
|
|
12465
|
+
return events.filter(ev => ev.observedIn(il));
|
|
12466
|
+
}
|
|
12467
|
+
const { CHAG, LIGHT_CANDLES_TZEIS: LIGHT_CANDLES_TZEIS$2, CHANUKAH_CANDLES: CHANUKAH_CANDLES$1, BEHAB: BEHAB$1, MINOR_FAST: MINOR_FAST$1, SPECIAL_SHABBAT: SPECIAL_SHABBAT$1, MAJOR_FAST: MAJOR_FAST$1, MINOR_HOLIDAY: MINOR_HOLIDAY$1, EREV: EREV$1, } = flags;
|
|
12598
12468
|
const SUN = 0;
|
|
12599
12469
|
const TUE = 2;
|
|
12600
12470
|
const THU = 4;
|
|
12601
12471
|
const FRI$1 = 5;
|
|
12602
12472
|
const SAT$2 = 6;
|
|
12603
|
-
const NISAN$2 = months
|
|
12604
|
-
const IYYAR = months.IYYAR;
|
|
12605
|
-
const TAMUZ$1 = months.TAMUZ;
|
|
12606
|
-
const AV$1 = months.AV;
|
|
12607
|
-
const TISHREI$1 = months.TISHREI;
|
|
12608
|
-
const CHESHVAN = months.CHESHVAN;
|
|
12609
|
-
const KISLEV = months.KISLEV;
|
|
12610
|
-
const TEVET = months.TEVET;
|
|
12611
|
-
const ADAR_I = months.ADAR_I;
|
|
12612
|
-
const ADAR_II = months.ADAR_II;
|
|
12613
|
-
const emojiIsraelFlag = { emoji: '🇮🇱' };
|
|
12473
|
+
const { NISAN: NISAN$2, IYYAR, TAMUZ: TAMUZ$1, AV: AV$1, TISHREI: TISHREI$1, CHESHVAN, KISLEV, TEVET, ADAR_I, ADAR_II } = months;
|
|
12614
12474
|
const yearCache = new QuickLRU({ maxSize: 120 });
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
if (typeof year !== 'number') {
|
|
12623
|
-
throw new TypeError(`bad Hebrew year: ${year}`);
|
|
12624
|
-
}
|
|
12625
|
-
if (year < 1 || year > 32658) {
|
|
12626
|
-
throw new RangeError(`Hebrew year ${year} out of range 1-32658`);
|
|
12627
|
-
}
|
|
12628
|
-
const cached = yearCache.get(year);
|
|
12629
|
-
if (cached) {
|
|
12630
|
-
return cached;
|
|
12631
|
-
}
|
|
12632
|
-
const RH = new HDate(1, TISHREI$1, year);
|
|
12633
|
-
const pesach = new HDate(15, NISAN$2, year);
|
|
12634
|
-
const map = new Map();
|
|
12635
|
-
function add(...events) {
|
|
12636
|
-
for (const ev of events) {
|
|
12637
|
-
const key = ev.date.toString();
|
|
12638
|
-
const arr = map.get(key);
|
|
12639
|
-
if (typeof arr === 'object') {
|
|
12640
|
-
if (arr[0].hasFlag('EREV')) {
|
|
12641
|
-
arr.unshift(ev);
|
|
12642
|
-
}
|
|
12643
|
-
else {
|
|
12644
|
-
arr.push(ev);
|
|
12645
|
-
}
|
|
12475
|
+
function addToMap(map, ...events) {
|
|
12476
|
+
for (const ev of events) {
|
|
12477
|
+
const key = ev.date.toString();
|
|
12478
|
+
const arr = map.get(key);
|
|
12479
|
+
if (arr !== undefined) {
|
|
12480
|
+
if (arr[0].hasFlag('EREV')) {
|
|
12481
|
+
arr.unshift(ev);
|
|
12646
12482
|
}
|
|
12647
12483
|
else {
|
|
12648
|
-
|
|
12484
|
+
arr.push(ev);
|
|
12649
12485
|
}
|
|
12650
12486
|
}
|
|
12487
|
+
else {
|
|
12488
|
+
map.set(key, [ev]);
|
|
12489
|
+
}
|
|
12651
12490
|
}
|
|
12491
|
+
}
|
|
12492
|
+
function addStaticHolidays(map, year) {
|
|
12652
12493
|
for (const h of staticHolidays) {
|
|
12653
12494
|
const hd = new HDate(h.dd, h.mm, year);
|
|
12654
12495
|
const attrs = {};
|
|
@@ -12656,81 +12497,58 @@ function getHolidaysForYear_(year) {
|
|
|
12656
12497
|
attrs.emoji = h.emoji;
|
|
12657
12498
|
if (h.chmDay)
|
|
12658
12499
|
attrs.cholHaMoedDay = h.chmDay;
|
|
12659
|
-
|
|
12660
|
-
add(ev);
|
|
12500
|
+
addToMap(map, new HolidayEvent(hd, h.desc, h.flags, attrs));
|
|
12661
12501
|
}
|
|
12502
|
+
}
|
|
12503
|
+
function addTishreiHolidays(map, year, RH) {
|
|
12662
12504
|
// standard holidays that don't shift based on year
|
|
12663
|
-
|
|
12664
|
-
// Variable date holidays
|
|
12505
|
+
addToMap(map, new RoshHashanaEvent(RH, year, CHAG | LIGHT_CANDLES_TZEIS$2));
|
|
12665
12506
|
const tzomGedaliahDay = RH.getDay() === THU ? 4 : 3;
|
|
12666
|
-
|
|
12507
|
+
addToMap(map, new HolidayEvent(new HDate(tzomGedaliahDay, TISHREI$1, year), holidayDesc.TZOM_GEDALIAH, MINOR_FAST$1),
|
|
12667
12508
|
// first SAT after RH
|
|
12668
|
-
|
|
12509
|
+
new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, 7 + RH.abs())), holidayDesc.SHABBAT_SHUVA, SPECIAL_SHABBAT$1));
|
|
12510
|
+
}
|
|
12511
|
+
function addChanukahAndTevet(map, year) {
|
|
12669
12512
|
const rchTevet = HDate.shortKislev(year)
|
|
12670
12513
|
? new HDate(1, TEVET, year)
|
|
12671
12514
|
: new HDate(30, KISLEV, year);
|
|
12672
|
-
|
|
12673
|
-
add(new ChanukahEvent(new HDate(24, KISLEV, year), holidayDesc.CHANUKAH_1_CANDLE, EREV$1 | MINOR_HOLIDAY$1 | CHANUKAH_CANDLES$1, undefined));
|
|
12515
|
+
addToMap(map, new HolidayEvent(rchTevet, holidayDesc.CHAG_HABANOT, MINOR_HOLIDAY$1), new ChanukahEvent(new HDate(24, KISLEV, year), holidayDesc.CHANUKAH_1_CANDLE, EREV$1 | MINOR_HOLIDAY$1 | CHANUKAH_CANDLES$1, undefined));
|
|
12674
12516
|
// yes, we know Kislev 30-32 are wrong
|
|
12675
12517
|
// HDate() corrects the month automatically
|
|
12676
12518
|
for (let candles = 2; candles <= 8; candles++) {
|
|
12677
12519
|
const hd = new HDate(23 + candles, KISLEV, year);
|
|
12678
|
-
|
|
12520
|
+
addToMap(map, new ChanukahEvent(hd, `Chanukah: ${candles} Candles`, MINOR_HOLIDAY$1 | CHANUKAH_CANDLES$1, candles - 1));
|
|
12679
12521
|
}
|
|
12680
|
-
|
|
12681
|
-
|
|
12522
|
+
addToMap(map, new ChanukahEvent(new HDate(32, KISLEV, year), holidayDesc.CHANUKAH_8TH_DAY, MINOR_HOLIDAY$1, 8), new AsaraBTevetEvent(new HDate(10, TEVET, year), holidayDesc.ASARA_BTEVET, MINOR_FAST$1));
|
|
12523
|
+
}
|
|
12524
|
+
function addPesachSeasonHolidays(map, year, pesach) {
|
|
12682
12525
|
const pesachAbs = pesach.abs();
|
|
12683
|
-
add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, pesachAbs - 43)), holidayDesc.SHABBAT_SHEKALIM, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, pesachAbs - 30)), holidayDesc.SHABBAT_ZACHOR, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(pesachAbs - (pesach.getDay() === TUE ? 33 : 31)), holidayDesc.TAANIT_ESTHER, MINOR_FAST$1));
|
|
12684
12526
|
const haChodeshAbs = HDate.dayOnOrBefore(SAT$2, pesachAbs - 14);
|
|
12685
|
-
|
|
12527
|
+
addToMap(map, new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, pesachAbs - 43)), holidayDesc.SHABBAT_SHEKALIM, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, pesachAbs - 30)), holidayDesc.SHABBAT_ZACHOR, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(pesachAbs - (pesach.getDay() === TUE ? 33 : 31)), holidayDesc.TAANIT_ESTHER, MINOR_FAST$1), new HolidayEvent(new HDate(haChodeshAbs - 7), holidayDesc.SHABBAT_PARAH, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(haChodeshAbs), holidayDesc.SHABBAT_HACHODESH, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, pesachAbs - 1)), holidayDesc.SHABBAT_HAGADOL, SPECIAL_SHABBAT$1), new HolidayEvent(
|
|
12686
12528
|
// if the fast falls on Shabbat, move to Thursday
|
|
12687
12529
|
pesach.prev().getDay() === SAT$2
|
|
12688
12530
|
? pesach.onOrBefore(THU)
|
|
12689
12531
|
: new HDate(14, NISAN$2, year), holidayDesc.TAANIT_BECHOROT, MINOR_FAST$1));
|
|
12690
|
-
|
|
12532
|
+
}
|
|
12533
|
+
function addLeilSelichot(map, year) {
|
|
12534
|
+
addToMap(map, new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, new HDate(1, TISHREI$1, year + 1).abs() - 4)), holidayDesc.LEIL_SELICHOT, MINOR_HOLIDAY$1, { emoji: '🕍' }));
|
|
12535
|
+
}
|
|
12536
|
+
function addPurimVariants(map, year, pesach) {
|
|
12691
12537
|
if (pesach.getDay() === SUN) {
|
|
12692
|
-
|
|
12538
|
+
addToMap(map, new HolidayEvent(new HDate(16, ADAR_II, year), holidayDesc.PURIM_MESHULASH, MINOR_HOLIDAY$1));
|
|
12693
12539
|
}
|
|
12694
12540
|
if (HDate.isLeapYear(year)) {
|
|
12695
|
-
|
|
12696
|
-
add(new HolidayEvent(new HDate(15, ADAR_I, year), holidayDesc.SHUSHAN_PURIM_KATAN, MINOR_HOLIDAY$1, { emoji: '🎭️' }));
|
|
12697
|
-
}
|
|
12698
|
-
const nisan27dt = dateYomHaShoah(year);
|
|
12699
|
-
if (nisan27dt) {
|
|
12700
|
-
add(new HolidayEvent(nisan27dt, holidayDesc.YOM_HASHOAH, MODERN_HOLIDAY$1));
|
|
12701
|
-
}
|
|
12702
|
-
const yomHaZikaronDt = dateYomHaZikaron(year);
|
|
12703
|
-
if (yomHaZikaronDt) {
|
|
12704
|
-
add(new HolidayEvent(yomHaZikaronDt, holidayDesc.YOM_HAZIKARON, MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(yomHaZikaronDt.next(), holidayDesc.YOM_HAATZMA_UT, MODERN_HOLIDAY$1, emojiIsraelFlag));
|
|
12705
|
-
}
|
|
12706
|
-
for (const h of staticModernHolidays) {
|
|
12707
|
-
if (year >= h.firstYear) {
|
|
12708
|
-
let hd = new HDate(h.dd, h.mm, year);
|
|
12709
|
-
const dow = hd.getDay();
|
|
12710
|
-
if (h.friSatMovetoThu && (dow === FRI$1 || dow === SAT$2)) {
|
|
12711
|
-
hd = hd.onOrBefore(THU);
|
|
12712
|
-
}
|
|
12713
|
-
else if (h.friPostponeToSun && dow === FRI$1) {
|
|
12714
|
-
hd = new HDate(hd.abs() + 2);
|
|
12715
|
-
}
|
|
12716
|
-
else if (h.satPostponeToSun && dow === SAT$2) {
|
|
12717
|
-
hd = hd.next();
|
|
12718
|
-
}
|
|
12719
|
-
const mask = h.chul ? MODERN_HOLIDAY$1 : MODERN_HOLIDAY$1 | IL_ONLY$1;
|
|
12720
|
-
const ev = new HolidayEvent(hd, h.desc, mask);
|
|
12721
|
-
if (!h.suppressEmoji) {
|
|
12722
|
-
ev.emoji = '🇮🇱';
|
|
12723
|
-
}
|
|
12724
|
-
add(ev);
|
|
12725
|
-
}
|
|
12541
|
+
addToMap(map, new HolidayEvent(new HDate(14, ADAR_I, year), holidayDesc.PURIM_KATAN, MINOR_HOLIDAY$1, { emoji: '🎭️' }), new HolidayEvent(new HDate(15, ADAR_I, year), holidayDesc.SHUSHAN_PURIM_KATAN, MINOR_HOLIDAY$1, { emoji: '🎭️' }));
|
|
12726
12542
|
}
|
|
12543
|
+
}
|
|
12544
|
+
function addSummerFasts(map, year) {
|
|
12727
12545
|
let tamuz17 = new HDate(17, TAMUZ$1, year);
|
|
12728
12546
|
let tamuz17attrs;
|
|
12729
12547
|
if (tamuz17.getDay() === SAT$2) {
|
|
12730
12548
|
tamuz17 = new HDate(18, TAMUZ$1, year);
|
|
12731
12549
|
tamuz17attrs = { observed: true };
|
|
12732
12550
|
}
|
|
12733
|
-
|
|
12551
|
+
addToMap(map, new HolidayEvent(tamuz17, holidayDesc.TZOM_TAMMUZ, MINOR_FAST$1, tamuz17attrs));
|
|
12734
12552
|
let av9dt = new HDate(9, AV$1, year);
|
|
12735
12553
|
let av9title = holidayDesc.TISHA_BAV;
|
|
12736
12554
|
let av9attrs;
|
|
@@ -12740,30 +12558,35 @@ function getHolidaysForYear_(year) {
|
|
|
12740
12558
|
av9title += ' (observed)';
|
|
12741
12559
|
}
|
|
12742
12560
|
const av9abs = av9dt.abs();
|
|
12743
|
-
|
|
12561
|
+
addToMap(map, new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, av9abs)), holidayDesc.SHABBAT_CHAZON, SPECIAL_SHABBAT$1), new HolidayEvent(av9dt.prev(), holidayDesc.EREV_TISHA_BAV, EREV$1 | MAJOR_FAST$1, av9attrs), new HolidayEvent(av9dt, av9title, MAJOR_FAST$1, av9attrs), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$2, av9abs + 7)), holidayDesc.SHABBAT_NACHAMU, SPECIAL_SHABBAT$1));
|
|
12562
|
+
}
|
|
12563
|
+
function daysInPreviousMonth(month, year) {
|
|
12564
|
+
return month === NISAN$2
|
|
12565
|
+
? HDate.daysInMonth(HDate.monthsInYear(year - 1), year - 1)
|
|
12566
|
+
: HDate.daysInMonth(month - 1, year);
|
|
12567
|
+
}
|
|
12568
|
+
function addRoshChodesh(map, year) {
|
|
12744
12569
|
const monthsInYear = HDate.monthsInYear(year);
|
|
12745
12570
|
for (let month = 1; month <= monthsInYear; month++) {
|
|
12746
12571
|
const monthName = HDate.getMonthName(month, year);
|
|
12747
|
-
if ((month ===
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
add(new RoshChodeshEvent(new HDate(1, month, year), monthName));
|
|
12751
|
-
add(new RoshChodeshEvent(new HDate(30, month - 1, year), monthName));
|
|
12572
|
+
if (daysInPreviousMonth(month, year) === 30) {
|
|
12573
|
+
addToMap(map, new RoshChodeshEvent(new HDate(1, month, year), monthName));
|
|
12574
|
+
addToMap(map, new RoshChodeshEvent(new HDate(30, month - 1, year), monthName));
|
|
12752
12575
|
}
|
|
12753
12576
|
else if (month !== TISHREI$1) {
|
|
12754
|
-
|
|
12577
|
+
addToMap(map, new RoshChodeshEvent(new HDate(1, month, year), monthName));
|
|
12755
12578
|
}
|
|
12756
12579
|
}
|
|
12757
|
-
|
|
12580
|
+
}
|
|
12581
|
+
function addYomKippurKatan(map, year) {
|
|
12582
|
+
const monthsInYear = HDate.monthsInYear(year);
|
|
12758
12583
|
// start at Iyyar because one may not fast during Nisan
|
|
12759
|
-
for (let month =
|
|
12584
|
+
for (let month = IYYAR; month <= monthsInYear; month++) {
|
|
12760
12585
|
const nextMonth = month + 1;
|
|
12761
12586
|
// Yom Kippur Katan is not observed on the day before Rosh Hashanah.
|
|
12762
12587
|
// Not observed prior to Rosh Chodesh Cheshvan because Yom Kippur has just passed.
|
|
12763
12588
|
// Not observed before Rosh Chodesh Tevet, because that day is Hanukkah.
|
|
12764
|
-
if (nextMonth === TISHREI$1 ||
|
|
12765
|
-
nextMonth === months.CHESHVAN ||
|
|
12766
|
-
nextMonth === TEVET) {
|
|
12589
|
+
if (nextMonth === TISHREI$1 || nextMonth === CHESHVAN || nextMonth === TEVET) {
|
|
12767
12590
|
continue;
|
|
12768
12591
|
}
|
|
12769
12592
|
let ykk = new HDate(29, month, year);
|
|
@@ -12772,9 +12595,10 @@ function getHolidaysForYear_(year) {
|
|
|
12772
12595
|
ykk = ykk.onOrBefore(THU);
|
|
12773
12596
|
}
|
|
12774
12597
|
const nextMonthName = HDate.getMonthName(nextMonth, year);
|
|
12775
|
-
|
|
12776
|
-
add(ev);
|
|
12598
|
+
addToMap(map, new YomKippurKatanEvent(ykk, nextMonthName));
|
|
12777
12599
|
}
|
|
12600
|
+
}
|
|
12601
|
+
function addBehab(map, year) {
|
|
12778
12602
|
for (const month of [CHESHVAN, IYYAR]) {
|
|
12779
12603
|
const roshChodesh = new HDate(1, month, year);
|
|
12780
12604
|
let shabbos = new HDate(HDate.dayOnOrBefore(SAT$2, roshChodesh.abs() + 6));
|
|
@@ -12786,21 +12610,60 @@ function getHolidaysForYear_(year) {
|
|
|
12786
12610
|
fastDays[2] = new HDate(17, IYYAR, year);
|
|
12787
12611
|
}
|
|
12788
12612
|
for (const hd of fastDays) {
|
|
12789
|
-
|
|
12613
|
+
addToMap(map, new HolidayEvent(hd, holidayDesc.TAANIT_BEHAB, MINOR_FAST$1 | BEHAB$1));
|
|
12790
12614
|
}
|
|
12791
12615
|
}
|
|
12616
|
+
}
|
|
12617
|
+
/**
|
|
12618
|
+
* Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
|
|
12619
|
+
* `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`
|
|
12620
|
+
* or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme.
|
|
12621
|
+
* @internal
|
|
12622
|
+
*/
|
|
12623
|
+
function getHolidaysForYear_(year) {
|
|
12624
|
+
if (typeof year !== 'number') {
|
|
12625
|
+
throw new TypeError(`bad Hebrew year: ${year}`);
|
|
12626
|
+
}
|
|
12627
|
+
if (year < 1 || year > 32658) {
|
|
12628
|
+
throw new RangeError(`Hebrew year ${year} out of range 1-32658`);
|
|
12629
|
+
}
|
|
12630
|
+
const cached = yearCache.get(year);
|
|
12631
|
+
if (cached) {
|
|
12632
|
+
return cached;
|
|
12633
|
+
}
|
|
12634
|
+
const RH = new HDate(1, TISHREI$1, year);
|
|
12635
|
+
const pesach = new HDate(15, NISAN$2, year);
|
|
12636
|
+
const map = new Map();
|
|
12637
|
+
addStaticHolidays(map, year);
|
|
12638
|
+
addTishreiHolidays(map, year, RH);
|
|
12639
|
+
addChanukahAndTevet(map, year);
|
|
12640
|
+
addPesachSeasonHolidays(map, year, pesach);
|
|
12641
|
+
addLeilSelichot(map, year);
|
|
12642
|
+
addPurimVariants(map, year, pesach);
|
|
12643
|
+
addToMap(map, ...modernHolidaysForYear(year));
|
|
12644
|
+
addSummerFasts(map, year);
|
|
12645
|
+
addRoshChodesh(map, year);
|
|
12646
|
+
addYomKippurKatan(map, year);
|
|
12647
|
+
addBehab(map, year);
|
|
12792
12648
|
const sedra = getSedra(year, false);
|
|
12793
12649
|
const beshalachHd = sedra.find(15);
|
|
12794
|
-
|
|
12650
|
+
if (beshalachHd === null) {
|
|
12651
|
+
throw new Error(`Parashat Beshalach not found in year ${year}`);
|
|
12652
|
+
}
|
|
12653
|
+
addToMap(map, new HolidayEvent(beshalachHd, holidayDesc.SHABBAT_SHIRAH, SPECIAL_SHABBAT$1));
|
|
12795
12654
|
// Birkat Hachamah appears only once every 28 years
|
|
12796
12655
|
const birkatHaChama = getBirkatHaChama(year);
|
|
12797
|
-
if (birkatHaChama) {
|
|
12656
|
+
if (birkatHaChama !== undefined) {
|
|
12798
12657
|
const hd = new HDate(birkatHaChama);
|
|
12799
|
-
|
|
12658
|
+
addToMap(map, new HolidayEvent(hd, holidayDesc.BIRKAT_HACHAMAH, MINOR_HOLIDAY$1, { emoji: '☀️' }));
|
|
12800
12659
|
}
|
|
12801
12660
|
yearCache.set(year, map);
|
|
12802
12661
|
return map;
|
|
12803
12662
|
}
|
|
12663
|
+
/** 28 years of 365.25 days */
|
|
12664
|
+
const BIRKAT_HACHAMAH_CYCLE_DAYS = 10227;
|
|
12665
|
+
const BIRKAT_HACHAMAH_EPOCH_OFFSET = 1373429;
|
|
12666
|
+
const BIRKAT_HACHAMAH_REMAINDER = 172;
|
|
12804
12667
|
/**
|
|
12805
12668
|
* Birkat Hachamah appears only once every 28 years.
|
|
12806
12669
|
* Although almost always in Nisan, it can occur in Adar II.
|
|
@@ -12809,7 +12672,6 @@ function getHolidaysForYear_(year) {
|
|
|
12809
12672
|
*
|
|
12810
12673
|
* Due to drift, this will eventually slip into Iyyar
|
|
12811
12674
|
* - 2 Iyyar 7141 (Gregorian year 3381)
|
|
12812
|
-
* @private
|
|
12813
12675
|
*/
|
|
12814
12676
|
function getBirkatHaChama(year) {
|
|
12815
12677
|
const leap = HDate.isLeapYear(year);
|
|
@@ -12818,12 +12680,12 @@ function getBirkatHaChama(year) {
|
|
|
12818
12680
|
const baseRd = HDate.hebrew2abs(year, startMonth, startDay);
|
|
12819
12681
|
for (let day = 0; day <= 40; day++) {
|
|
12820
12682
|
const abs = baseRd + day;
|
|
12821
|
-
const elapsed = abs +
|
|
12822
|
-
if (elapsed %
|
|
12683
|
+
const elapsed = abs + BIRKAT_HACHAMAH_EPOCH_OFFSET;
|
|
12684
|
+
if (elapsed % BIRKAT_HACHAMAH_CYCLE_DAYS === BIRKAT_HACHAMAH_REMAINDER) {
|
|
12823
12685
|
return abs;
|
|
12824
12686
|
}
|
|
12825
12687
|
}
|
|
12826
|
-
return
|
|
12688
|
+
return undefined;
|
|
12827
12689
|
}
|
|
12828
12690
|
/**
|
|
12829
12691
|
* Returns a sorted array of holidays observed during the given Hebrew year,
|
|
@@ -12843,27 +12705,20 @@ function getHolidaysForYearArray(year, il) {
|
|
|
12843
12705
|
const yearMap = getHolidaysForYear_(year);
|
|
12844
12706
|
const startAbs = HDate.hebrew2abs(year, TISHREI$1, 1);
|
|
12845
12707
|
const endAbs = HDate.hebrew2abs(year + 1, TISHREI$1, 1) - 1;
|
|
12846
|
-
|
|
12708
|
+
const events = [];
|
|
12847
12709
|
for (let absDt = startAbs; absDt <= endAbs; absDt++) {
|
|
12848
12710
|
const hd = new HDate(absDt);
|
|
12849
12711
|
const holidays = yearMap.get(hd.toString());
|
|
12850
12712
|
if (holidays) {
|
|
12851
|
-
|
|
12852
|
-
events = events.concat(filtered);
|
|
12713
|
+
events.push(...holidays.filter(ev => ev.observedIn(il)));
|
|
12853
12714
|
}
|
|
12854
12715
|
}
|
|
12855
12716
|
return events;
|
|
12856
12717
|
}
|
|
12857
12718
|
|
|
12858
12719
|
function isTomorrowShabbosOrYomTov(dow, events) {
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
}
|
|
12862
|
-
const erev = events.find(ev => ev.hasAnyFlag('LIGHT_CANDLES', 'LIGHT_CANDLES_TZEIS'));
|
|
12863
|
-
if (erev) {
|
|
12864
|
-
return true;
|
|
12865
|
-
}
|
|
12866
|
-
return false;
|
|
12720
|
+
return (dow === 5 ||
|
|
12721
|
+
events.some(ev => ev.hasAnyFlag('LIGHT_CANDLES', 'LIGHT_CANDLES_TZEIS')));
|
|
12867
12722
|
}
|
|
12868
12723
|
/**
|
|
12869
12724
|
* Returns true if it is _Shabbos_ or if it is a _Yom Tov_ day that has a
|
|
@@ -12874,14 +12729,7 @@ function isTomorrowShabbosOrYomTov(dow, events) {
|
|
|
12874
12729
|
* @return `true` if the day is a _Yom Tov_ that is _assur bemlacha_, or _Shabbos_
|
|
12875
12730
|
*/
|
|
12876
12731
|
function isTodayAssurBemelacha(dow, events) {
|
|
12877
|
-
|
|
12878
|
-
return true;
|
|
12879
|
-
}
|
|
12880
|
-
const chag = events.find(ev => ev.hasFlag('CHAG'));
|
|
12881
|
-
if (chag) {
|
|
12882
|
-
return true;
|
|
12883
|
-
}
|
|
12884
|
-
return false;
|
|
12732
|
+
return dow === 6 || events.some(ev => ev.hasFlag('CHAG'));
|
|
12885
12733
|
}
|
|
12886
12734
|
/**
|
|
12887
12735
|
* Returns `true` if the given moment (date + time) falls within a period
|
|
@@ -12931,7 +12779,7 @@ function isAssurBemlacha(currentTime, location, useElevation) {
|
|
|
12931
12779
|
const il = location.getIsrael();
|
|
12932
12780
|
const currentMillis = currentTime.getTime();
|
|
12933
12781
|
const dow = hd.getDay();
|
|
12934
|
-
const events = getHolidaysOnDate(hd, il)
|
|
12782
|
+
const events = getHolidaysOnDate(hd, il) ?? [];
|
|
12935
12783
|
if (isTomorrowShabbosOrYomTov(dow, events) && currentMillis >= sunsetMillis) {
|
|
12936
12784
|
return true;
|
|
12937
12785
|
}
|
|
@@ -12944,10 +12792,7 @@ function isAssurBemlacha(currentTime, location, useElevation) {
|
|
|
12944
12792
|
return false;
|
|
12945
12793
|
}
|
|
12946
12794
|
|
|
12947
|
-
const NISAN$1 = months
|
|
12948
|
-
const SIVAN$1 = months.SIVAN;
|
|
12949
|
-
const TAMUZ = months.TAMUZ;
|
|
12950
|
-
const AV = months.AV;
|
|
12795
|
+
const { NISAN: NISAN$1, SIVAN: SIVAN$1, TAMUZ, AV } = months;
|
|
12951
12796
|
const SAT$1 = 6;
|
|
12952
12797
|
function getHDate(date) {
|
|
12953
12798
|
return HDate.isHDate(date) ? date : new HDate(date);
|
|
@@ -13012,13 +12857,11 @@ function isAveilut(date) {
|
|
|
13012
12857
|
* @return `true` if the date is a major or minor fast day
|
|
13013
12858
|
*/
|
|
13014
12859
|
function isFastDay(date, il) {
|
|
13015
|
-
const events = getHolidaysOnDate(date, il)
|
|
13016
|
-
|
|
13017
|
-
return Boolean(fastDay);
|
|
12860
|
+
const events = getHolidaysOnDate(date, il) ?? [];
|
|
12861
|
+
return events.some(ev => ev.hasAnyFlag('MAJOR_FAST', 'MINOR_FAST') && !ev.hasFlag('EREV'));
|
|
13018
12862
|
}
|
|
13019
12863
|
|
|
13020
|
-
const HAVDALAH = holidayDesc
|
|
13021
|
-
const CANDLE_LIGHTING = holidayDesc.CANDLE_LIGHTING;
|
|
12864
|
+
const { HAVDALAH, CANDLE_LIGHTING } = holidayDesc;
|
|
13022
12865
|
/**
|
|
13023
12866
|
* Base class for events that have an associated wall-clock time and
|
|
13024
12867
|
* geographic location — for example, candle lighting, havdalah, and
|
|
@@ -13056,7 +12899,7 @@ class TimedEvent extends Event {
|
|
|
13056
12899
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
13057
12900
|
*/
|
|
13058
12901
|
render(locale) {
|
|
13059
|
-
return Locale.gettext(this.getDesc(), locale)
|
|
12902
|
+
return `${Locale.gettext(this.getDesc(), locale)}: ${this.fmtTime}`;
|
|
13060
12903
|
}
|
|
13061
12904
|
/**
|
|
13062
12905
|
* Returns translation of "Candle lighting" without the time.
|
|
@@ -13124,7 +12967,7 @@ class HavdalahEvent extends TimedEvent {
|
|
|
13124
12967
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
13125
12968
|
*/
|
|
13126
12969
|
render(locale) {
|
|
13127
|
-
return this.renderBrief(locale)
|
|
12970
|
+
return `${this.renderBrief(locale)}: ${this.fmtTime}`;
|
|
13128
12971
|
}
|
|
13129
12972
|
/**
|
|
13130
12973
|
* Returns translation of "Havdalah" without the time.
|
|
@@ -13143,11 +12986,9 @@ class HavdalahEvent extends TimedEvent {
|
|
|
13143
12986
|
}
|
|
13144
12987
|
}
|
|
13145
12988
|
|
|
13146
|
-
const LIGHT_CANDLES$1 = flags
|
|
13147
|
-
const
|
|
13148
|
-
/**
|
|
13149
|
-
* @private
|
|
13150
|
-
*/
|
|
12989
|
+
const { LIGHT_CANDLES: LIGHT_CANDLES$1, LIGHT_CANDLES_TZEIS: LIGHT_CANDLES_TZEIS$1 } = flags;
|
|
12990
|
+
const { FAST_BEGINS, FAST_ENDS } = holidayDesc;
|
|
12991
|
+
/** @internal */
|
|
13151
12992
|
function makeCandleEvent(ev, hd, options, isFriday, isSaturday) {
|
|
13152
12993
|
let havdalahTitle = false;
|
|
13153
12994
|
let useHavdalahOffset = isSaturday;
|
|
@@ -13189,36 +13030,29 @@ function makeCandleEvent(ev, hd, options, isFriday, isSaturday) {
|
|
|
13189
13030
|
return new CandleLightingEvent(hd, mask, time, location, ev, options);
|
|
13190
13031
|
}
|
|
13191
13032
|
}
|
|
13192
|
-
const FAST_BEGINS = holidayDesc.FAST_BEGINS;
|
|
13193
|
-
const FAST_ENDS = holidayDesc.FAST_ENDS;
|
|
13194
13033
|
/**
|
|
13195
13034
|
* Tzeit HaKochavim as calculated by Rabbi Yechiel Michel Tucazinsky,
|
|
13196
13035
|
* 6.45° below geometric zenith. Default end time for Tish'a B'Av.
|
|
13197
|
-
* @private
|
|
13198
13036
|
*/
|
|
13199
13037
|
const TZEIT_TUCAZINSKY = 6.45;
|
|
13200
13038
|
/**
|
|
13201
13039
|
* Observation of 3 medium-sized stars, 7.0833333° below geometric zenith.
|
|
13202
13040
|
* Default end time for minor fasts in the Diaspora.
|
|
13203
|
-
* @private
|
|
13204
13041
|
*/
|
|
13205
13042
|
const TZEIT_3MEDIUM_STARS = 7.0833333;
|
|
13206
13043
|
/**
|
|
13207
13044
|
* Minutes after sunset that minor fasts (including Yom Kippur Katan) end in
|
|
13208
13045
|
* Israel by default, following Rabbi Deblitzky's practice.
|
|
13209
13046
|
* @see {https://www.yeshiva.org.il/calendar/timeprinciples}
|
|
13210
|
-
* @private
|
|
13211
13047
|
*/
|
|
13212
13048
|
const MINOR_FAST_END_MINUTES_IL = 15;
|
|
13213
13049
|
/**
|
|
13214
13050
|
* Alot HaShachar, 16.1° below geometric zenith.
|
|
13215
13051
|
* Default start time for minor fasts.
|
|
13216
|
-
* @private
|
|
13217
13052
|
*/
|
|
13218
13053
|
const ALOT_16_POINT_1 = 16.1;
|
|
13219
13054
|
/**
|
|
13220
13055
|
* Returns `val` when it is a finite nonzero number, otherwise `undefined`
|
|
13221
|
-
* @private
|
|
13222
13056
|
*/
|
|
13223
13057
|
function nonzero(val) {
|
|
13224
13058
|
return typeof val === 'number' && isFinite(val) && val !== 0 ? val : undefined;
|
|
@@ -13230,7 +13064,6 @@ function nonzero(val) {
|
|
|
13230
13064
|
* minutes before sunrise; otherwise, when `options.fastStartDeg` is a nonzero
|
|
13231
13065
|
* number, the fast begins when the sun is that many degrees below the horizon
|
|
13232
13066
|
* in the morning. By default, minor fasts begin at Alot HaShachar (16.1°).
|
|
13233
|
-
* @private
|
|
13234
13067
|
*/
|
|
13235
13068
|
function makeFastStartTime(zmanim, options) {
|
|
13236
13069
|
const fastStartMins = nonzero(options.fastStartMins);
|
|
@@ -13254,7 +13087,6 @@ function makeFastStartTime(zmanim, options) {
|
|
|
13254
13087
|
* When neither is specified, the default depends on `options.il`:
|
|
13255
13088
|
* - In Israel, minor fasts end 15 minutes after sunset (Rabbi Deblitzky's practice).
|
|
13256
13089
|
* - Elsewhere, minor fasts end at tzeit 7.083° (3 medium-sized stars).
|
|
13257
|
-
* @private
|
|
13258
13090
|
*/
|
|
13259
13091
|
function makeFastEndTime(zmanim, isTishaBav, options) {
|
|
13260
13092
|
if (isTishaBav) {
|
|
@@ -13328,7 +13160,7 @@ class FastDayEvent extends HolidayEvent {
|
|
|
13328
13160
|
}
|
|
13329
13161
|
/**
|
|
13330
13162
|
* Makes a pair of events representing fast start and end times
|
|
13331
|
-
* @
|
|
13163
|
+
* @internal
|
|
13332
13164
|
*/
|
|
13333
13165
|
function makeFastStartEnd(ev, options) {
|
|
13334
13166
|
const desc = ev.getDesc();
|
|
@@ -13372,9 +13204,6 @@ function makeFastStartEnd(ev, options) {
|
|
|
13372
13204
|
Object.assign(ev2, ev);
|
|
13373
13205
|
return ev2;
|
|
13374
13206
|
}
|
|
13375
|
-
/**
|
|
13376
|
-
* @private
|
|
13377
|
-
*/
|
|
13378
13207
|
function makeTimedEvent(ev, time, desc, options) {
|
|
13379
13208
|
const location = options.location;
|
|
13380
13209
|
const hd = ev.getDate();
|
|
@@ -13409,7 +13238,7 @@ class TimedChanukahEvent extends ChanukahEvent {
|
|
|
13409
13238
|
* Makes a candle-lighting event for Chankah (not on Friday/Saturday).
|
|
13410
13239
|
* At one point this used civil dusk (6 degrees below horizon).
|
|
13411
13240
|
* Another source suggests 4.6667 degrees below horizon.
|
|
13412
|
-
* @
|
|
13241
|
+
* @internal
|
|
13413
13242
|
*/
|
|
13414
13243
|
function makeWeekdayChanukahCandleLighting(ev, options) {
|
|
13415
13244
|
const hd = ev.getDate();
|
|
@@ -13567,7 +13396,7 @@ function omerTodayIsEn(omerDay) {
|
|
|
13567
13396
|
str += ` and ${daysWithinWeeks} ${daysStr}`;
|
|
13568
13397
|
}
|
|
13569
13398
|
}
|
|
13570
|
-
return str
|
|
13399
|
+
return `${str} of the Omer`;
|
|
13571
13400
|
}
|
|
13572
13401
|
// adapted from pip hdate package (GPL)
|
|
13573
13402
|
// https://github.com/py-libhdate/py-libhdate/blob/master/hdate/date.py
|
|
@@ -13586,23 +13415,23 @@ const ones = [
|
|
|
13586
13415
|
];
|
|
13587
13416
|
const shnei = 'שְׁנֵי';
|
|
13588
13417
|
const yamim = 'יָמִים';
|
|
13589
|
-
const shneiYamim = shnei
|
|
13418
|
+
const shneiYamim = `${shnei} ${yamim}`;
|
|
13590
13419
|
const shavuot = 'שָׁבוּעוֹת';
|
|
13591
13420
|
const yom = 'יוֹם';
|
|
13592
|
-
const yomEchad = yom
|
|
13421
|
+
const yomEchad = `${yom} ${ones[1]}`;
|
|
13593
13422
|
const asar = 'עָשָׂר';
|
|
13594
13423
|
function omerTodayIsHe(omerDay) {
|
|
13595
13424
|
const ten = Math.floor(omerDay / 10);
|
|
13596
13425
|
const one = omerDay % 10;
|
|
13597
13426
|
let str = 'הַיּוֹם ';
|
|
13598
13427
|
if (omerDay === 11) {
|
|
13599
|
-
str +=
|
|
13428
|
+
str += `אַחַד ${asar}`;
|
|
13600
13429
|
}
|
|
13601
13430
|
else if (omerDay === 12) {
|
|
13602
|
-
str +=
|
|
13431
|
+
str += `שְׁנֵים ${asar}`;
|
|
13603
13432
|
}
|
|
13604
13433
|
else if (12 < omerDay && omerDay < 20) {
|
|
13605
|
-
str += ones[one]
|
|
13434
|
+
str += `${ones[one]} ${asar}`;
|
|
13606
13435
|
}
|
|
13607
13436
|
else if (omerDay > 9) {
|
|
13608
13437
|
str += ones[one];
|
|
@@ -13616,18 +13445,18 @@ function omerTodayIsHe(omerDay) {
|
|
|
13616
13445
|
str += tens[ten];
|
|
13617
13446
|
}
|
|
13618
13447
|
if (omerDay < 11) {
|
|
13619
|
-
str += ones[one]
|
|
13448
|
+
str += `${ones[one]} ${yamim} `;
|
|
13620
13449
|
}
|
|
13621
13450
|
else {
|
|
13622
|
-
str +=
|
|
13451
|
+
str += ` ${yom} `;
|
|
13623
13452
|
}
|
|
13624
13453
|
}
|
|
13625
13454
|
else if (omerDay === 1) {
|
|
13626
|
-
str += yomEchad
|
|
13455
|
+
str += `${yomEchad} `;
|
|
13627
13456
|
}
|
|
13628
13457
|
else {
|
|
13629
13458
|
// omer == 2
|
|
13630
|
-
str += shneiYamim
|
|
13459
|
+
str += `${shneiYamim} `;
|
|
13631
13460
|
}
|
|
13632
13461
|
if (omerDay > 6) {
|
|
13633
13462
|
str = str.trim(); // remove trailing space before comma
|
|
@@ -13635,14 +13464,14 @@ function omerTodayIsHe(omerDay) {
|
|
|
13635
13464
|
const weeks = Math.floor(omerDay / 7);
|
|
13636
13465
|
const days = omerDay % 7;
|
|
13637
13466
|
if (weeks > 2) {
|
|
13638
|
-
str += ones[weeks]
|
|
13467
|
+
str += `${ones[weeks]} ${shavuot} `;
|
|
13639
13468
|
}
|
|
13640
13469
|
else if (weeks === 1) {
|
|
13641
|
-
str +=
|
|
13470
|
+
str += `שָׁבֽוּעַ ${ones[1]} `;
|
|
13642
13471
|
}
|
|
13643
13472
|
else {
|
|
13644
13473
|
// weeks == 2
|
|
13645
|
-
str += shnei
|
|
13474
|
+
str += `${shnei} ${shavuot} `;
|
|
13646
13475
|
}
|
|
13647
13476
|
if (days) {
|
|
13648
13477
|
if (days === 2 || days === 3) {
|
|
@@ -13655,14 +13484,14 @@ function omerTodayIsHe(omerDay) {
|
|
|
13655
13484
|
str += 'וְ';
|
|
13656
13485
|
}
|
|
13657
13486
|
if (days > 2) {
|
|
13658
|
-
str += ones[days]
|
|
13487
|
+
str += `${ones[days]} ${yamim} `;
|
|
13659
13488
|
}
|
|
13660
13489
|
else if (days === 1) {
|
|
13661
|
-
str += yomEchad
|
|
13490
|
+
str += `${yomEchad} `;
|
|
13662
13491
|
}
|
|
13663
13492
|
else {
|
|
13664
13493
|
// days == 2
|
|
13665
|
-
str += shneiYamim
|
|
13494
|
+
str += `${shneiYamim} `;
|
|
13666
13495
|
}
|
|
13667
13496
|
}
|
|
13668
13497
|
}
|
|
@@ -13701,8 +13530,7 @@ class OmerEvent extends Event {
|
|
|
13701
13530
|
constructor(date, omerDay) {
|
|
13702
13531
|
super(date, `Omer ${omerDay}`, flags.OMER_COUNT);
|
|
13703
13532
|
checkDay(omerDay);
|
|
13704
|
-
this.weekNumber =
|
|
13705
|
-
this.daysWithinWeeks = omerDay % 7 || 7;
|
|
13533
|
+
[this.weekNumber, this.daysWithinWeeks] = getWeeks(omerDay);
|
|
13706
13534
|
this.omer = omerDay;
|
|
13707
13535
|
}
|
|
13708
13536
|
/**
|
|
@@ -13728,8 +13556,7 @@ class OmerEvent extends Event {
|
|
|
13728
13556
|
}
|
|
13729
13557
|
const [weekNum, daysWithinWeeks] = getWeeks(this.omer);
|
|
13730
13558
|
const config = sefirot[lang];
|
|
13731
|
-
const pfxWords = config
|
|
13732
|
-
const words = config.words;
|
|
13559
|
+
const { pfxWords, words } = config;
|
|
13733
13560
|
const week = pfxWords ? pfxWords[weekNum] : words[weekNum];
|
|
13734
13561
|
const dayWithinWeek = words[daysWithinWeeks];
|
|
13735
13562
|
const infix = pfxWords
|
|
@@ -13737,7 +13564,7 @@ class OmerEvent extends Event {
|
|
|
13737
13564
|
: weekNum === 2 || weekNum === 6
|
|
13738
13565
|
? config.infix26
|
|
13739
13566
|
: config.infix;
|
|
13740
|
-
return
|
|
13567
|
+
return `${dayWithinWeek} ${infix}${week}`.normalize();
|
|
13741
13568
|
}
|
|
13742
13569
|
/**
|
|
13743
13570
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
@@ -13746,18 +13573,14 @@ class OmerEvent extends Event {
|
|
|
13746
13573
|
const isHebrewLocale = Locale.isHebrewLocale(locale);
|
|
13747
13574
|
const omer = this.omer;
|
|
13748
13575
|
const nth = isHebrewLocale ? gematriya(omer) : Locale.ordinal(omer, locale);
|
|
13749
|
-
return nth
|
|
13576
|
+
return `${nth} ${Locale.gettext('day of the Omer', locale)}`;
|
|
13750
13577
|
}
|
|
13751
13578
|
/**
|
|
13752
13579
|
* Returns translation of "Omer day 22" without ordinal numbers.
|
|
13753
13580
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
13754
13581
|
*/
|
|
13755
13582
|
renderBrief(locale) {
|
|
13756
|
-
return
|
|
13757
|
-
' ' +
|
|
13758
|
-
Locale.gettext('day', locale) +
|
|
13759
|
-
' ' +
|
|
13760
|
-
this.omer);
|
|
13583
|
+
return `${Locale.gettext('Omer', locale)} ${Locale.gettext('day', locale)} ${this.omer}`;
|
|
13761
13584
|
}
|
|
13762
13585
|
/**
|
|
13763
13586
|
* Returns an emoji number symbol with a circle, for example `㊲`
|
|
@@ -13883,11 +13706,7 @@ class OmerEvent extends Event {
|
|
|
13883
13706
|
}
|
|
13884
13707
|
|
|
13885
13708
|
function range(start, end) {
|
|
13886
|
-
|
|
13887
|
-
for (let i = start; i <= end; i++) {
|
|
13888
|
-
arr.push(i);
|
|
13889
|
-
}
|
|
13890
|
-
return arr;
|
|
13709
|
+
return Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
13891
13710
|
}
|
|
13892
13711
|
const NONE$1 = {
|
|
13893
13712
|
shacharit: false,
|
|
@@ -14001,7 +13820,7 @@ function tachanunYear(year, il) {
|
|
|
14001
13820
|
};
|
|
14002
13821
|
}
|
|
14003
13822
|
|
|
14004
|
-
/** @
|
|
13823
|
+
/** @internal */
|
|
14005
13824
|
function renderParshaName(parsha, locale) {
|
|
14006
13825
|
let name = Locale.gettext(parsha[0], locale);
|
|
14007
13826
|
if (parsha.length === 2) {
|
|
@@ -14009,8 +13828,7 @@ function renderParshaName(parsha, locale) {
|
|
|
14009
13828
|
name += hyphen + Locale.gettext(parsha[1], locale);
|
|
14010
13829
|
}
|
|
14011
13830
|
name = smartApostrophe(name);
|
|
14012
|
-
|
|
14013
|
-
return str.normalize();
|
|
13831
|
+
return `${Locale.gettext('Parashat', locale)} ${name}`.normalize();
|
|
14014
13832
|
}
|
|
14015
13833
|
|
|
14016
13834
|
/**
|
|
@@ -14044,7 +13862,7 @@ class ParshaEvent extends Event {
|
|
|
14044
13862
|
!HDate.isHDate(parsha.hdate)) {
|
|
14045
13863
|
throw new TypeError(`Invalid SedraResult argument: ${JSON.stringify(parsha)}`);
|
|
14046
13864
|
}
|
|
14047
|
-
const desc =
|
|
13865
|
+
const desc = `Parashat ${parsha.parsha.join('-')}`;
|
|
14048
13866
|
super(parsha.hdate, desc, flags.PARSHA_HASHAVUA);
|
|
14049
13867
|
this.p = parsha;
|
|
14050
13868
|
}
|
|
@@ -14063,8 +13881,8 @@ class ParshaEvent extends Event {
|
|
|
14063
13881
|
return undefined;
|
|
14064
13882
|
}
|
|
14065
13883
|
const dt = this.urlDateSuffix();
|
|
14066
|
-
const url =
|
|
14067
|
-
return this.p.il ? url
|
|
13884
|
+
const url = `https://www.hebcal.com/sedrot/${urlFriendly(this.basename())}-${dt}`;
|
|
13885
|
+
return this.p.il ? `${url}?i=on` : url;
|
|
14068
13886
|
}
|
|
14069
13887
|
/**
|
|
14070
13888
|
* The date portion of {@link url}, as `YYYYMMDD` — a parsha name recurs every
|
|
@@ -14113,10 +13931,9 @@ function parshaYear(year, il) {
|
|
|
14113
13931
|
return events;
|
|
14114
13932
|
}
|
|
14115
13933
|
|
|
14116
|
-
const TISHREI = months
|
|
13934
|
+
const { TISHREI } = months;
|
|
14117
13935
|
/**
|
|
14118
13936
|
* Gets the R.D. days for a number, Date, or HDate
|
|
14119
|
-
* @private
|
|
14120
13937
|
*/
|
|
14121
13938
|
function getAbs(d) {
|
|
14122
13939
|
if (typeof d === 'number')
|
|
@@ -14138,16 +13955,16 @@ function getYear(options) {
|
|
|
14138
13955
|
const MAX_NUM_YEARS = 2000;
|
|
14139
13956
|
/**
|
|
14140
13957
|
* Parse options object to determine start & end days
|
|
14141
|
-
* @
|
|
13958
|
+
* @internal
|
|
14142
13959
|
*/
|
|
14143
13960
|
function getStartAndEnd(options) {
|
|
14144
|
-
const
|
|
14145
|
-
|
|
14146
|
-
if (hasStart !== hasEnd) {
|
|
13961
|
+
const { start: start0, end: end0 } = options;
|
|
13962
|
+
if ((start0 === undefined) !== (end0 === undefined)) {
|
|
14147
13963
|
throw new TypeError('options.start requires options.end');
|
|
14148
13964
|
}
|
|
14149
|
-
if (
|
|
14150
|
-
const start = getAbs(
|
|
13965
|
+
if (start0 !== undefined && end0 !== undefined) {
|
|
13966
|
+
const start = getAbs(start0);
|
|
13967
|
+
const end = getAbs(end0);
|
|
14151
13968
|
if (end - start > 365 * MAX_NUM_YEARS) {
|
|
14152
13969
|
throw new RangeError(`Date range exceeds ${MAX_NUM_YEARS} years`);
|
|
14153
13970
|
}
|
|
@@ -14259,10 +14076,7 @@ class DailyLearning {
|
|
|
14259
14076
|
if (typeof calendar !== 'function') {
|
|
14260
14077
|
throw new TypeError(`Invalid calendar function: ${calendar}`);
|
|
14261
14078
|
}
|
|
14262
|
-
cals.set(name.toLowerCase(), {
|
|
14263
|
-
fn: calendar,
|
|
14264
|
-
startDate: startDate,
|
|
14265
|
-
});
|
|
14079
|
+
cals.set(name.toLowerCase(), { fn: calendar, startDate });
|
|
14266
14080
|
}
|
|
14267
14081
|
/**
|
|
14268
14082
|
* Returns the learning event for the given date from the named calendar,
|
|
@@ -14278,10 +14092,7 @@ class DailyLearning {
|
|
|
14278
14092
|
*/
|
|
14279
14093
|
static lookup(name, hd, il) {
|
|
14280
14094
|
const cal = cals.get(name.toLowerCase());
|
|
14281
|
-
|
|
14282
|
-
return cal.fn(hd, il);
|
|
14283
|
-
}
|
|
14284
|
-
return null;
|
|
14095
|
+
return cal ? cal.fn(hd, il) : null;
|
|
14285
14096
|
}
|
|
14286
14097
|
/**
|
|
14287
14098
|
* Returns the first Hebrew date for which the named learning calendar
|
|
@@ -14290,11 +14101,7 @@ class DailyLearning {
|
|
|
14290
14101
|
* @param name case insensitive
|
|
14291
14102
|
*/
|
|
14292
14103
|
static getStartDate(name) {
|
|
14293
|
-
|
|
14294
|
-
if (typeof cal === 'object') {
|
|
14295
|
-
return cal.startDate;
|
|
14296
|
-
}
|
|
14297
|
-
return undefined;
|
|
14104
|
+
return cals.get(name.toLowerCase())?.startDate;
|
|
14298
14105
|
}
|
|
14299
14106
|
/**
|
|
14300
14107
|
* Returns `true` if a learning calendar with the given name has been
|
|
@@ -14309,7 +14116,7 @@ class DailyLearning {
|
|
|
14309
14116
|
* calendars.
|
|
14310
14117
|
*/
|
|
14311
14118
|
static getCalendars() {
|
|
14312
|
-
return
|
|
14119
|
+
return [...cals.keys()];
|
|
14313
14120
|
}
|
|
14314
14121
|
}
|
|
14315
14122
|
|
|
@@ -14348,7 +14155,7 @@ class MevarchimChodeshEvent extends Event {
|
|
|
14348
14155
|
render(locale) {
|
|
14349
14156
|
const monthName0 = Locale.gettext(this.monthName, locale);
|
|
14350
14157
|
const monthName = smartApostrophe(monthName0);
|
|
14351
|
-
return Locale.gettext(mevarchimChodeshStr, locale)
|
|
14158
|
+
return `${Locale.gettext(mevarchimChodeshStr, locale)} ${monthName}`;
|
|
14352
14159
|
}
|
|
14353
14160
|
/**
|
|
14354
14161
|
* Returns (translated) description of this event
|
|
@@ -14633,34 +14440,11 @@ function calendar(options = {}) {
|
|
|
14633
14440
|
}
|
|
14634
14441
|
const FRI = 5;
|
|
14635
14442
|
const SAT = 6;
|
|
14636
|
-
const NISAN = months
|
|
14637
|
-
const
|
|
14638
|
-
const ELUL = months.ELUL;
|
|
14639
|
-
const LIGHT_CANDLES = flags.LIGHT_CANDLES;
|
|
14640
|
-
const YOM_TOV_ENDS = flags.YOM_TOV_ENDS;
|
|
14641
|
-
const CHUL_ONLY = flags.CHUL_ONLY;
|
|
14642
|
-
const IL_ONLY = flags.IL_ONLY;
|
|
14643
|
-
const LIGHT_CANDLES_TZEIS = flags.LIGHT_CANDLES_TZEIS;
|
|
14644
|
-
const CHANUKAH_CANDLES = flags.CHANUKAH_CANDLES;
|
|
14645
|
-
const MINOR_FAST = flags.MINOR_FAST;
|
|
14646
|
-
const SPECIAL_SHABBAT = flags.SPECIAL_SHABBAT;
|
|
14647
|
-
const MODERN_HOLIDAY = flags.MODERN_HOLIDAY;
|
|
14648
|
-
const MAJOR_FAST = flags.MAJOR_FAST;
|
|
14649
|
-
const ROSH_CHODESH = flags.ROSH_CHODESH;
|
|
14650
|
-
const PARSHA_HASHAVUA = flags.PARSHA_HASHAVUA;
|
|
14651
|
-
const DAF_YOMI = flags.DAF_YOMI;
|
|
14652
|
-
const MISHNA_YOMI = flags.MISHNA_YOMI;
|
|
14653
|
-
const NACH_YOMI = flags.NACH_YOMI;
|
|
14654
|
-
const YERUSHALMI_YOMI = flags.YERUSHALMI_YOMI;
|
|
14655
|
-
const OMER_COUNT = flags.OMER_COUNT;
|
|
14656
|
-
const SHABBAT_MEVARCHIM = flags.SHABBAT_MEVARCHIM;
|
|
14657
|
-
const MINOR_HOLIDAY = flags.MINOR_HOLIDAY;
|
|
14658
|
-
const EREV = flags.EREV;
|
|
14659
|
-
const CHOL_HAMOED = flags.CHOL_HAMOED;
|
|
14660
|
-
const YOM_KIPPUR_KATAN = flags.YOM_KIPPUR_KATAN;
|
|
14661
|
-
const YIZKOR = flags.YIZKOR;
|
|
14662
|
-
const BEHAB = flags.BEHAB;
|
|
14443
|
+
const { NISAN, SIVAN, ELUL } = months;
|
|
14444
|
+
const { LIGHT_CANDLES, YOM_TOV_ENDS, CHUL_ONLY, IL_ONLY, LIGHT_CANDLES_TZEIS, CHANUKAH_CANDLES, MINOR_FAST, SPECIAL_SHABBAT, MODERN_HOLIDAY, MAJOR_FAST, ROSH_CHODESH, PARSHA_HASHAVUA, DAF_YOMI, MISHNA_YOMI, NACH_YOMI, YERUSHALMI_YOMI, OMER_COUNT, SHABBAT_MEVARCHIM, MINOR_HOLIDAY, EREV, CHOL_HAMOED, YOM_KIPPUR_KATAN, YIZKOR, BEHAB, } = flags;
|
|
14663
14445
|
const unrecognizedAlreadyWarned = new Set();
|
|
14446
|
+
// The "as const satisfies Record<keyof CalOptions, 1>" line lets
|
|
14447
|
+
// compiler flag any CalOptions field missing from the list
|
|
14664
14448
|
const RECOGNIZED_OPTIONS = {
|
|
14665
14449
|
location: 1,
|
|
14666
14450
|
year: 1,
|
|
@@ -14701,12 +14485,10 @@ const RECOGNIZED_OPTIONS = {
|
|
|
14701
14485
|
useElevation: 1,
|
|
14702
14486
|
yizkor: 1,
|
|
14703
14487
|
};
|
|
14704
|
-
|
|
14705
|
-
* @private
|
|
14706
|
-
*/
|
|
14488
|
+
const recognizedKeys = new Set(Object.keys(RECOGNIZED_OPTIONS));
|
|
14707
14489
|
function warnUnrecognizedOptions(options) {
|
|
14708
14490
|
for (const k of Object.keys(options)) {
|
|
14709
|
-
if (
|
|
14491
|
+
if (!recognizedKeys.has(k) && !unrecognizedAlreadyWarned.has(k)) {
|
|
14710
14492
|
console.warn(`Ignoring unrecognized HebrewCalendar option: ${k}`);
|
|
14711
14493
|
unrecognizedAlreadyWarned.add(k);
|
|
14712
14494
|
}
|
|
@@ -14738,8 +14520,6 @@ const geoIdCandleOffset = {
|
|
|
14738
14520
|
'293067': 30, // Zikhron Yaakov
|
|
14739
14521
|
};
|
|
14740
14522
|
/**
|
|
14741
|
-
* @private
|
|
14742
|
-
* @constant
|
|
14743
14523
|
* This calculation is based on the position of the sun 36 minutes after sunset in Jerusalem
|
|
14744
14524
|
* around the equinox / equilux, which is 8.5° below geometric zenith.
|
|
14745
14525
|
* The Ohr Meir considers this the time that 3 small stars are visible,
|
|
@@ -14749,7 +14529,6 @@ const geoIdCandleOffset = {
|
|
|
14749
14529
|
const TZEIT_3SMALL_STARS = 8.5;
|
|
14750
14530
|
/**
|
|
14751
14531
|
* Modifies options in-place
|
|
14752
|
-
* @private
|
|
14753
14532
|
*/
|
|
14754
14533
|
function checkCandleOptions(options) {
|
|
14755
14534
|
if (!options.candlelighting) {
|
|
@@ -14828,7 +14607,6 @@ function overrideIsraelCandleMins(location) {
|
|
|
14828
14607
|
}
|
|
14829
14608
|
/**
|
|
14830
14609
|
* Mask to filter Holiday array
|
|
14831
|
-
* @private
|
|
14832
14610
|
*/
|
|
14833
14611
|
function getMaskFromOptions(options) {
|
|
14834
14612
|
if (typeof options.mask === 'number') {
|
|
@@ -14912,9 +14690,6 @@ function getMaskFromOptions(options) {
|
|
|
14912
14690
|
return mask;
|
|
14913
14691
|
}
|
|
14914
14692
|
const defaultLocation = new Location(0, 0, false, 'UTC');
|
|
14915
|
-
/**
|
|
14916
|
-
* @private
|
|
14917
|
-
*/
|
|
14918
14693
|
function setOptionsFromMask(options) {
|
|
14919
14694
|
const m = options.mask || 0;
|
|
14920
14695
|
if (m & ROSH_CHODESH)
|
|
@@ -14957,7 +14732,6 @@ function setOptionsFromMask(options) {
|
|
|
14957
14732
|
/**
|
|
14958
14733
|
* Appends the Event `ev` to the `events` array. Also may add related
|
|
14959
14734
|
* timed events like candle-lighting or fast start/end
|
|
14960
|
-
* @private
|
|
14961
14735
|
*/
|
|
14962
14736
|
function appendHolidayAndRelated(candlesEv, events, ev, options, isFriday, isSaturday, hasUserMask) {
|
|
14963
14737
|
const il = options.il || false;
|
|
@@ -15111,9 +14885,7 @@ function makeBiurChametzEvent(hd, options) {
|
|
|
15111
14885
|
const NONE = 0;
|
|
15112
14886
|
const HALF = 1;
|
|
15113
14887
|
const WHOLE = 2;
|
|
15114
|
-
/**
|
|
15115
|
-
* @private
|
|
15116
|
-
*/
|
|
14888
|
+
/** @internal */
|
|
15117
14889
|
function hallel_(events, hdate) {
|
|
15118
14890
|
const abs = hdate.abs();
|
|
15119
14891
|
for (const ev of events) {
|
|
@@ -15348,16 +15120,14 @@ class HebrewCalendar {
|
|
|
15348
15120
|
* @param il use the Israeli holiday schedule
|
|
15349
15121
|
*/
|
|
15350
15122
|
static eruvTavshilin(date, il) {
|
|
15351
|
-
|
|
15123
|
+
const dow = date.getDay();
|
|
15124
|
+
if (dow < 3 || dow > 4) {
|
|
15352
15125
|
return false;
|
|
15353
15126
|
}
|
|
15354
15127
|
const today = new HDate(date);
|
|
15355
15128
|
const friday = today.after(5);
|
|
15356
15129
|
const tomorrow = today.next();
|
|
15357
|
-
|
|
15358
|
-
return false;
|
|
15359
|
-
}
|
|
15360
|
-
return true;
|
|
15130
|
+
return isChag(friday, il) && !isChag(today, il) && isChag(tomorrow, il);
|
|
15361
15131
|
}
|
|
15362
15132
|
/**
|
|
15363
15133
|
* Helper function to format a 24-hour (00:00-23:59) time string in either
|
|
@@ -15466,13 +15236,9 @@ class HebrewCalendar {
|
|
|
15466
15236
|
return tachanun(hdate, il);
|
|
15467
15237
|
}
|
|
15468
15238
|
}
|
|
15469
|
-
/**
|
|
15470
|
-
* @private
|
|
15471
|
-
*/
|
|
15472
15239
|
function isChag(date, il) {
|
|
15473
|
-
const events = getHolidaysOnDate(date, il)
|
|
15474
|
-
|
|
15475
|
-
return chag.length !== 0;
|
|
15240
|
+
const events = getHolidaysOnDate(date, il) ?? [];
|
|
15241
|
+
return events.some(ev => ev.hasFlag('CHAG'));
|
|
15476
15242
|
}
|
|
15477
15243
|
|
|
15478
15244
|
exports.AsaraBTevetEvent = AsaraBTevetEvent;
|
|
@@ -15510,6 +15276,7 @@ exports.gematriyaStrToNum = gematriyaStrToNum;
|
|
|
15510
15276
|
exports.getHolidaysOnDate = getHolidaysOnDate;
|
|
15511
15277
|
exports.getMoladAsDate = getMoladAsDate;
|
|
15512
15278
|
exports.getSedra = getSedra;
|
|
15279
|
+
exports.greg = greg;
|
|
15513
15280
|
exports.holidayDesc = holidayDesc;
|
|
15514
15281
|
exports.isAssurBemlacha = isAssurBemlacha;
|
|
15515
15282
|
exports.isAveilut = isAveilut;
|