@hebcal/core 3.41.4 → 3.42.2
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/README.md +65 -0
- package/dist/bundle.js +875 -304
- package/dist/bundle.min.js +2 -2
- package/dist/greg0.mjs +1 -1
- package/dist/hdate-bundle.js +3 -3
- package/dist/hdate-bundle.min.js +2 -2
- package/dist/hdate.js +3 -3
- package/dist/hdate.mjs +3 -3
- package/dist/hdate0-bundle.js +1 -1
- package/dist/hdate0-bundle.min.js +1 -1
- package/dist/hdate0.mjs +1 -1
- package/dist/index.js +348 -62
- package/dist/index.mjs +348 -62
- package/hebcal.d.ts +66 -7
- package/package.json +11 -11
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v3.
|
|
1
|
+
/*! @hebcal/core v3.42.2 */
|
|
2
2
|
/*
|
|
3
3
|
* More minimal greg routines
|
|
4
4
|
*/
|
|
@@ -627,8 +627,8 @@ Locale.useLocale('en');
|
|
|
627
627
|
/*
|
|
628
628
|
* More minimal HDate
|
|
629
629
|
*/
|
|
630
|
-
const NISAN$
|
|
631
|
-
const IYYAR$
|
|
630
|
+
const NISAN$4 = 1;
|
|
631
|
+
const IYYAR$2 = 2; // const SIVAN = 3;
|
|
632
632
|
|
|
633
633
|
const TAMUZ$1 = 4; // const AV = 5;
|
|
634
634
|
|
|
@@ -717,7 +717,7 @@ function hebrew2abs(year, month, day) {
|
|
|
717
717
|
tempabs += daysInMonth(m, year);
|
|
718
718
|
}
|
|
719
719
|
|
|
720
|
-
for (let m = NISAN$
|
|
720
|
+
for (let m = NISAN$4; m < month; m++) {
|
|
721
721
|
tempabs += daysInMonth(m, year);
|
|
722
722
|
}
|
|
723
723
|
} else {
|
|
@@ -802,7 +802,7 @@ function monthsInYear(year) {
|
|
|
802
802
|
|
|
803
803
|
function daysInMonth(month, year) {
|
|
804
804
|
switch (month) {
|
|
805
|
-
case IYYAR$
|
|
805
|
+
case IYYAR$2:
|
|
806
806
|
case TAMUZ$1:
|
|
807
807
|
case ELUL$2:
|
|
808
808
|
case TEVET$2:
|
|
@@ -4001,7 +4001,7 @@ function getTodayIsHe(omer) {
|
|
|
4001
4001
|
const osdate = new Date(1923, 8, 11);
|
|
4002
4002
|
const osday = greg2abs(osdate);
|
|
4003
4003
|
const nsday = greg2abs(new Date(1975, 5, 24));
|
|
4004
|
-
const
|
|
4004
|
+
const shas0 = [['Berachot', 64], ['Shabbat', 157], ['Eruvin', 105], ['Pesachim', 121], ['Shekalim', 22], ['Yoma', 88], ['Sukkah', 56], ['Beitzah', 40], ['Rosh Hashana', 35], ['Taanit', 31], ['Megillah', 32], ['Moed Katan', 29], ['Chagigah', 27], ['Yevamot', 122], ['Ketubot', 112], ['Nedarim', 91], ['Nazir', 66], ['Sotah', 49], ['Gitin', 90], ['Kiddushin', 82], ['Baba Kamma', 119], ['Baba Metzia', 119], ['Baba Batra', 176], ['Sanhedrin', 113], ['Makkot', 24], ['Shevuot', 49], ['Avodah Zarah', 76], ['Horayot', 14], ['Zevachim', 120], ['Menachot', 110], ['Chullin', 142], ['Bechorot', 61], ['Arachin', 34], ['Temurah', 34], ['Keritot', 28], ['Meilah', 22], ['Kinnim', 4], ['Tamid', 9], ['Midot', 5], ['Niddah', 73]].map(m => {
|
|
4005
4005
|
return {
|
|
4006
4006
|
name: m[0],
|
|
4007
4007
|
blatt: m[1]
|
|
@@ -4046,10 +4046,14 @@ class DafYomi {
|
|
|
4046
4046
|
let blatt = 0;
|
|
4047
4047
|
let count = -1; // Fix Shekalim for old cycles
|
|
4048
4048
|
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4049
|
+
const shortShekalim = cno <= 7;
|
|
4050
|
+
const shas = shortShekalim ? shas0.slice() : shas0;
|
|
4051
|
+
|
|
4052
|
+
if (shortShekalim) {
|
|
4053
|
+
shas[4] = {
|
|
4054
|
+
name: 'Shekalim',
|
|
4055
|
+
blatt: 13
|
|
4056
|
+
};
|
|
4053
4057
|
} // Find the daf
|
|
4054
4058
|
|
|
4055
4059
|
|
|
@@ -4492,7 +4496,7 @@ const SHAVUOT = 'Shavuot'; // 33
|
|
|
4492
4496
|
* @return {number[]}
|
|
4493
4497
|
*/
|
|
4494
4498
|
|
|
4495
|
-
function range(start, stop) {
|
|
4499
|
+
function range$1(start, stop) {
|
|
4496
4500
|
return Array.from({
|
|
4497
4501
|
length: stop - start + 1
|
|
4498
4502
|
}, (v, k) => k + start);
|
|
@@ -4510,78 +4514,78 @@ const types = {
|
|
|
4510
4514
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
4511
4515
|
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
4512
4516
|
// e.g. 5753
|
|
4513
|
-
'020': [51, 52].concat(EOY, range(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), range(33, 40), D(41), range(43, 49), D(50)),
|
|
4517
|
+
'020': [51, 52].concat(EOY, range$1(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 49), D(50)),
|
|
4514
4518
|
|
|
4515
4519
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
4516
4520
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
4517
4521
|
// e.g. 5756
|
|
4518
|
-
'0220': [51, 52].concat(EOY, range(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), 33, SHAVUOT, range(34, 37), D(38), 40, D(41), range(43, 49), D(50)),
|
|
4522
|
+
'0220': [51, 52].concat(EOY, range$1(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), 33, SHAVUOT, range$1(34, 37), D(38), 40, D(41), range$1(43, 49), D(50)),
|
|
4519
4523
|
|
|
4520
4524
|
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
4521
4525
|
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
4522
4526
|
// e.g. 5701
|
|
4523
|
-
'0510': [52].concat(YK, EOY, range(0, 20), D(21), 23, 24, PESACH1, PESACH8, 25, D(26), D(28), 30, D(31), range(33, 40), D(41), range(43, 50)),
|
|
4527
|
+
'0510': [52].concat(YK, EOY, range$1(0, 20), D(21), 23, 24, PESACH1, PESACH8, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 50)),
|
|
4524
4528
|
|
|
4525
4529
|
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
4526
4530
|
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
4527
4531
|
// e.g. 5745
|
|
4528
|
-
'0511': [52].concat(YK, EOY, range(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), range(30, 40), D(41), range(43, 50)),
|
|
4532
|
+
'0511': [52].concat(YK, EOY, range$1(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), range$1(30, 40), D(41), range$1(43, 50)),
|
|
4529
4533
|
|
|
4530
4534
|
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
4531
4535
|
* Kislev each have 30 days), and has Passover start on Sunday. */
|
|
4532
4536
|
// e.g. 5754
|
|
4533
|
-
'052': [52].concat(YK, CHMSUKOT, range(0, 24), PESACH7, 25, D(26), D(28), 30, D(31), range(33, 40), D(41), range(43, 50)),
|
|
4537
|
+
'052': [52].concat(YK, CHMSUKOT, range$1(0, 24), PESACH7, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 50)),
|
|
4534
4538
|
|
|
4535
4539
|
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev
|
|
4536
4540
|
* each have 29 days), and has Passover start on Sunday. */
|
|
4537
4541
|
// e.g. 5761
|
|
4538
|
-
'070': [].concat(RH, 52, SUKKOT, SHMINI, range(0, 20), D(21), 23, 24, PESACH7, 25, D(26), D(28), 30, D(31), range(33, 40), D(41), range(43, 50)),
|
|
4542
|
+
'070': [].concat(RH, 52, SUKKOT, SHMINI, range$1(0, 20), D(21), 23, 24, PESACH7, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 50)),
|
|
4539
4543
|
|
|
4540
4544
|
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
4541
4545
|
* Kislev each have 30 days), and has Passover start on Tuesday. */
|
|
4542
4546
|
// e.g. 5716
|
|
4543
|
-
'072': [].concat(RH, 52, SUKKOT, SHMINI, range(0, 20), D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), range(33, 40), D(41), range(43, 49), D(50)),
|
|
4547
|
+
'072': [].concat(RH, 52, SUKKOT, SHMINI, range$1(0, 20), D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 49), D(50)),
|
|
4544
4548
|
|
|
4545
4549
|
/* -- The leap year types (keviot) -- */
|
|
4546
4550
|
|
|
4547
4551
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
4548
4552
|
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
4549
4553
|
// e.g. 5746
|
|
4550
|
-
'1200': [51, 52].concat(CHMSUKOT, range(0, 27), CHMPESACH, range(28, 33), SHAVUOT, range(34, 37), D(38), 40, D(41), range(43, 49), D(50)),
|
|
4554
|
+
'1200': [51, 52].concat(CHMSUKOT, range$1(0, 27), CHMPESACH, range$1(28, 33), SHAVUOT, range$1(34, 37), D(38), 40, D(41), range$1(43, 49), D(50)),
|
|
4551
4555
|
|
|
4552
4556
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
4553
4557
|
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
4554
4558
|
// e.g. 5746
|
|
4555
|
-
'1201': [51, 52].concat(CHMSUKOT, range(0, 27), CHMPESACH, range(28, 40), D(41), range(43, 49), D(50)),
|
|
4559
|
+
'1201': [51, 52].concat(CHMSUKOT, range$1(0, 27), CHMPESACH, range$1(28, 40), D(41), range$1(43, 49), D(50)),
|
|
4556
4560
|
|
|
4557
4561
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
4558
4562
|
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
4559
4563
|
// e.g.5752
|
|
4560
|
-
'1220': [51, 52].concat(CHMSUKOT, range(0, 27), PESACH1, PESACH8, range(28, 40), D(41), range(43, 50)),
|
|
4564
|
+
'1220': [51, 52].concat(CHMSUKOT, range$1(0, 27), PESACH1, PESACH8, range$1(28, 40), D(41), range$1(43, 50)),
|
|
4561
4565
|
|
|
4562
4566
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
4563
4567
|
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
4564
4568
|
// e.g.5752
|
|
4565
|
-
'1221': [51, 52].concat(CHMSUKOT, range(0, 27), PESACH, range(28, 50)),
|
|
4569
|
+
'1221': [51, 52].concat(CHMSUKOT, range$1(0, 27), PESACH, range$1(28, 50)),
|
|
4566
4570
|
|
|
4567
4571
|
/* Hebrew year that starts on Thursday, is `incomplete' (Heshvan and
|
|
4568
4572
|
* Kislev both have 29 days), and has Passover start on Sunday. */
|
|
4569
4573
|
// e.g. 5768
|
|
4570
|
-
'150': [52].concat(YK, CHMSUKOT, range(0, 28), PESACH7, range(29, 50)),
|
|
4574
|
+
'150': [52].concat(YK, CHMSUKOT, range$1(0, 28), PESACH7, range$1(29, 50)),
|
|
4571
4575
|
|
|
4572
4576
|
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
4573
4577
|
* Kislev both have 30 days), and has Passover start on Tuesday. */
|
|
4574
4578
|
// eg. 5771
|
|
4575
|
-
'152': [52].concat(YK, CHMSUKOT, range(0, 28), CHMPESACH, range(29, 49), D(50)),
|
|
4579
|
+
'152': [52].concat(YK, CHMSUKOT, range$1(0, 28), CHMPESACH, range$1(29, 49), D(50)),
|
|
4576
4580
|
|
|
4577
4581
|
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and
|
|
4578
4582
|
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
4579
4583
|
// e.g.5757
|
|
4580
|
-
'170': [].concat(RH, 52, SUKKOT, SHMINI, range(0, 27), CHMPESACH, range(28, 40), D(41), range(43, 49), D(50)),
|
|
4584
|
+
'170': [].concat(RH, 52, SUKKOT, SHMINI, range$1(0, 27), CHMPESACH, range$1(28, 40), D(41), range$1(43, 49), D(50)),
|
|
4581
4585
|
|
|
4582
4586
|
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
4583
4587
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
4584
|
-
'1720': [].concat(RH, 52, SUKKOT, SHMINI, range(0, 27), CHMPESACH, range(28, 33), SHAVUOT, range(34, 37), D(38), 40, D(41), range(43, 49), D(50))
|
|
4588
|
+
'1720': [].concat(RH, 52, SUKKOT, SHMINI, range$1(0, 27), CHMPESACH, range$1(28, 33), SHAVUOT, range$1(34, 37), D(38), 40, D(41), range$1(43, 49), D(50))
|
|
4585
4589
|
};
|
|
4586
4590
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
4587
4591
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
@@ -4683,6 +4687,70 @@ class ParshaEvent extends Event {
|
|
|
4683
4687
|
|
|
4684
4688
|
}
|
|
4685
4689
|
|
|
4690
|
+
const SUN$1 = 0;
|
|
4691
|
+
const TUE$1 = 2;
|
|
4692
|
+
const FRI$2 = 5;
|
|
4693
|
+
const SAT$2 = 6;
|
|
4694
|
+
const NISAN$3 = months.NISAN;
|
|
4695
|
+
const IYYAR$1 = months.IYYAR;
|
|
4696
|
+
/**
|
|
4697
|
+
* Yom HaShoah first observed in 1951.
|
|
4698
|
+
* When the actual date of Yom Hashoah falls on a Friday, the
|
|
4699
|
+
* state of Israel observes Yom Hashoah on the preceding
|
|
4700
|
+
* Thursday. When it falls on a Sunday, Yom Hashoah is observed
|
|
4701
|
+
* on the following Monday.
|
|
4702
|
+
* http://www.ushmm.org/remembrance/dor/calendar/
|
|
4703
|
+
* @private
|
|
4704
|
+
* @param {number} year
|
|
4705
|
+
* @return {HDate|null}
|
|
4706
|
+
*/
|
|
4707
|
+
|
|
4708
|
+
function dateYomHaShoah(year) {
|
|
4709
|
+
if (year < 5711) {
|
|
4710
|
+
return null;
|
|
4711
|
+
}
|
|
4712
|
+
|
|
4713
|
+
let nisan27dt = new HDate(27, NISAN$3, year);
|
|
4714
|
+
|
|
4715
|
+
if (nisan27dt.getDay() === FRI$2) {
|
|
4716
|
+
nisan27dt = new HDate(26, NISAN$3, year);
|
|
4717
|
+
} else if (nisan27dt.getDay() === SUN$1) {
|
|
4718
|
+
nisan27dt = new HDate(28, NISAN$3, year);
|
|
4719
|
+
}
|
|
4720
|
+
|
|
4721
|
+
return nisan27dt;
|
|
4722
|
+
}
|
|
4723
|
+
/**
|
|
4724
|
+
* Yom HaAtzma'ut only celebrated after 1948
|
|
4725
|
+
* @private
|
|
4726
|
+
* @param {number} year
|
|
4727
|
+
* @return {HDate|null}
|
|
4728
|
+
*/
|
|
4729
|
+
|
|
4730
|
+
function dateYomHaZikaron(year) {
|
|
4731
|
+
if (year < 5708) {
|
|
4732
|
+
return null;
|
|
4733
|
+
}
|
|
4734
|
+
|
|
4735
|
+
let day;
|
|
4736
|
+
const pesach = new HDate(15, NISAN$3, year);
|
|
4737
|
+
const pdow = pesach.getDay();
|
|
4738
|
+
|
|
4739
|
+
if (pdow === SUN$1) {
|
|
4740
|
+
day = 2;
|
|
4741
|
+
} else if (pdow === SAT$2) {
|
|
4742
|
+
day = 3;
|
|
4743
|
+
} else if (year < 5764) {
|
|
4744
|
+
day = 4;
|
|
4745
|
+
} else if (pdow === TUE$1) {
|
|
4746
|
+
day = 5;
|
|
4747
|
+
} else {
|
|
4748
|
+
day = 4;
|
|
4749
|
+
}
|
|
4750
|
+
|
|
4751
|
+
return new HDate(day, IYYAR$1, year);
|
|
4752
|
+
}
|
|
4753
|
+
|
|
4686
4754
|
/*
|
|
4687
4755
|
Hebcal - A Jewish Calendar Generator
|
|
4688
4756
|
Copyright (c) 1994-2020 Danny Sadinoff
|
|
@@ -5230,42 +5298,16 @@ function getHolidaysForYear_(year) {
|
|
|
5230
5298
|
}));
|
|
5231
5299
|
}
|
|
5232
5300
|
|
|
5233
|
-
|
|
5234
|
-
// Yom HaShoah first observed in 1951
|
|
5235
|
-
let nisan27dt = new HDate(27, NISAN$2, year);
|
|
5236
|
-
/* When the actual date of Yom Hashoah falls on a Friday, the
|
|
5237
|
-
* state of Israel observes Yom Hashoah on the preceding
|
|
5238
|
-
* Thursday. When it falls on a Sunday, Yom Hashoah is observed
|
|
5239
|
-
* on the following Monday.
|
|
5240
|
-
* http://www.ushmm.org/remembrance/dor/calendar/
|
|
5241
|
-
*/
|
|
5242
|
-
|
|
5243
|
-
if (nisan27dt.getDay() == FRI$1) {
|
|
5244
|
-
nisan27dt = new HDate(26, NISAN$2, year);
|
|
5245
|
-
} else if (nisan27dt.getDay() == SUN) {
|
|
5246
|
-
nisan27dt = new HDate(28, NISAN$2, year);
|
|
5247
|
-
}
|
|
5301
|
+
const nisan27dt = dateYomHaShoah(year);
|
|
5248
5302
|
|
|
5303
|
+
if (nisan27dt) {
|
|
5249
5304
|
add(new HolidayEvent(nisan27dt, 'Yom HaShoah', MODERN_HOLIDAY$1));
|
|
5250
5305
|
}
|
|
5251
5306
|
|
|
5252
|
-
|
|
5253
|
-
// Yom HaAtzma'ut only celebrated after 1948
|
|
5254
|
-
let day;
|
|
5255
|
-
|
|
5256
|
-
if (pesach.getDay() == SUN) {
|
|
5257
|
-
day = 2;
|
|
5258
|
-
} else if (pesach.getDay() == SAT$1) {
|
|
5259
|
-
day = 3;
|
|
5260
|
-
} else if (year < 5764) {
|
|
5261
|
-
day = 4;
|
|
5262
|
-
} else if (pesach.getDay() == TUE) {
|
|
5263
|
-
day = 5;
|
|
5264
|
-
} else {
|
|
5265
|
-
day = 4;
|
|
5266
|
-
}
|
|
5307
|
+
const yomHaZikaronDt = dateYomHaZikaron(year);
|
|
5267
5308
|
|
|
5268
|
-
|
|
5309
|
+
if (yomHaZikaronDt) {
|
|
5310
|
+
add(new HolidayEvent(yomHaZikaronDt, 'Yom HaZikaron', MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(yomHaZikaronDt.next(), 'Yom HaAtzma\'ut', MODERN_HOLIDAY$1, emojiIsraelFlag));
|
|
5269
5311
|
}
|
|
5270
5312
|
|
|
5271
5313
|
if (year >= 5727) {
|
|
@@ -5609,14 +5651,14 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
|
5609
5651
|
return new HDate(day, month, hyear);
|
|
5610
5652
|
}
|
|
5611
5653
|
|
|
5612
|
-
const version="3.
|
|
5654
|
+
const version="3.42.2";
|
|
5613
5655
|
|
|
5614
|
-
const headers$1={"plural-forms":"nplurals=2; plural=(n > 1);"
|
|
5656
|
+
const headers$1={"plural-forms":"nplurals=2; plural=(n > 1);"};const contexts$1={"":{Berachot:["Berachos"],Shabbat:["Shabbos"],Taanit:["Taanis"],Yevamot:["Yevamos"],Ketubot:["Kesubos"],"Baba Batra":["Baba Basra"],Makkot:["Makkos"],Shevuot:["Shevuos"],Horayot:["Horayos"],Menachot:["Menachos"],Bechorot:["Bechoros"],Keritot:["Kerisos"],Midot:["Midos"],"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"],"Purim Katan":["Purim Koton"],Tazria:["Sazria"],"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)"],"Ta'anit Bechorot":["Ta'anis Bechoros"],"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"],Tevet:["Teves"],"Asara B'Tevet":["Asara B'Teves"],Berakhot:["Berakhos"],Sheviit:["Sheviis"],Terumot:["Terumos"],Maasrot:["Maasros"],Eduyot:["Eduyos"],Avot:["Avos"],Bekhorot:["Bekhoros"],Middot:["Middos"],Oholot:["Oholos"],Tahorot:["Tahoros"],Mikvaot:["Mikvaos"],"Alot HaShachar":["Alos HaShachar"],Misheyakir:["Misheyakir"],"Kriat Shema, sof zeman":["Krias Shema, sof zman"],"Tefilah, sof zeman":["Tefilah, sof zman"],"Chatzot hayom":["Chatzos"],"Tzait HaKochavim":["Tzeis HaKochavim"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
|
|
5615
5657
|
|
|
5616
5658
|
Locale.addLocale('ashkenazi', poAshkenazi);
|
|
5617
5659
|
Locale.addLocale('a', poAshkenazi);
|
|
5618
5660
|
|
|
5619
|
-
const headers={"plural-forms":"nplurals=2; plural=(n > 1);"
|
|
5661
|
+
const headers={"plural-forms":"nplurals=2; plural=(n > 1);"};const contexts={"":{Berachot:["ברכות"],Shabbat:["שַׁבָּת"],Eruvin:["עירובין"],Pesachim:["פסחים"],Shekalim:["שקלים"],Yoma:["יומא"],Sukkah:["סוכה"],Beitzah:["ביצה"],Taanit:["תענית"],Megillah:["מגילה"],"Moed Katan":["מועד קטן"],Chagigah:["חגיגה"],Yevamot:["יבמות"],Ketubot:["כתובות"],Nedarim:["נדרים"],Nazir:["נזיר"],Sotah:["סוטה"],Gitin:["גיטין"],Kiddushin:["קידושין"],"Baba Kamma":["בבא קמא"],"Baba Metzia":["בבא מציעא"],"Baba Batra":["בבא בתרא"],Sanhedrin:["סנהדרין"],Makkot:["מכות"],Shevuot:["שבועות"],"Avodah Zarah":["עבודה זרה"],Horayot:["הוריות"],Zevachim:["זבחים"],Menachot:["מנחות"],Chullin:["חולין"],Bechorot:["בכורות"],Arachin:["ערכין"],Temurah:["תמורה"],Keritot:["כריתות"],Meilah:["מעילה"],Kinnim:["קינים"],Tamid:["תמיד"],Midot:["מדות"],Niddah:["נדה"],"Daf Yomi: %s %d":["דף יומי: %s %d"],"Daf Yomi":["דף יומי"],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":["פֶּסַח ח׳"],Purim:["פּוּרִים"],"Purim Katan":["פּוּרִים קָטָן"],"Rosh Chodesh %s":["רֹאשׁ חוֹדֶשׁ %s"],"Rosh Chodesh":["רֹאשׁ חוֹדֶשׁ"],Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִשְׁרֵי"],"Rosh Hashana":["רֹאשׁ הַשָּׁנָה"],"Rosh Hashana I":["רֹאשׁ הַשָּׁנָה א׳"],"Rosh Hashana II":["רֹאשׁ הַשָּׁנָה ב׳"],"Shabbat Chazon":["שַׁבָּת חֲזוֹן"],"Shabbat HaChodesh":["שַׁבָּת הַחֹדֶשׁ"],"Shabbat HaGadol":["שַׁבָּת הַגָּדוֹל"],"Shabbat Machar Chodesh":["שַׁבָּת מָחָר חוֹדֶשׁ"],"Shabbat Nachamu":["שַׁבָּת נַחֲמוּ"],"Shabbat Parah":["שַׁבָּת פּרה"],"Shabbat Rosh Chodesh":["שַׁבָּת רֹאשׁ חוֹדֶשׁ"],"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)":["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],"Ta'anit Bechorot":["תַּעֲנִית בְּכוֹרוֹת"],"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":["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"],"Pesach I (on Shabbat)":["פֶּסַח יוֹם א׳ (בְּשַׁבָּת)"],"Pesach Chol ha-Moed Day 1":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם א׳"],"Pesach Chol ha-Moed Day 2":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ב׳"],"Pesach Chol ha-Moed Day 3":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ג׳"],"Pesach Chol ha-Moed Day 4":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ד׳"],"Pesach Chol ha-Moed Day 5":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ה׳"],"Pesach Shabbat Chol ha-Moed":["פֶּסַח שַׁבָּת חוֹל הַמּוֹעֵד"],"Shavuot II (on Shabbat)":["שָׁבוּעוֹת יוֹם ב׳ (בְּשַׁבָּת)"],"Rosh Hashana I (on Shabbat)":["רֹאשׁ הַשָּׁנָה יוֹם א׳ (בְּשַׁבָּת)"],"Yom Kippur (on Shabbat)":["יוֹם כִּפּוּר (בְּשַׁבָּת)"],"Yom Kippur (Mincha, Traditional)":["יוֹם כִּפּוּר מנחה"],"Yom Kippur (Mincha, Alternate)":["יוֹם כִּפּוּר מנחה"],"Sukkot I (on Shabbat)":["סוּכּוֹת יוֹם א׳ (בְּשַׁבָּת)"],"Sukkot Chol ha-Moed Day 1":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם א׳"],"Sukkot Chol ha-Moed Day 2":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ב׳"],"Sukkot Chol ha-Moed Day 3":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ג׳"],"Sukkot Chol ha-Moed Day 4":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ד׳"],"Sukkot Chol ha-Moed Day 5":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ה׳"],"Sukkot Shabbat Chol ha-Moed":["סוּכּוֹת שַׁבָּת חוֹל הַמּוֹעֵד"],"Sukkot Final Day (Hoshana Raba)":["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],"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 Tevet":["רֹאשׁ חוֹדֶשׁ טֵבֵת"],min:["דקות"],"Fast begins":["תחילת הַצוֹם"],"Fast ends":["סִיּוּם הַצוֹם"],"Rosh Hashana LaBehemot":["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"],"Tish'a B'Av (observed)":["תִּשְׁעָה בְּאָב נִדחֶה"],"Shabbat Mevarchim Chodesh":["שַׁבָּת מברכים חוֹדֶשׁ"],"Shabbat Shirah":["שַׁבָּת שִׁירָה"],chatzotNight:["חֲצוֹת הַלַיְלָה"],alotHaShachar:["עֲלוֹת הַשַּׁחַר"],misheyakir:["משיכיר - זמן ציצית ותפילין"],misheyakirMachmir:["משיכיר - זמן ציצית ותפילין"],neitzHaChama:["הַנֵץ הַחַמָּה"],sofZmanShma:["סוֹף זְמַן קְרִיאַת שְׁמַע גר״א"],sofZmanTfilla:["סוֹף זְמַן תְּפִלָּה גר״א"],chatzot:["חֲצוֹת הַיּוֹם"],minchaGedola:["מִנְחָה גְּדוֹלָה"],minchaKetana:["מִנְחָה קְטַנָּה"],plagHaMincha:["פְּלַג הַמִּנְחָה"],shkiah:["שְׁקִיעָה"],"Nightfall - End of ordained fasts":["לַיְלָה - גמר תעניות דרבנן"],tzeit:["צֵאת כוכבים"],Lovingkindness:["חֶֽסֶד"],Might:["גְבוּרָה"],Beauty:["תִּפאֶרֶת"],Eternity:["נֶּֽצַח"],Splendor:["הוֹד"],Foundation:["יְּסוֹד"],Majesty:["מַּלְכוּת"],day:["יוֹם"],"Chanukah Day 1":["חֲנוּכָּה יוֹם א׳"],"Chanukah Day 2":["חֲנוּכָּה יוֹם ב׳"],"Chanukah Day 3":["חֲנוּכָּה יוֹם ג׳"],"Chanukah Day 4":["חֲנוּכָּה יוֹם ד׳"],"Chanukah Day 5":["חֲנוּכָּה יוֹם ה׳"],"Chanukah Day 6":["חֲנוּכָּה יוֹם ו׳"],"Chanukah Day 7":["חֲנוּכָּה יוֹם ז׳"],"Chanukah Day 7 (on Rosh Chodesh)":["חֲנוּכָּה יוֹם ז׳ (רֹאשׁ חוֹדֶשׁ)"],"Chanukah Day 8":["חֲנוּכָּה יוֹם ח׳"],Berakhot:["ברכות"],Peah:["פאה"],Demai:["דמאי"],Kilayim:["כלאים"],Sheviit:["שביעית"],Terumot:["תרומות"],Maasrot:["מעשרות"],"Maaser Sheni":["מעשר שני"],Challah:["חלה"],Orlah:["ערלה"],Bikkurim:["ביכורים"],"Rosh Hashanah":["ראש השנה"],Gittin:["גיטין"],"Bava Kamma":["בבא קמא"],"Bava Metzia":["בבא מציעא"],"Bava Batra":["בבא בתרא"],Eduyot:["עדיות"],Avot:["אבות"],Bekhorot:["בכורות"],Arakhin:["ערכין"],Middot:["מדות"],Kelim:["כלים"],Oholot:["אהלות"],Negaim:["נגעים"],Parah:["פרה"],Tahorot:["טהרות"],Mikvaot:["מקואות"],Makhshirin:["מכשירין"],Zavim:["זבים"],"Tevul Yom":["טבול יום"],Yadayim:["ידים"],Oktzin:["עוקצים"],"Yom Kippur Katan":["יוֹם כִּפּוּר קָטָן"]}};var poHe = {headers:headers,contexts:contexts};
|
|
5620
5662
|
|
|
5621
5663
|
Locale.addLocale('he', poHe);
|
|
5622
5664
|
Locale.addLocale('h', poHe);
|
|
@@ -5633,6 +5675,186 @@ const poHeNoNikud = {
|
|
|
5633
5675
|
};
|
|
5634
5676
|
Locale.addLocale('he-x-NoNikud', poHeNoNikud);
|
|
5635
5677
|
|
|
5678
|
+
const NONE$1 = 0;
|
|
5679
|
+
const HALF = 1;
|
|
5680
|
+
const WHOLE = 2;
|
|
5681
|
+
/**
|
|
5682
|
+
* @private
|
|
5683
|
+
* @param {Event[]} events
|
|
5684
|
+
* @param {HDate} hdate
|
|
5685
|
+
* @return {number}
|
|
5686
|
+
*/
|
|
5687
|
+
|
|
5688
|
+
function hallel_(events, hdate) {
|
|
5689
|
+
const whole = events.filter(ev => {
|
|
5690
|
+
/** @type {string} */
|
|
5691
|
+
const desc = ev.getDesc();
|
|
5692
|
+
/** @type {HDate} */
|
|
5693
|
+
|
|
5694
|
+
const hd = ev.getDate();
|
|
5695
|
+
const month = hd.getMonth();
|
|
5696
|
+
const mday = hd.getDate();
|
|
5697
|
+
return desc.startsWith('Chanukah') || desc.startsWith('Shavuot') || desc.startsWith('Sukkot') || month === months.NISAN && (mday === 15 || mday === 16) && ev.getFlags() & flags.CHAG || // Pesach
|
|
5698
|
+
desc === 'Yom HaAtzma\'ut' || desc === 'Yom Yerushalayim';
|
|
5699
|
+
}).map(ev => {
|
|
5700
|
+
return ev.getDate().abs();
|
|
5701
|
+
});
|
|
5702
|
+
const abs = hdate.abs();
|
|
5703
|
+
|
|
5704
|
+
if (whole.includes(abs)) {
|
|
5705
|
+
return WHOLE;
|
|
5706
|
+
}
|
|
5707
|
+
|
|
5708
|
+
const half = events.filter(ev => {
|
|
5709
|
+
const desc = ev.getDesc();
|
|
5710
|
+
return ev.getFlags() & flags.ROSH_CHODESH || desc.startsWith('Pesach') && desc !== 'Pesach I' && desc !== 'Pesach II';
|
|
5711
|
+
}).map(ev => {
|
|
5712
|
+
return ev.getDate().abs();
|
|
5713
|
+
});
|
|
5714
|
+
|
|
5715
|
+
if (half.includes(abs)) {
|
|
5716
|
+
return HALF;
|
|
5717
|
+
}
|
|
5718
|
+
|
|
5719
|
+
return NONE$1;
|
|
5720
|
+
}
|
|
5721
|
+
|
|
5722
|
+
/**
|
|
5723
|
+
* @private
|
|
5724
|
+
* @param {number} start
|
|
5725
|
+
* @param {number} end
|
|
5726
|
+
* @return {number[]}
|
|
5727
|
+
*/
|
|
5728
|
+
|
|
5729
|
+
function range(start, end) {
|
|
5730
|
+
const arr = [];
|
|
5731
|
+
|
|
5732
|
+
for (let i = start; i <= end; i++) {
|
|
5733
|
+
arr.push(i);
|
|
5734
|
+
}
|
|
5735
|
+
|
|
5736
|
+
return arr;
|
|
5737
|
+
}
|
|
5738
|
+
|
|
5739
|
+
const cache = Object.create(null);
|
|
5740
|
+
const NONE = {
|
|
5741
|
+
shacharit: false,
|
|
5742
|
+
mincha: false,
|
|
5743
|
+
allCongs: false
|
|
5744
|
+
};
|
|
5745
|
+
/**
|
|
5746
|
+
* @private
|
|
5747
|
+
* @param {HDate} hdate
|
|
5748
|
+
* @param {boolean} il
|
|
5749
|
+
* @return {TachanunResult}
|
|
5750
|
+
*/
|
|
5751
|
+
|
|
5752
|
+
function tachanun_(hdate, il) {
|
|
5753
|
+
return tachanun0(hdate, il, true);
|
|
5754
|
+
}
|
|
5755
|
+
/**
|
|
5756
|
+
* @private
|
|
5757
|
+
* @param {HDate} hdate
|
|
5758
|
+
* @param {boolean} il
|
|
5759
|
+
* @param {boolean} checkNext
|
|
5760
|
+
* @return {TachanunResult}
|
|
5761
|
+
*/
|
|
5762
|
+
|
|
5763
|
+
function tachanun0(hdate, il, checkNext) {
|
|
5764
|
+
const year = hdate.getFullYear();
|
|
5765
|
+
const key = `${year}-${il ? 1 : 0}`;
|
|
5766
|
+
const dates = cache[key] = cache[key] || tachanunYear(year, il);
|
|
5767
|
+
const abs = hdate.abs();
|
|
5768
|
+
|
|
5769
|
+
if (dates.none.indexOf(abs) > -1) {
|
|
5770
|
+
return NONE;
|
|
5771
|
+
}
|
|
5772
|
+
|
|
5773
|
+
const dow = hdate.getDay();
|
|
5774
|
+
const ret = {
|
|
5775
|
+
shacharit: false,
|
|
5776
|
+
mincha: false,
|
|
5777
|
+
allCongs: false
|
|
5778
|
+
};
|
|
5779
|
+
|
|
5780
|
+
if (dates.some.indexOf(abs) === -1) {
|
|
5781
|
+
ret.allCongs = true;
|
|
5782
|
+
}
|
|
5783
|
+
|
|
5784
|
+
if (dow !== 6) {
|
|
5785
|
+
ret.shacharit = true;
|
|
5786
|
+
}
|
|
5787
|
+
|
|
5788
|
+
const tomorrow = abs + 1;
|
|
5789
|
+
|
|
5790
|
+
if (checkNext && dates.yesPrev.indexOf(tomorrow) === -1) {
|
|
5791
|
+
const tmp = tachanun0(new HDate(tomorrow), il, false);
|
|
5792
|
+
ret.mincha = tmp.shacharit;
|
|
5793
|
+
} else {
|
|
5794
|
+
ret.mincha = dow !== 5;
|
|
5795
|
+
}
|
|
5796
|
+
|
|
5797
|
+
if (ret.allCongs && !ret.mincha && !ret.shacharit) {
|
|
5798
|
+
return NONE;
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5801
|
+
return ret;
|
|
5802
|
+
}
|
|
5803
|
+
/**
|
|
5804
|
+
* @private
|
|
5805
|
+
* @param {number} year
|
|
5806
|
+
* @param {boolean} il
|
|
5807
|
+
* @return {*}
|
|
5808
|
+
*/
|
|
5809
|
+
|
|
5810
|
+
|
|
5811
|
+
function tachanunYear(year, il) {
|
|
5812
|
+
const leap = HDate.isLeapYear(year);
|
|
5813
|
+
const monthsInYear = 12 + leap;
|
|
5814
|
+
let av9dt = new HDate(9, months.AV, year);
|
|
5815
|
+
|
|
5816
|
+
if (av9dt.getDay() === 6) {
|
|
5817
|
+
av9dt = av9dt.next();
|
|
5818
|
+
}
|
|
5819
|
+
|
|
5820
|
+
let shushPurim = new HDate(15, months.ADAR_II, year);
|
|
5821
|
+
|
|
5822
|
+
if (shushPurim.getDay() === 6) {
|
|
5823
|
+
shushPurim = shushPurim.next();
|
|
5824
|
+
}
|
|
5825
|
+
|
|
5826
|
+
const none = [].concat( // Rosh Chodesh - 1st of every month. Also includes RH day 1 (1 Tishrei)
|
|
5827
|
+
range(1, monthsInYear).map(month => new HDate(1, month, year)), // Rosh Chodesh - 30th of months that have one
|
|
5828
|
+
range(1, monthsInYear).filter(month => HDate.daysInMonth(month, year) === 30).map(month => new HDate(30, month, year)), new HDate(2, months.TISHREI, year), // Rosh Hashana II
|
|
5829
|
+
// entire month of Nisan
|
|
5830
|
+
range(1, HDate.daysInMonth(months.NISAN, year)).map(mday => new HDate(mday, months.NISAN, year)), new HDate(18, months.IYYAR, year), // Lag BaOmer
|
|
5831
|
+
// Rosh Chodesh Sivan thru Isru Chag
|
|
5832
|
+
range(1, 8 - (il ? 1 : 0)).map(mday => new HDate(mday, months.SIVAN, year)), av9dt, // Tisha B'Av
|
|
5833
|
+
new HDate(15, months.AV, year), // Tu B'Av
|
|
5834
|
+
new HDate(29, months.ELUL, year), // Erev Rosh Hashanah
|
|
5835
|
+
// Erev Yom Kippur thru Isru Chag
|
|
5836
|
+
range(9, 24 - (il ? 1 : 0)).map(mday => new HDate(mday, months.TISHREI, year)), // Chanukah
|
|
5837
|
+
range(25, 33).map(mday => new HDate(mday, months.KISLEV, year)), new HDate(15, months.SHVAT, year), // Tu BiShvat
|
|
5838
|
+
new HDate(14, months.ADAR_II, year), // Purim
|
|
5839
|
+
shushPurim, leap ? new HDate(14, months.ADAR_I, year) : [] // Purim Katan
|
|
5840
|
+
);
|
|
5841
|
+
const some = [].concat( // Until 14 Sivan
|
|
5842
|
+
range(1, 13).map(mday => new HDate(mday, months.SIVAN, year)), // Until after Rosh Chodesh Cheshvan
|
|
5843
|
+
range(20, 31).map(mday => new HDate(mday, months.TISHREI, year)), new HDate(14, months.IYYAR, year), // Pesach Sheini
|
|
5844
|
+
// Yom HaAtzma'ut, which changes based on day of week
|
|
5845
|
+
year >= 5708 ? dateYomHaZikaron(year).next() : [], // Yom Yerushalayim
|
|
5846
|
+
year >= 5727 ? new HDate(28, months.IYYAR, year) : []);
|
|
5847
|
+
const yesPrev = [].concat(new HDate(29, months.ELUL, year - 1), // Erev Rosh Hashanah
|
|
5848
|
+
new HDate(9, months.TISHREI, year), // Erev Yom Kippur
|
|
5849
|
+
new HDate(14, months.IYYAR, year) // Pesach Sheini
|
|
5850
|
+
);
|
|
5851
|
+
return {
|
|
5852
|
+
none: none.map(hd => hd.abs()).sort(),
|
|
5853
|
+
some: some.map(hd => hd.abs()).sort(),
|
|
5854
|
+
yesPrev: yesPrev.map(hd => hd.abs()).sort()
|
|
5855
|
+
};
|
|
5856
|
+
}
|
|
5857
|
+
|
|
5636
5858
|
/*
|
|
5637
5859
|
Hebcal - A Jewish Calendar Generator
|
|
5638
5860
|
Copyright (c) 1994-2020 Danny Sadinoff
|
|
@@ -5827,6 +6049,13 @@ function checkCandleOptions(options) {
|
|
|
5827
6049
|
* Possible values are `true` and `false`; the default is locale dependent.
|
|
5828
6050
|
*/
|
|
5829
6051
|
|
|
6052
|
+
/**
|
|
6053
|
+
* @typedef {Object} TachanunResult
|
|
6054
|
+
* @property {boolean} shacharit Tachanun is said at Shacharit
|
|
6055
|
+
* @property {boolean} mincha Tachanun is said at Mincha
|
|
6056
|
+
* @property {boolean} allCongs All congregations say Tachanun on the day
|
|
6057
|
+
*/
|
|
6058
|
+
|
|
5830
6059
|
/**
|
|
5831
6060
|
* Gets the R.D. days for a number, Date, or HDate
|
|
5832
6061
|
* @private
|
|
@@ -6040,6 +6269,8 @@ function observedInIsrael(ev) {
|
|
|
6040
6269
|
function observedInDiaspora(ev) {
|
|
6041
6270
|
return ev.observedInDiaspora();
|
|
6042
6271
|
}
|
|
6272
|
+
|
|
6273
|
+
const yearArrayCache = Object.create(null);
|
|
6043
6274
|
/**
|
|
6044
6275
|
* HebrewCalendar is the main interface to the `@hebcal/core` library.
|
|
6045
6276
|
* This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
|
|
@@ -6047,7 +6278,6 @@ function observedInDiaspora(ev) {
|
|
|
6047
6278
|
* Event names can be rendered in several languges using the `locale` option.
|
|
6048
6279
|
*/
|
|
6049
6280
|
|
|
6050
|
-
|
|
6051
6281
|
class HebrewCalendar {
|
|
6052
6282
|
/**
|
|
6053
6283
|
* Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
|
|
@@ -6383,10 +6613,17 @@ class HebrewCalendar {
|
|
|
6383
6613
|
|
|
6384
6614
|
|
|
6385
6615
|
static getHolidaysForYearArray(year, il) {
|
|
6616
|
+
const cacheKey = `${year}-${il ? 1 : 0}`;
|
|
6617
|
+
let events = yearArrayCache[cacheKey];
|
|
6618
|
+
|
|
6619
|
+
if (events) {
|
|
6620
|
+
return events;
|
|
6621
|
+
}
|
|
6622
|
+
|
|
6386
6623
|
const yearMap = getHolidaysForYear_(year);
|
|
6387
6624
|
const startAbs = HDate.hebrew2abs(year, TISHREI, 1);
|
|
6388
6625
|
const endAbs = HDate.hebrew2abs(year + 1, TISHREI, 1) - 1;
|
|
6389
|
-
|
|
6626
|
+
events = [];
|
|
6390
6627
|
const myFilter = il ? observedInIsrael : observedInDiaspora;
|
|
6391
6628
|
|
|
6392
6629
|
for (let absDt = startAbs; absDt <= endAbs; absDt++) {
|
|
@@ -6399,6 +6636,7 @@ class HebrewCalendar {
|
|
|
6399
6636
|
}
|
|
6400
6637
|
}
|
|
6401
6638
|
|
|
6639
|
+
yearArrayCache[cacheKey] = events;
|
|
6402
6640
|
return events;
|
|
6403
6641
|
}
|
|
6404
6642
|
/**
|
|
@@ -6476,6 +6714,54 @@ class HebrewCalendar {
|
|
|
6476
6714
|
static getSedra(hyear, il) {
|
|
6477
6715
|
return getSedra_(hyear, il);
|
|
6478
6716
|
}
|
|
6717
|
+
/**
|
|
6718
|
+
* Return a number containing information on what Hallel is said on that day.
|
|
6719
|
+
*
|
|
6720
|
+
* Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
|
|
6721
|
+
* Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
6722
|
+
*
|
|
6723
|
+
* Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
|
|
6724
|
+
*
|
|
6725
|
+
* The number is one of the following values:
|
|
6726
|
+
*
|
|
6727
|
+
* 0 - No Hallel
|
|
6728
|
+
* 1 - Half Hallel
|
|
6729
|
+
* 2 - Whole Hallel
|
|
6730
|
+
*
|
|
6731
|
+
* @param {HDate} hdate
|
|
6732
|
+
* @param {boolean} il
|
|
6733
|
+
* @return {number}
|
|
6734
|
+
*/
|
|
6735
|
+
|
|
6736
|
+
|
|
6737
|
+
static hallel(hdate, il) {
|
|
6738
|
+
const events = HebrewCalendar.getHolidaysForYearArray(hdate.getFullYear(), il);
|
|
6739
|
+
return hallel_(events, hdate);
|
|
6740
|
+
}
|
|
6741
|
+
/**
|
|
6742
|
+
* Return details on what Tachanun (or Tzidchatcha on Shabbat) is said on `hdate`.
|
|
6743
|
+
*
|
|
6744
|
+
* Tachanun is not said on Rosh Chodesh, the month of Nisan, Lag Baomer,
|
|
6745
|
+
* Rosh Chodesh Sivan until Isru Chag, Tisha B'av, 15 Av, Erev Rosh Hashanah,
|
|
6746
|
+
* Rosh Hashanah, Erev Yom Kippur until after Simchat Torah, Chanukah,
|
|
6747
|
+
* Tu B'shvat, Purim and Shushan Purim, and Purim and Shushan Purim Katan.
|
|
6748
|
+
*
|
|
6749
|
+
* In some congregations Tachanun is not said until from Rosh Chodesh Sivan
|
|
6750
|
+
* until 14th Sivan, Sukkot until after Rosh Chodesh Cheshvan, Pesach Sheini,
|
|
6751
|
+
* Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
6752
|
+
*
|
|
6753
|
+
* Tachanun is not said at Mincha on days before it is not said at Shacharit.
|
|
6754
|
+
*
|
|
6755
|
+
* Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.
|
|
6756
|
+
* @param {HDate} hdate
|
|
6757
|
+
* @param {boolean} il
|
|
6758
|
+
* @return {TachanunResult}
|
|
6759
|
+
*/
|
|
6760
|
+
|
|
6761
|
+
|
|
6762
|
+
static tachanun(hdate, il) {
|
|
6763
|
+
return tachanun_(hdate, il);
|
|
6764
|
+
}
|
|
6479
6765
|
|
|
6480
6766
|
}
|
|
6481
6767
|
/**
|