@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.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v3.
|
|
1
|
+
/*! @hebcal/core v3.42.2 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -631,8 +631,8 @@ Locale.useLocale('en');
|
|
|
631
631
|
/*
|
|
632
632
|
* More minimal HDate
|
|
633
633
|
*/
|
|
634
|
-
const NISAN$
|
|
635
|
-
const IYYAR$
|
|
634
|
+
const NISAN$4 = 1;
|
|
635
|
+
const IYYAR$2 = 2; // const SIVAN = 3;
|
|
636
636
|
|
|
637
637
|
const TAMUZ$1 = 4; // const AV = 5;
|
|
638
638
|
|
|
@@ -721,7 +721,7 @@ function hebrew2abs(year, month, day) {
|
|
|
721
721
|
tempabs += daysInMonth(m, year);
|
|
722
722
|
}
|
|
723
723
|
|
|
724
|
-
for (let m = NISAN$
|
|
724
|
+
for (let m = NISAN$4; m < month; m++) {
|
|
725
725
|
tempabs += daysInMonth(m, year);
|
|
726
726
|
}
|
|
727
727
|
} else {
|
|
@@ -806,7 +806,7 @@ function monthsInYear(year) {
|
|
|
806
806
|
|
|
807
807
|
function daysInMonth(month, year) {
|
|
808
808
|
switch (month) {
|
|
809
|
-
case IYYAR$
|
|
809
|
+
case IYYAR$2:
|
|
810
810
|
case TAMUZ$1:
|
|
811
811
|
case ELUL$2:
|
|
812
812
|
case TEVET$2:
|
|
@@ -4005,7 +4005,7 @@ function getTodayIsHe(omer) {
|
|
|
4005
4005
|
const osdate = new Date(1923, 8, 11);
|
|
4006
4006
|
const osday = greg2abs(osdate);
|
|
4007
4007
|
const nsday = greg2abs(new Date(1975, 5, 24));
|
|
4008
|
-
const
|
|
4008
|
+
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 => {
|
|
4009
4009
|
return {
|
|
4010
4010
|
name: m[0],
|
|
4011
4011
|
blatt: m[1]
|
|
@@ -4050,10 +4050,14 @@ class DafYomi {
|
|
|
4050
4050
|
let blatt = 0;
|
|
4051
4051
|
let count = -1; // Fix Shekalim for old cycles
|
|
4052
4052
|
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4053
|
+
const shortShekalim = cno <= 7;
|
|
4054
|
+
const shas = shortShekalim ? shas0.slice() : shas0;
|
|
4055
|
+
|
|
4056
|
+
if (shortShekalim) {
|
|
4057
|
+
shas[4] = {
|
|
4058
|
+
name: 'Shekalim',
|
|
4059
|
+
blatt: 13
|
|
4060
|
+
};
|
|
4057
4061
|
} // Find the daf
|
|
4058
4062
|
|
|
4059
4063
|
|
|
@@ -4496,7 +4500,7 @@ const SHAVUOT = 'Shavuot'; // 33
|
|
|
4496
4500
|
* @return {number[]}
|
|
4497
4501
|
*/
|
|
4498
4502
|
|
|
4499
|
-
function range(start, stop) {
|
|
4503
|
+
function range$1(start, stop) {
|
|
4500
4504
|
return Array.from({
|
|
4501
4505
|
length: stop - start + 1
|
|
4502
4506
|
}, (v, k) => k + start);
|
|
@@ -4514,78 +4518,78 @@ const types = {
|
|
|
4514
4518
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
4515
4519
|
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
4516
4520
|
// e.g. 5753
|
|
4517
|
-
'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)),
|
|
4521
|
+
'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)),
|
|
4518
4522
|
|
|
4519
4523
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
4520
4524
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
4521
4525
|
// e.g. 5756
|
|
4522
|
-
'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)),
|
|
4526
|
+
'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)),
|
|
4523
4527
|
|
|
4524
4528
|
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
4525
4529
|
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
4526
4530
|
// e.g. 5701
|
|
4527
|
-
'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)),
|
|
4531
|
+
'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)),
|
|
4528
4532
|
|
|
4529
4533
|
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
4530
4534
|
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
4531
4535
|
// e.g. 5745
|
|
4532
|
-
'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)),
|
|
4536
|
+
'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)),
|
|
4533
4537
|
|
|
4534
4538
|
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
4535
4539
|
* Kislev each have 30 days), and has Passover start on Sunday. */
|
|
4536
4540
|
// e.g. 5754
|
|
4537
|
-
'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)),
|
|
4541
|
+
'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)),
|
|
4538
4542
|
|
|
4539
4543
|
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev
|
|
4540
4544
|
* each have 29 days), and has Passover start on Sunday. */
|
|
4541
4545
|
// e.g. 5761
|
|
4542
|
-
'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)),
|
|
4546
|
+
'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)),
|
|
4543
4547
|
|
|
4544
4548
|
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
4545
4549
|
* Kislev each have 30 days), and has Passover start on Tuesday. */
|
|
4546
4550
|
// e.g. 5716
|
|
4547
|
-
'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)),
|
|
4551
|
+
'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)),
|
|
4548
4552
|
|
|
4549
4553
|
/* -- The leap year types (keviot) -- */
|
|
4550
4554
|
|
|
4551
4555
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
4552
4556
|
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
4553
4557
|
// e.g. 5746
|
|
4554
|
-
'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)),
|
|
4558
|
+
'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)),
|
|
4555
4559
|
|
|
4556
4560
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
4557
4561
|
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
4558
4562
|
// e.g. 5746
|
|
4559
|
-
'1201': [51, 52].concat(CHMSUKOT, range(0, 27), CHMPESACH, range(28, 40), D(41), range(43, 49), D(50)),
|
|
4563
|
+
'1201': [51, 52].concat(CHMSUKOT, range$1(0, 27), CHMPESACH, range$1(28, 40), D(41), range$1(43, 49), D(50)),
|
|
4560
4564
|
|
|
4561
4565
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
4562
4566
|
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
4563
4567
|
// e.g.5752
|
|
4564
|
-
'1220': [51, 52].concat(CHMSUKOT, range(0, 27), PESACH1, PESACH8, range(28, 40), D(41), range(43, 50)),
|
|
4568
|
+
'1220': [51, 52].concat(CHMSUKOT, range$1(0, 27), PESACH1, PESACH8, range$1(28, 40), D(41), range$1(43, 50)),
|
|
4565
4569
|
|
|
4566
4570
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
4567
4571
|
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
4568
4572
|
// e.g.5752
|
|
4569
|
-
'1221': [51, 52].concat(CHMSUKOT, range(0, 27), PESACH, range(28, 50)),
|
|
4573
|
+
'1221': [51, 52].concat(CHMSUKOT, range$1(0, 27), PESACH, range$1(28, 50)),
|
|
4570
4574
|
|
|
4571
4575
|
/* Hebrew year that starts on Thursday, is `incomplete' (Heshvan and
|
|
4572
4576
|
* Kislev both have 29 days), and has Passover start on Sunday. */
|
|
4573
4577
|
// e.g. 5768
|
|
4574
|
-
'150': [52].concat(YK, CHMSUKOT, range(0, 28), PESACH7, range(29, 50)),
|
|
4578
|
+
'150': [52].concat(YK, CHMSUKOT, range$1(0, 28), PESACH7, range$1(29, 50)),
|
|
4575
4579
|
|
|
4576
4580
|
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
4577
4581
|
* Kislev both have 30 days), and has Passover start on Tuesday. */
|
|
4578
4582
|
// eg. 5771
|
|
4579
|
-
'152': [52].concat(YK, CHMSUKOT, range(0, 28), CHMPESACH, range(29, 49), D(50)),
|
|
4583
|
+
'152': [52].concat(YK, CHMSUKOT, range$1(0, 28), CHMPESACH, range$1(29, 49), D(50)),
|
|
4580
4584
|
|
|
4581
4585
|
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and
|
|
4582
4586
|
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
4583
4587
|
// e.g.5757
|
|
4584
|
-
'170': [].concat(RH, 52, SUKKOT, SHMINI, range(0, 27), CHMPESACH, range(28, 40), D(41), range(43, 49), D(50)),
|
|
4588
|
+
'170': [].concat(RH, 52, SUKKOT, SHMINI, range$1(0, 27), CHMPESACH, range$1(28, 40), D(41), range$1(43, 49), D(50)),
|
|
4585
4589
|
|
|
4586
4590
|
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
4587
4591
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
4588
|
-
'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))
|
|
4592
|
+
'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))
|
|
4589
4593
|
};
|
|
4590
4594
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
4591
4595
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
@@ -4687,6 +4691,70 @@ class ParshaEvent extends Event {
|
|
|
4687
4691
|
|
|
4688
4692
|
}
|
|
4689
4693
|
|
|
4694
|
+
const SUN$1 = 0;
|
|
4695
|
+
const TUE$1 = 2;
|
|
4696
|
+
const FRI$2 = 5;
|
|
4697
|
+
const SAT$2 = 6;
|
|
4698
|
+
const NISAN$3 = months.NISAN;
|
|
4699
|
+
const IYYAR$1 = months.IYYAR;
|
|
4700
|
+
/**
|
|
4701
|
+
* Yom HaShoah first observed in 1951.
|
|
4702
|
+
* When the actual date of Yom Hashoah falls on a Friday, the
|
|
4703
|
+
* state of Israel observes Yom Hashoah on the preceding
|
|
4704
|
+
* Thursday. When it falls on a Sunday, Yom Hashoah is observed
|
|
4705
|
+
* on the following Monday.
|
|
4706
|
+
* http://www.ushmm.org/remembrance/dor/calendar/
|
|
4707
|
+
* @private
|
|
4708
|
+
* @param {number} year
|
|
4709
|
+
* @return {HDate|null}
|
|
4710
|
+
*/
|
|
4711
|
+
|
|
4712
|
+
function dateYomHaShoah(year) {
|
|
4713
|
+
if (year < 5711) {
|
|
4714
|
+
return null;
|
|
4715
|
+
}
|
|
4716
|
+
|
|
4717
|
+
let nisan27dt = new HDate(27, NISAN$3, year);
|
|
4718
|
+
|
|
4719
|
+
if (nisan27dt.getDay() === FRI$2) {
|
|
4720
|
+
nisan27dt = new HDate(26, NISAN$3, year);
|
|
4721
|
+
} else if (nisan27dt.getDay() === SUN$1) {
|
|
4722
|
+
nisan27dt = new HDate(28, NISAN$3, year);
|
|
4723
|
+
}
|
|
4724
|
+
|
|
4725
|
+
return nisan27dt;
|
|
4726
|
+
}
|
|
4727
|
+
/**
|
|
4728
|
+
* Yom HaAtzma'ut only celebrated after 1948
|
|
4729
|
+
* @private
|
|
4730
|
+
* @param {number} year
|
|
4731
|
+
* @return {HDate|null}
|
|
4732
|
+
*/
|
|
4733
|
+
|
|
4734
|
+
function dateYomHaZikaron(year) {
|
|
4735
|
+
if (year < 5708) {
|
|
4736
|
+
return null;
|
|
4737
|
+
}
|
|
4738
|
+
|
|
4739
|
+
let day;
|
|
4740
|
+
const pesach = new HDate(15, NISAN$3, year);
|
|
4741
|
+
const pdow = pesach.getDay();
|
|
4742
|
+
|
|
4743
|
+
if (pdow === SUN$1) {
|
|
4744
|
+
day = 2;
|
|
4745
|
+
} else if (pdow === SAT$2) {
|
|
4746
|
+
day = 3;
|
|
4747
|
+
} else if (year < 5764) {
|
|
4748
|
+
day = 4;
|
|
4749
|
+
} else if (pdow === TUE$1) {
|
|
4750
|
+
day = 5;
|
|
4751
|
+
} else {
|
|
4752
|
+
day = 4;
|
|
4753
|
+
}
|
|
4754
|
+
|
|
4755
|
+
return new HDate(day, IYYAR$1, year);
|
|
4756
|
+
}
|
|
4757
|
+
|
|
4690
4758
|
/*
|
|
4691
4759
|
Hebcal - A Jewish Calendar Generator
|
|
4692
4760
|
Copyright (c) 1994-2020 Danny Sadinoff
|
|
@@ -5234,42 +5302,16 @@ function getHolidaysForYear_(year) {
|
|
|
5234
5302
|
}));
|
|
5235
5303
|
}
|
|
5236
5304
|
|
|
5237
|
-
|
|
5238
|
-
// Yom HaShoah first observed in 1951
|
|
5239
|
-
let nisan27dt = new HDate(27, NISAN$2, year);
|
|
5240
|
-
/* When the actual date of Yom Hashoah falls on a Friday, the
|
|
5241
|
-
* state of Israel observes Yom Hashoah on the preceding
|
|
5242
|
-
* Thursday. When it falls on a Sunday, Yom Hashoah is observed
|
|
5243
|
-
* on the following Monday.
|
|
5244
|
-
* http://www.ushmm.org/remembrance/dor/calendar/
|
|
5245
|
-
*/
|
|
5246
|
-
|
|
5247
|
-
if (nisan27dt.getDay() == FRI$1) {
|
|
5248
|
-
nisan27dt = new HDate(26, NISAN$2, year);
|
|
5249
|
-
} else if (nisan27dt.getDay() == SUN) {
|
|
5250
|
-
nisan27dt = new HDate(28, NISAN$2, year);
|
|
5251
|
-
}
|
|
5305
|
+
const nisan27dt = dateYomHaShoah(year);
|
|
5252
5306
|
|
|
5307
|
+
if (nisan27dt) {
|
|
5253
5308
|
add(new HolidayEvent(nisan27dt, 'Yom HaShoah', MODERN_HOLIDAY$1));
|
|
5254
5309
|
}
|
|
5255
5310
|
|
|
5256
|
-
|
|
5257
|
-
// Yom HaAtzma'ut only celebrated after 1948
|
|
5258
|
-
let day;
|
|
5259
|
-
|
|
5260
|
-
if (pesach.getDay() == SUN) {
|
|
5261
|
-
day = 2;
|
|
5262
|
-
} else if (pesach.getDay() == SAT$1) {
|
|
5263
|
-
day = 3;
|
|
5264
|
-
} else if (year < 5764) {
|
|
5265
|
-
day = 4;
|
|
5266
|
-
} else if (pesach.getDay() == TUE) {
|
|
5267
|
-
day = 5;
|
|
5268
|
-
} else {
|
|
5269
|
-
day = 4;
|
|
5270
|
-
}
|
|
5311
|
+
const yomHaZikaronDt = dateYomHaZikaron(year);
|
|
5271
5312
|
|
|
5272
|
-
|
|
5313
|
+
if (yomHaZikaronDt) {
|
|
5314
|
+
add(new HolidayEvent(yomHaZikaronDt, 'Yom HaZikaron', MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(yomHaZikaronDt.next(), 'Yom HaAtzma\'ut', MODERN_HOLIDAY$1, emojiIsraelFlag));
|
|
5273
5315
|
}
|
|
5274
5316
|
|
|
5275
5317
|
if (year >= 5727) {
|
|
@@ -5613,14 +5655,14 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
|
5613
5655
|
return new HDate(day, month, hyear);
|
|
5614
5656
|
}
|
|
5615
5657
|
|
|
5616
|
-
var version="3.
|
|
5658
|
+
var version="3.42.2";
|
|
5617
5659
|
|
|
5618
|
-
var headers$1={"plural-forms":"nplurals=2; plural=(n > 1);"
|
|
5660
|
+
var headers$1={"plural-forms":"nplurals=2; plural=(n > 1);"};var 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};
|
|
5619
5661
|
|
|
5620
5662
|
Locale.addLocale('ashkenazi', poAshkenazi);
|
|
5621
5663
|
Locale.addLocale('a', poAshkenazi);
|
|
5622
5664
|
|
|
5623
|
-
var headers={"plural-forms":"nplurals=2; plural=(n > 1);"
|
|
5665
|
+
var headers={"plural-forms":"nplurals=2; plural=(n > 1);"};var 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};
|
|
5624
5666
|
|
|
5625
5667
|
Locale.addLocale('he', poHe);
|
|
5626
5668
|
Locale.addLocale('h', poHe);
|
|
@@ -5637,6 +5679,186 @@ const poHeNoNikud = {
|
|
|
5637
5679
|
};
|
|
5638
5680
|
Locale.addLocale('he-x-NoNikud', poHeNoNikud);
|
|
5639
5681
|
|
|
5682
|
+
const NONE$1 = 0;
|
|
5683
|
+
const HALF = 1;
|
|
5684
|
+
const WHOLE = 2;
|
|
5685
|
+
/**
|
|
5686
|
+
* @private
|
|
5687
|
+
* @param {Event[]} events
|
|
5688
|
+
* @param {HDate} hdate
|
|
5689
|
+
* @return {number}
|
|
5690
|
+
*/
|
|
5691
|
+
|
|
5692
|
+
function hallel_(events, hdate) {
|
|
5693
|
+
const whole = events.filter(ev => {
|
|
5694
|
+
/** @type {string} */
|
|
5695
|
+
const desc = ev.getDesc();
|
|
5696
|
+
/** @type {HDate} */
|
|
5697
|
+
|
|
5698
|
+
const hd = ev.getDate();
|
|
5699
|
+
const month = hd.getMonth();
|
|
5700
|
+
const mday = hd.getDate();
|
|
5701
|
+
return desc.startsWith('Chanukah') || desc.startsWith('Shavuot') || desc.startsWith('Sukkot') || month === months.NISAN && (mday === 15 || mday === 16) && ev.getFlags() & flags.CHAG || // Pesach
|
|
5702
|
+
desc === 'Yom HaAtzma\'ut' || desc === 'Yom Yerushalayim';
|
|
5703
|
+
}).map(ev => {
|
|
5704
|
+
return ev.getDate().abs();
|
|
5705
|
+
});
|
|
5706
|
+
const abs = hdate.abs();
|
|
5707
|
+
|
|
5708
|
+
if (whole.includes(abs)) {
|
|
5709
|
+
return WHOLE;
|
|
5710
|
+
}
|
|
5711
|
+
|
|
5712
|
+
const half = events.filter(ev => {
|
|
5713
|
+
const desc = ev.getDesc();
|
|
5714
|
+
return ev.getFlags() & flags.ROSH_CHODESH || desc.startsWith('Pesach') && desc !== 'Pesach I' && desc !== 'Pesach II';
|
|
5715
|
+
}).map(ev => {
|
|
5716
|
+
return ev.getDate().abs();
|
|
5717
|
+
});
|
|
5718
|
+
|
|
5719
|
+
if (half.includes(abs)) {
|
|
5720
|
+
return HALF;
|
|
5721
|
+
}
|
|
5722
|
+
|
|
5723
|
+
return NONE$1;
|
|
5724
|
+
}
|
|
5725
|
+
|
|
5726
|
+
/**
|
|
5727
|
+
* @private
|
|
5728
|
+
* @param {number} start
|
|
5729
|
+
* @param {number} end
|
|
5730
|
+
* @return {number[]}
|
|
5731
|
+
*/
|
|
5732
|
+
|
|
5733
|
+
function range(start, end) {
|
|
5734
|
+
const arr = [];
|
|
5735
|
+
|
|
5736
|
+
for (let i = start; i <= end; i++) {
|
|
5737
|
+
arr.push(i);
|
|
5738
|
+
}
|
|
5739
|
+
|
|
5740
|
+
return arr;
|
|
5741
|
+
}
|
|
5742
|
+
|
|
5743
|
+
const cache = Object.create(null);
|
|
5744
|
+
const NONE = {
|
|
5745
|
+
shacharit: false,
|
|
5746
|
+
mincha: false,
|
|
5747
|
+
allCongs: false
|
|
5748
|
+
};
|
|
5749
|
+
/**
|
|
5750
|
+
* @private
|
|
5751
|
+
* @param {HDate} hdate
|
|
5752
|
+
* @param {boolean} il
|
|
5753
|
+
* @return {TachanunResult}
|
|
5754
|
+
*/
|
|
5755
|
+
|
|
5756
|
+
function tachanun_(hdate, il) {
|
|
5757
|
+
return tachanun0(hdate, il, true);
|
|
5758
|
+
}
|
|
5759
|
+
/**
|
|
5760
|
+
* @private
|
|
5761
|
+
* @param {HDate} hdate
|
|
5762
|
+
* @param {boolean} il
|
|
5763
|
+
* @param {boolean} checkNext
|
|
5764
|
+
* @return {TachanunResult}
|
|
5765
|
+
*/
|
|
5766
|
+
|
|
5767
|
+
function tachanun0(hdate, il, checkNext) {
|
|
5768
|
+
const year = hdate.getFullYear();
|
|
5769
|
+
const key = `${year}-${il ? 1 : 0}`;
|
|
5770
|
+
const dates = cache[key] = cache[key] || tachanunYear(year, il);
|
|
5771
|
+
const abs = hdate.abs();
|
|
5772
|
+
|
|
5773
|
+
if (dates.none.indexOf(abs) > -1) {
|
|
5774
|
+
return NONE;
|
|
5775
|
+
}
|
|
5776
|
+
|
|
5777
|
+
const dow = hdate.getDay();
|
|
5778
|
+
const ret = {
|
|
5779
|
+
shacharit: false,
|
|
5780
|
+
mincha: false,
|
|
5781
|
+
allCongs: false
|
|
5782
|
+
};
|
|
5783
|
+
|
|
5784
|
+
if (dates.some.indexOf(abs) === -1) {
|
|
5785
|
+
ret.allCongs = true;
|
|
5786
|
+
}
|
|
5787
|
+
|
|
5788
|
+
if (dow !== 6) {
|
|
5789
|
+
ret.shacharit = true;
|
|
5790
|
+
}
|
|
5791
|
+
|
|
5792
|
+
const tomorrow = abs + 1;
|
|
5793
|
+
|
|
5794
|
+
if (checkNext && dates.yesPrev.indexOf(tomorrow) === -1) {
|
|
5795
|
+
const tmp = tachanun0(new HDate(tomorrow), il, false);
|
|
5796
|
+
ret.mincha = tmp.shacharit;
|
|
5797
|
+
} else {
|
|
5798
|
+
ret.mincha = dow !== 5;
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5801
|
+
if (ret.allCongs && !ret.mincha && !ret.shacharit) {
|
|
5802
|
+
return NONE;
|
|
5803
|
+
}
|
|
5804
|
+
|
|
5805
|
+
return ret;
|
|
5806
|
+
}
|
|
5807
|
+
/**
|
|
5808
|
+
* @private
|
|
5809
|
+
* @param {number} year
|
|
5810
|
+
* @param {boolean} il
|
|
5811
|
+
* @return {*}
|
|
5812
|
+
*/
|
|
5813
|
+
|
|
5814
|
+
|
|
5815
|
+
function tachanunYear(year, il) {
|
|
5816
|
+
const leap = HDate.isLeapYear(year);
|
|
5817
|
+
const monthsInYear = 12 + leap;
|
|
5818
|
+
let av9dt = new HDate(9, months.AV, year);
|
|
5819
|
+
|
|
5820
|
+
if (av9dt.getDay() === 6) {
|
|
5821
|
+
av9dt = av9dt.next();
|
|
5822
|
+
}
|
|
5823
|
+
|
|
5824
|
+
let shushPurim = new HDate(15, months.ADAR_II, year);
|
|
5825
|
+
|
|
5826
|
+
if (shushPurim.getDay() === 6) {
|
|
5827
|
+
shushPurim = shushPurim.next();
|
|
5828
|
+
}
|
|
5829
|
+
|
|
5830
|
+
const none = [].concat( // Rosh Chodesh - 1st of every month. Also includes RH day 1 (1 Tishrei)
|
|
5831
|
+
range(1, monthsInYear).map(month => new HDate(1, month, year)), // Rosh Chodesh - 30th of months that have one
|
|
5832
|
+
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
|
|
5833
|
+
// entire month of Nisan
|
|
5834
|
+
range(1, HDate.daysInMonth(months.NISAN, year)).map(mday => new HDate(mday, months.NISAN, year)), new HDate(18, months.IYYAR, year), // Lag BaOmer
|
|
5835
|
+
// Rosh Chodesh Sivan thru Isru Chag
|
|
5836
|
+
range(1, 8 - (il ? 1 : 0)).map(mday => new HDate(mday, months.SIVAN, year)), av9dt, // Tisha B'Av
|
|
5837
|
+
new HDate(15, months.AV, year), // Tu B'Av
|
|
5838
|
+
new HDate(29, months.ELUL, year), // Erev Rosh Hashanah
|
|
5839
|
+
// Erev Yom Kippur thru Isru Chag
|
|
5840
|
+
range(9, 24 - (il ? 1 : 0)).map(mday => new HDate(mday, months.TISHREI, year)), // Chanukah
|
|
5841
|
+
range(25, 33).map(mday => new HDate(mday, months.KISLEV, year)), new HDate(15, months.SHVAT, year), // Tu BiShvat
|
|
5842
|
+
new HDate(14, months.ADAR_II, year), // Purim
|
|
5843
|
+
shushPurim, leap ? new HDate(14, months.ADAR_I, year) : [] // Purim Katan
|
|
5844
|
+
);
|
|
5845
|
+
const some = [].concat( // Until 14 Sivan
|
|
5846
|
+
range(1, 13).map(mday => new HDate(mday, months.SIVAN, year)), // Until after Rosh Chodesh Cheshvan
|
|
5847
|
+
range(20, 31).map(mday => new HDate(mday, months.TISHREI, year)), new HDate(14, months.IYYAR, year), // Pesach Sheini
|
|
5848
|
+
// Yom HaAtzma'ut, which changes based on day of week
|
|
5849
|
+
year >= 5708 ? dateYomHaZikaron(year).next() : [], // Yom Yerushalayim
|
|
5850
|
+
year >= 5727 ? new HDate(28, months.IYYAR, year) : []);
|
|
5851
|
+
const yesPrev = [].concat(new HDate(29, months.ELUL, year - 1), // Erev Rosh Hashanah
|
|
5852
|
+
new HDate(9, months.TISHREI, year), // Erev Yom Kippur
|
|
5853
|
+
new HDate(14, months.IYYAR, year) // Pesach Sheini
|
|
5854
|
+
);
|
|
5855
|
+
return {
|
|
5856
|
+
none: none.map(hd => hd.abs()).sort(),
|
|
5857
|
+
some: some.map(hd => hd.abs()).sort(),
|
|
5858
|
+
yesPrev: yesPrev.map(hd => hd.abs()).sort()
|
|
5859
|
+
};
|
|
5860
|
+
}
|
|
5861
|
+
|
|
5640
5862
|
/*
|
|
5641
5863
|
Hebcal - A Jewish Calendar Generator
|
|
5642
5864
|
Copyright (c) 1994-2020 Danny Sadinoff
|
|
@@ -5831,6 +6053,13 @@ function checkCandleOptions(options) {
|
|
|
5831
6053
|
* Possible values are `true` and `false`; the default is locale dependent.
|
|
5832
6054
|
*/
|
|
5833
6055
|
|
|
6056
|
+
/**
|
|
6057
|
+
* @typedef {Object} TachanunResult
|
|
6058
|
+
* @property {boolean} shacharit Tachanun is said at Shacharit
|
|
6059
|
+
* @property {boolean} mincha Tachanun is said at Mincha
|
|
6060
|
+
* @property {boolean} allCongs All congregations say Tachanun on the day
|
|
6061
|
+
*/
|
|
6062
|
+
|
|
5834
6063
|
/**
|
|
5835
6064
|
* Gets the R.D. days for a number, Date, or HDate
|
|
5836
6065
|
* @private
|
|
@@ -6044,6 +6273,8 @@ function observedInIsrael(ev) {
|
|
|
6044
6273
|
function observedInDiaspora(ev) {
|
|
6045
6274
|
return ev.observedInDiaspora();
|
|
6046
6275
|
}
|
|
6276
|
+
|
|
6277
|
+
const yearArrayCache = Object.create(null);
|
|
6047
6278
|
/**
|
|
6048
6279
|
* HebrewCalendar is the main interface to the `@hebcal/core` library.
|
|
6049
6280
|
* This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
|
|
@@ -6051,7 +6282,6 @@ function observedInDiaspora(ev) {
|
|
|
6051
6282
|
* Event names can be rendered in several languges using the `locale` option.
|
|
6052
6283
|
*/
|
|
6053
6284
|
|
|
6054
|
-
|
|
6055
6285
|
class HebrewCalendar {
|
|
6056
6286
|
/**
|
|
6057
6287
|
* Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
|
|
@@ -6387,10 +6617,17 @@ class HebrewCalendar {
|
|
|
6387
6617
|
|
|
6388
6618
|
|
|
6389
6619
|
static getHolidaysForYearArray(year, il) {
|
|
6620
|
+
const cacheKey = `${year}-${il ? 1 : 0}`;
|
|
6621
|
+
let events = yearArrayCache[cacheKey];
|
|
6622
|
+
|
|
6623
|
+
if (events) {
|
|
6624
|
+
return events;
|
|
6625
|
+
}
|
|
6626
|
+
|
|
6390
6627
|
const yearMap = getHolidaysForYear_(year);
|
|
6391
6628
|
const startAbs = HDate.hebrew2abs(year, TISHREI, 1);
|
|
6392
6629
|
const endAbs = HDate.hebrew2abs(year + 1, TISHREI, 1) - 1;
|
|
6393
|
-
|
|
6630
|
+
events = [];
|
|
6394
6631
|
const myFilter = il ? observedInIsrael : observedInDiaspora;
|
|
6395
6632
|
|
|
6396
6633
|
for (let absDt = startAbs; absDt <= endAbs; absDt++) {
|
|
@@ -6403,6 +6640,7 @@ class HebrewCalendar {
|
|
|
6403
6640
|
}
|
|
6404
6641
|
}
|
|
6405
6642
|
|
|
6643
|
+
yearArrayCache[cacheKey] = events;
|
|
6406
6644
|
return events;
|
|
6407
6645
|
}
|
|
6408
6646
|
/**
|
|
@@ -6480,6 +6718,54 @@ class HebrewCalendar {
|
|
|
6480
6718
|
static getSedra(hyear, il) {
|
|
6481
6719
|
return getSedra_(hyear, il);
|
|
6482
6720
|
}
|
|
6721
|
+
/**
|
|
6722
|
+
* Return a number containing information on what Hallel is said on that day.
|
|
6723
|
+
*
|
|
6724
|
+
* Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
|
|
6725
|
+
* Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
6726
|
+
*
|
|
6727
|
+
* Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
|
|
6728
|
+
*
|
|
6729
|
+
* The number is one of the following values:
|
|
6730
|
+
*
|
|
6731
|
+
* 0 - No Hallel
|
|
6732
|
+
* 1 - Half Hallel
|
|
6733
|
+
* 2 - Whole Hallel
|
|
6734
|
+
*
|
|
6735
|
+
* @param {HDate} hdate
|
|
6736
|
+
* @param {boolean} il
|
|
6737
|
+
* @return {number}
|
|
6738
|
+
*/
|
|
6739
|
+
|
|
6740
|
+
|
|
6741
|
+
static hallel(hdate, il) {
|
|
6742
|
+
const events = HebrewCalendar.getHolidaysForYearArray(hdate.getFullYear(), il);
|
|
6743
|
+
return hallel_(events, hdate);
|
|
6744
|
+
}
|
|
6745
|
+
/**
|
|
6746
|
+
* Return details on what Tachanun (or Tzidchatcha on Shabbat) is said on `hdate`.
|
|
6747
|
+
*
|
|
6748
|
+
* Tachanun is not said on Rosh Chodesh, the month of Nisan, Lag Baomer,
|
|
6749
|
+
* Rosh Chodesh Sivan until Isru Chag, Tisha B'av, 15 Av, Erev Rosh Hashanah,
|
|
6750
|
+
* Rosh Hashanah, Erev Yom Kippur until after Simchat Torah, Chanukah,
|
|
6751
|
+
* Tu B'shvat, Purim and Shushan Purim, and Purim and Shushan Purim Katan.
|
|
6752
|
+
*
|
|
6753
|
+
* In some congregations Tachanun is not said until from Rosh Chodesh Sivan
|
|
6754
|
+
* until 14th Sivan, Sukkot until after Rosh Chodesh Cheshvan, Pesach Sheini,
|
|
6755
|
+
* Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
6756
|
+
*
|
|
6757
|
+
* Tachanun is not said at Mincha on days before it is not said at Shacharit.
|
|
6758
|
+
*
|
|
6759
|
+
* Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.
|
|
6760
|
+
* @param {HDate} hdate
|
|
6761
|
+
* @param {boolean} il
|
|
6762
|
+
* @return {TachanunResult}
|
|
6763
|
+
*/
|
|
6764
|
+
|
|
6765
|
+
|
|
6766
|
+
static tachanun(hdate, il) {
|
|
6767
|
+
return tachanun_(hdate, il);
|
|
6768
|
+
}
|
|
6483
6769
|
|
|
6484
6770
|
}
|
|
6485
6771
|
/**
|