@hebcal/core 3.33.3 → 3.33.6
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 +342 -353
- package/dist/bundle.js +931 -777
- package/dist/bundle.min.js +2 -2
- package/dist/hdate-bundle.js +429 -266
- package/dist/hdate-bundle.min.js +2 -2
- package/dist/hdate.js +194 -84
- package/dist/hdate.mjs +193 -85
- package/dist/index.js +385 -255
- package/dist/index.mjs +369 -259
- package/hebcal.d.ts +116 -115
- package/package.json +10 -10
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v3.33.
|
|
1
|
+
/*! @hebcal/core v3.33.6 */
|
|
2
2
|
/*
|
|
3
3
|
Hebcal - A Jewish Calendar Generator
|
|
4
4
|
Copyright (c) 1994-2020 Danny Sadinoff
|
|
@@ -42,53 +42,55 @@ function quotient(x, y) {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Gregorian date helper functions.
|
|
45
|
-
* @namespace
|
|
46
45
|
*/
|
|
47
46
|
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
class greg {
|
|
50
49
|
/**
|
|
51
50
|
* Long names of the Gregorian months (1='January', 12='December')
|
|
52
51
|
* @readonly
|
|
53
52
|
* @type {string[]}
|
|
54
53
|
*/
|
|
55
|
-
monthNames
|
|
56
|
-
|
|
54
|
+
static monthNames = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
57
55
|
/**
|
|
58
56
|
* Returns true if the Gregorian year is a leap year
|
|
59
57
|
* @param {number} year Gregorian year
|
|
60
58
|
* @return {boolean}
|
|
61
59
|
*/
|
|
62
|
-
isLeapYear: function (year) {
|
|
63
|
-
return !(year % 4) && (!!(year % 100) || !(year % 400));
|
|
64
|
-
},
|
|
65
60
|
|
|
61
|
+
static isLeapYear(year) {
|
|
62
|
+
return !(year % 4) && (!!(year % 100) || !(year % 400));
|
|
63
|
+
}
|
|
66
64
|
/**
|
|
67
65
|
* Number of days in the Gregorian month for given year
|
|
68
66
|
* @param {number} month Gregorian month (1=January, 12=December)
|
|
69
67
|
* @param {number} year Gregorian year
|
|
70
68
|
* @return {number}
|
|
71
69
|
*/
|
|
72
|
-
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
static daysInMonth(month, year) {
|
|
73
73
|
// 1 based months
|
|
74
74
|
return monthLengths[+this.isLeapYear(year)][month];
|
|
75
|
-
}
|
|
76
|
-
|
|
75
|
+
}
|
|
77
76
|
/**
|
|
78
77
|
* Returns true if the object is a Javascript Date
|
|
79
78
|
* @param {Object} obj
|
|
80
79
|
* @return {boolean}
|
|
81
80
|
*/
|
|
82
|
-
isDate: function (obj) {
|
|
83
|
-
return typeof obj === 'object' && Date.prototype === obj.__proto__;
|
|
84
|
-
},
|
|
85
81
|
|
|
82
|
+
|
|
83
|
+
static isDate(obj) {
|
|
84
|
+
return typeof obj === 'object' && Date.prototype === obj.__proto__;
|
|
85
|
+
}
|
|
86
86
|
/**
|
|
87
87
|
* Returns number of days since January 1 of that year
|
|
88
88
|
* @param {Date} date Gregorian date
|
|
89
89
|
* @return {number}
|
|
90
90
|
*/
|
|
91
|
-
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
static dayOfYear(date) {
|
|
92
94
|
if (!this.isDate(date)) {
|
|
93
95
|
throw new TypeError('Argument to greg.dayOfYear not a Date');
|
|
94
96
|
}
|
|
@@ -105,14 +107,15 @@ const greg = {
|
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
return doy;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
+
}
|
|
110
111
|
/**
|
|
111
112
|
* Converts Gregorian date to absolute R.D. (Rata Die) days
|
|
112
113
|
* @param {Date} date Gregorian date
|
|
113
114
|
* @return {number}
|
|
114
115
|
*/
|
|
115
|
-
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
static greg2abs(date) {
|
|
116
119
|
if (!this.isDate(date)) {
|
|
117
120
|
throw new TypeError('Argument to greg.greg2abs not a Date');
|
|
118
121
|
}
|
|
@@ -123,14 +126,15 @@ const greg = {
|
|
|
123
126
|
Math.floor(year / 4) - // + Julian Leap years
|
|
124
127
|
Math.floor(year / 100) + // - century years
|
|
125
128
|
Math.floor(year / 400)); // + Gregorian leap years
|
|
126
|
-
}
|
|
127
|
-
|
|
129
|
+
}
|
|
128
130
|
/**
|
|
129
131
|
* @private
|
|
130
132
|
* @param {number} theDate - R.D. number of days
|
|
131
133
|
* @return {number}
|
|
132
134
|
*/
|
|
133
|
-
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
static yearFromFixed(theDate) {
|
|
134
138
|
const l0 = theDate - 1;
|
|
135
139
|
const n400 = quotient(l0, 146097);
|
|
136
140
|
const d1 = mod(l0, 146097);
|
|
@@ -141,8 +145,7 @@ const greg = {
|
|
|
141
145
|
const n1 = quotient(d3, 365);
|
|
142
146
|
const year = 400 * n400 + 100 * n100 + 4 * n4 + n1;
|
|
143
147
|
return n100 != 4 && n1 != 4 ? year + 1 : year;
|
|
144
|
-
}
|
|
145
|
-
|
|
148
|
+
}
|
|
146
149
|
/**
|
|
147
150
|
* @private
|
|
148
151
|
* @param {number} year
|
|
@@ -150,11 +153,12 @@ const greg = {
|
|
|
150
153
|
* @param {number} day
|
|
151
154
|
* @return {number}
|
|
152
155
|
*/
|
|
153
|
-
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
static toFixed(year, month, day) {
|
|
154
159
|
const py = year - 1;
|
|
155
160
|
return 0 + 365 * py + quotient(py, 4) - quotient(py, 100) + quotient(py, 400) + quotient(367 * month - 362, 12) + Math.floor(month <= 2 ? 0 : this.isLeapYear(year) ? -1 : -2) + day;
|
|
156
|
-
}
|
|
157
|
-
|
|
161
|
+
}
|
|
158
162
|
/**
|
|
159
163
|
* Converts from Rata Die (R.D. number) to Gregorian date.
|
|
160
164
|
* See the footnote on page 384 of ``Calendrical Calculations, Part II:
|
|
@@ -164,7 +168,9 @@ const greg = {
|
|
|
164
168
|
* @param {number} theDate - R.D. number of days
|
|
165
169
|
* @return {Date}
|
|
166
170
|
*/
|
|
167
|
-
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
static abs2greg(theDate) {
|
|
168
174
|
if (typeof theDate !== 'number') {
|
|
169
175
|
throw new TypeError('Argument to greg.abs2greg not a Number');
|
|
170
176
|
}
|
|
@@ -183,7 +189,8 @@ const greg = {
|
|
|
183
189
|
|
|
184
190
|
return dt;
|
|
185
191
|
}
|
|
186
|
-
|
|
192
|
+
|
|
193
|
+
}
|
|
187
194
|
|
|
188
195
|
const GERESH = '׳';
|
|
189
196
|
const GERSHAYIM = '״';
|
|
@@ -371,19 +378,17 @@ const alias = {
|
|
|
371
378
|
* * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
|
|
372
379
|
* * `he` - Hebrew (e.g. "שַׁבָּת")
|
|
373
380
|
* * `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
|
|
374
|
-
* @namespace
|
|
375
381
|
*/
|
|
376
382
|
|
|
377
|
-
|
|
383
|
+
class Locale {
|
|
378
384
|
/** @private */
|
|
379
|
-
locales
|
|
380
|
-
|
|
385
|
+
static locales = Object.create(null);
|
|
381
386
|
/** @private */
|
|
382
|
-
activeLocale: null,
|
|
383
387
|
|
|
388
|
+
static activeLocale = null;
|
|
384
389
|
/** @private */
|
|
385
|
-
activeName: null,
|
|
386
390
|
|
|
391
|
+
static activeName = null;
|
|
387
392
|
/**
|
|
388
393
|
* Returns translation only if `locale` offers a non-empty translation for `id`.
|
|
389
394
|
* Otherwise, returns `undefined`.
|
|
@@ -391,7 +396,8 @@ const Locale = {
|
|
|
391
396
|
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
392
397
|
* @return {string}
|
|
393
398
|
*/
|
|
394
|
-
|
|
399
|
+
|
|
400
|
+
static lookupTranslation(id, locale) {
|
|
395
401
|
const locale0 = locale && locale.toLowerCase();
|
|
396
402
|
const loc = typeof locale == 'string' && this.locales[locale0] || this.activeLocale;
|
|
397
403
|
const array = loc[id];
|
|
@@ -401,15 +407,16 @@ const Locale = {
|
|
|
401
407
|
}
|
|
402
408
|
|
|
403
409
|
return undefined;
|
|
404
|
-
}
|
|
405
|
-
|
|
410
|
+
}
|
|
406
411
|
/**
|
|
407
412
|
* By default, if no translation was found, returns `id`.
|
|
408
413
|
* @param {string} id Message ID to translate
|
|
409
414
|
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
410
415
|
* @return {string}
|
|
411
416
|
*/
|
|
412
|
-
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
static gettext(id, locale) {
|
|
413
420
|
const text = this.lookupTranslation(id, locale);
|
|
414
421
|
|
|
415
422
|
if (typeof text == 'undefined') {
|
|
@@ -417,21 +424,21 @@ const Locale = {
|
|
|
417
424
|
}
|
|
418
425
|
|
|
419
426
|
return text;
|
|
420
|
-
}
|
|
421
|
-
|
|
427
|
+
}
|
|
422
428
|
/**
|
|
423
429
|
* Register locale translations.
|
|
424
430
|
* @param {string} locale Locale name (i.e.: `'he'`, `'fr'`)
|
|
425
431
|
* @param {LocaleDate} data parsed data from a `.po` file.
|
|
426
432
|
*/
|
|
427
|
-
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
static addLocale(locale, data) {
|
|
428
436
|
if (typeof data.contexts !== 'object' || typeof data.contexts[''] !== 'object') {
|
|
429
437
|
throw new TypeError(`Locale '${locale}' invalid compact format`);
|
|
430
438
|
}
|
|
431
439
|
|
|
432
440
|
this.locales[locale.toLowerCase()] = data.contexts[''];
|
|
433
|
-
}
|
|
434
|
-
|
|
441
|
+
}
|
|
435
442
|
/**
|
|
436
443
|
* Activates a locale. Throws an error if the locale has not been previously added.
|
|
437
444
|
* After setting the locale to be used, all strings marked for translations
|
|
@@ -439,7 +446,9 @@ const Locale = {
|
|
|
439
446
|
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`)
|
|
440
447
|
* @return {LocaleData}
|
|
441
448
|
*/
|
|
442
|
-
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
static useLocale(locale) {
|
|
443
452
|
const locale0 = locale.toLowerCase();
|
|
444
453
|
const obj = this.locales[locale0];
|
|
445
454
|
|
|
@@ -450,30 +459,33 @@ const Locale = {
|
|
|
450
459
|
this.activeName = alias[locale0] || locale0;
|
|
451
460
|
this.activeLocale = obj;
|
|
452
461
|
return this.activeLocale;
|
|
453
|
-
}
|
|
454
|
-
|
|
462
|
+
}
|
|
455
463
|
/**
|
|
456
464
|
* Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
|
|
457
465
|
* @return {string}
|
|
458
466
|
*/
|
|
459
|
-
getLocaleName: function getLocaleName() {
|
|
460
|
-
return this.activeName;
|
|
461
|
-
},
|
|
462
467
|
|
|
468
|
+
|
|
469
|
+
static getLocaleName() {
|
|
470
|
+
return this.activeName;
|
|
471
|
+
}
|
|
463
472
|
/**
|
|
464
473
|
* Returns the names of registered locales
|
|
465
474
|
* @return {string[]}
|
|
466
475
|
*/
|
|
467
|
-
getLocaleNames: function getLocaleNames() {
|
|
468
|
-
return Object.keys(this.locales).sort();
|
|
469
|
-
},
|
|
470
476
|
|
|
477
|
+
|
|
478
|
+
static getLocaleNames() {
|
|
479
|
+
return Object.keys(this.locales).sort();
|
|
480
|
+
}
|
|
471
481
|
/**
|
|
472
482
|
* @param {number} n
|
|
473
483
|
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
474
484
|
* @return {string}
|
|
475
485
|
*/
|
|
476
|
-
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
static ordinal(n, locale) {
|
|
477
489
|
const locale1 = locale && locale.toLowerCase();
|
|
478
490
|
const locale0 = locale1 || this.activeName;
|
|
479
491
|
|
|
@@ -502,28 +514,31 @@ const Locale = {
|
|
|
502
514
|
default:
|
|
503
515
|
return n + '.';
|
|
504
516
|
}
|
|
505
|
-
}
|
|
506
|
-
|
|
517
|
+
}
|
|
507
518
|
/**
|
|
508
519
|
* @private
|
|
509
520
|
* @param {number} n
|
|
510
521
|
* @return {string}
|
|
511
522
|
*/
|
|
512
|
-
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
static getEnOrdinal(n) {
|
|
513
526
|
const s = ['th', 'st', 'nd', 'rd'];
|
|
514
527
|
const v = n % 100;
|
|
515
528
|
return n + (s[(v - 20) % 10] || s[v] || s[0]);
|
|
516
|
-
}
|
|
517
|
-
|
|
529
|
+
}
|
|
518
530
|
/**
|
|
519
531
|
* Removes nekudot from Hebrew string
|
|
520
532
|
* @param {string} str
|
|
521
533
|
* @return {string}
|
|
522
534
|
*/
|
|
523
|
-
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
static hebrewStripNikkud(str) {
|
|
524
538
|
return str.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
|
|
525
539
|
}
|
|
526
|
-
|
|
540
|
+
|
|
541
|
+
}
|
|
527
542
|
Locale.addLocale('en', noopLocale);
|
|
528
543
|
Locale.addLocale('s', noopLocale);
|
|
529
544
|
Locale.addLocale('', noopLocale);
|
|
@@ -549,7 +564,7 @@ Locale.useLocale('en');
|
|
|
549
564
|
You should have received a copy of the GNU General Public License
|
|
550
565
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
551
566
|
*/
|
|
552
|
-
const NISAN$
|
|
567
|
+
const NISAN$3 = 1;
|
|
553
568
|
const IYYAR$1 = 2;
|
|
554
569
|
const SIVAN$2 = 3;
|
|
555
570
|
const TAMUZ$1 = 4;
|
|
@@ -903,7 +918,7 @@ class HDate {
|
|
|
903
918
|
tempabs += HDate.daysInMonth(m, year);
|
|
904
919
|
}
|
|
905
920
|
|
|
906
|
-
for (let m = NISAN$
|
|
921
|
+
for (let m = NISAN$3; m < month; m++) {
|
|
907
922
|
tempabs += HDate.daysInMonth(m, year);
|
|
908
923
|
}
|
|
909
924
|
} else {
|
|
@@ -1049,7 +1064,7 @@ class HDate {
|
|
|
1049
1064
|
* @example
|
|
1050
1065
|
* import {HDate, months} from '@hebcal/core';
|
|
1051
1066
|
* const hd = new HDate(15, months.CHESHVAN, 5769);
|
|
1052
|
-
* console.log(
|
|
1067
|
+
* console.log(hd.renderGematriya()); // 'ט״ו חֶשְׁוָן תשס״ט'
|
|
1053
1068
|
* @return {string}
|
|
1054
1069
|
*/
|
|
1055
1070
|
|
|
@@ -1449,7 +1464,7 @@ class HDate {
|
|
|
1449
1464
|
/* this catches "november" */
|
|
1450
1465
|
}
|
|
1451
1466
|
|
|
1452
|
-
return NISAN$
|
|
1467
|
+
return NISAN$3;
|
|
1453
1468
|
|
|
1454
1469
|
case 'i':
|
|
1455
1470
|
return IYYAR$1;
|
|
@@ -2774,18 +2789,20 @@ class Location {
|
|
|
2774
2789
|
* @param {string} geoid - optional string or numeric geographic ID
|
|
2775
2790
|
*/
|
|
2776
2791
|
constructor(latitude, longitude, il, tzid, cityName, countryCode, geoid) {
|
|
2777
|
-
|
|
2792
|
+
const lat = typeof latitude === 'number' ? latitude : parseFloat(latitude);
|
|
2778
2793
|
|
|
2779
|
-
if (
|
|
2780
|
-
throw new RangeError(`Latitude ${
|
|
2794
|
+
if (isNaN(lat) || lat < -90 || lat > 90) {
|
|
2795
|
+
throw new RangeError(`Latitude ${latitude} out of range [-90,90]`);
|
|
2781
2796
|
}
|
|
2782
2797
|
|
|
2783
|
-
|
|
2798
|
+
const long = typeof longitude === 'number' ? longitude : parseFloat(longitude);
|
|
2784
2799
|
|
|
2785
|
-
if (
|
|
2786
|
-
throw new RangeError(`Longitude ${
|
|
2800
|
+
if (isNaN(long) || long < -180 || long > 180) {
|
|
2801
|
+
throw new RangeError(`Longitude ${longitude} out of range [-180,180]`);
|
|
2787
2802
|
}
|
|
2788
2803
|
|
|
2804
|
+
this.latitude = lat;
|
|
2805
|
+
this.longitude = long;
|
|
2789
2806
|
this.il = Boolean(il);
|
|
2790
2807
|
this.tzid = tzid;
|
|
2791
2808
|
this.name = cityName;
|
|
@@ -3052,7 +3069,7 @@ const TZEIT_3MEDIUM_STARS = 7.083;
|
|
|
3052
3069
|
* @param {HDate} hd
|
|
3053
3070
|
* @param {number} dow
|
|
3054
3071
|
* @param {Location} location
|
|
3055
|
-
* @param {
|
|
3072
|
+
* @param {CalOptions} options
|
|
3056
3073
|
* @return {Event}
|
|
3057
3074
|
*/
|
|
3058
3075
|
|
|
@@ -3463,7 +3480,7 @@ class OmerEvent extends Event {
|
|
|
3463
3480
|
|
|
3464
3481
|
|
|
3465
3482
|
getEmoji() {
|
|
3466
|
-
if (this.emoji) return this.emoji;
|
|
3483
|
+
if (typeof this.emoji === 'string') return this.emoji;
|
|
3467
3484
|
const number = this.omer;
|
|
3468
3485
|
const ones = number % 10;
|
|
3469
3486
|
const tens = Math.floor(number / 10);
|
|
@@ -3473,7 +3490,8 @@ class OmerEvent extends Event {
|
|
|
3473
3490
|
|
|
3474
3491
|
|
|
3475
3492
|
getWeeks() {
|
|
3476
|
-
|
|
3493
|
+
const day7 = this.daysWithinWeeks === 7;
|
|
3494
|
+
return day7 ? this.weekNumber : this.weekNumber - 1;
|
|
3477
3495
|
}
|
|
3478
3496
|
/** @return {number} */
|
|
3479
3497
|
|
|
@@ -4386,7 +4404,7 @@ const TUE = 2; // const WED = 3;
|
|
|
4386
4404
|
const THU = 4;
|
|
4387
4405
|
const FRI$1 = 5;
|
|
4388
4406
|
const SAT$1 = 6;
|
|
4389
|
-
const NISAN$
|
|
4407
|
+
const NISAN$2 = months.NISAN;
|
|
4390
4408
|
const IYYAR = months.IYYAR;
|
|
4391
4409
|
const SIVAN$1 = months.SIVAN;
|
|
4392
4410
|
const TAMUZ = months.TAMUZ;
|
|
@@ -4463,7 +4481,7 @@ const sedraCache = new SimpleMap();
|
|
|
4463
4481
|
* @return {Sedra}
|
|
4464
4482
|
*/
|
|
4465
4483
|
|
|
4466
|
-
function
|
|
4484
|
+
function getSedra_(hyear, il) {
|
|
4467
4485
|
const cacheKey = `${hyear}-${il ? 1 : 0}`;
|
|
4468
4486
|
let sedra = sedraCache.get(cacheKey);
|
|
4469
4487
|
|
|
@@ -4478,6 +4496,11 @@ const emojiIsraelFlag = {
|
|
|
4478
4496
|
emoji: '🇮🇱'
|
|
4479
4497
|
};
|
|
4480
4498
|
const chanukahEmoji = '🕎';
|
|
4499
|
+
const emojiPesach = '🫓';
|
|
4500
|
+
const emojiShavuot = {
|
|
4501
|
+
emoji: '⛰️🌸'
|
|
4502
|
+
};
|
|
4503
|
+
const emojiSukkot = '🌿🍋';
|
|
4481
4504
|
const yearCache = Object.create(null);
|
|
4482
4505
|
/**
|
|
4483
4506
|
* Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
|
|
@@ -4488,7 +4511,7 @@ const yearCache = Object.create(null);
|
|
|
4488
4511
|
* @return {Map<string,Event[]>}
|
|
4489
4512
|
*/
|
|
4490
4513
|
|
|
4491
|
-
function
|
|
4514
|
+
function getHolidaysForYear_(year) {
|
|
4492
4515
|
if (typeof year !== 'number') {
|
|
4493
4516
|
throw new TypeError(`bad Hebrew year: ${year}`);
|
|
4494
4517
|
} else if (year < 1 || year > 32658) {
|
|
@@ -4502,7 +4525,7 @@ function getHolidaysForYear(year) {
|
|
|
4502
4525
|
}
|
|
4503
4526
|
|
|
4504
4527
|
const RH = new HDate(1, TISHREI$1, year);
|
|
4505
|
-
const pesach = new HDate(15, NISAN$
|
|
4528
|
+
const pesach = new HDate(15, NISAN$2, year);
|
|
4506
4529
|
const h = new SimpleMap(); // eslint-disable-next-line require-jsdoc
|
|
4507
4530
|
|
|
4508
4531
|
function add(...events) {
|
|
@@ -4541,27 +4564,45 @@ function getHolidaysForYear(year) {
|
|
|
4541
4564
|
add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, 7 + RH.abs())), 'Shabbat Shuva', SPECIAL_SHABBAT$1));
|
|
4542
4565
|
addEvents(year, [[10, TISHREI$1, 'Yom Kippur', CHAG | YOM_TOV_ENDS$1 | MAJOR_FAST$1, {
|
|
4543
4566
|
emoji: '📖✍️'
|
|
4544
|
-
}], [14, TISHREI$1, 'Erev Sukkot', EREV$1 | LIGHT_CANDLES$1
|
|
4545
|
-
|
|
4546
|
-
|
|
4567
|
+
}], [14, TISHREI$1, 'Erev Sukkot', EREV$1 | LIGHT_CANDLES$1, {
|
|
4568
|
+
emoji: emojiSukkot
|
|
4569
|
+
}], // Attributes for Israel and Diaspora are different
|
|
4570
|
+
[15, TISHREI$1, 'Sukkot I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, {
|
|
4571
|
+
emoji: emojiSukkot
|
|
4572
|
+
}], [16, TISHREI$1, 'Sukkot II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, {
|
|
4573
|
+
emoji: emojiSukkot
|
|
4574
|
+
}], [17, TISHREI$1, 'Sukkot III (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4575
|
+
cholHaMoedDay: 1,
|
|
4576
|
+
emoji: emojiSukkot
|
|
4547
4577
|
}], [18, TISHREI$1, 'Sukkot IV (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4548
|
-
cholHaMoedDay: 2
|
|
4578
|
+
cholHaMoedDay: 2,
|
|
4579
|
+
emoji: emojiSukkot
|
|
4549
4580
|
}], [19, TISHREI$1, 'Sukkot V (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4550
|
-
cholHaMoedDay: 3
|
|
4581
|
+
cholHaMoedDay: 3,
|
|
4582
|
+
emoji: emojiSukkot
|
|
4551
4583
|
}], [20, TISHREI$1, 'Sukkot VI (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4552
|
-
cholHaMoedDay: 4
|
|
4553
|
-
|
|
4554
|
-
|
|
4584
|
+
cholHaMoedDay: 4,
|
|
4585
|
+
emoji: emojiSukkot
|
|
4586
|
+
}], [15, TISHREI$1, 'Sukkot I', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, {
|
|
4587
|
+
emoji: emojiSukkot
|
|
4588
|
+
}], [16, TISHREI$1, 'Sukkot II (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4589
|
+
cholHaMoedDay: 1,
|
|
4590
|
+
emoji: emojiSukkot
|
|
4555
4591
|
}], [17, TISHREI$1, 'Sukkot III (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4556
|
-
cholHaMoedDay: 2
|
|
4592
|
+
cholHaMoedDay: 2,
|
|
4593
|
+
emoji: emojiSukkot
|
|
4557
4594
|
}], [18, TISHREI$1, 'Sukkot IV (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4558
|
-
cholHaMoedDay: 3
|
|
4595
|
+
cholHaMoedDay: 3,
|
|
4596
|
+
emoji: emojiSukkot
|
|
4559
4597
|
}], [19, TISHREI$1, 'Sukkot V (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4560
|
-
cholHaMoedDay: 4
|
|
4598
|
+
cholHaMoedDay: 4,
|
|
4599
|
+
emoji: emojiSukkot
|
|
4561
4600
|
}], [20, TISHREI$1, 'Sukkot VI (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4562
|
-
cholHaMoedDay: 5
|
|
4601
|
+
cholHaMoedDay: 5,
|
|
4602
|
+
emoji: emojiSukkot
|
|
4563
4603
|
}], [21, TISHREI$1, 'Sukkot VII (Hoshana Raba)', LIGHT_CANDLES$1 | CHOL_HAMOED$1, {
|
|
4564
|
-
cholHaMoedDay: -1
|
|
4604
|
+
cholHaMoedDay: -1,
|
|
4605
|
+
emoji: emojiSukkot
|
|
4565
4606
|
}], [22, TISHREI$1, 'Shmini Atzeret', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1], // [22, TISHREI, "Shmini Atzeret / Simchat Torah", YOM_TOV_ENDS | IL_ONLY],
|
|
4566
4607
|
[22, TISHREI$1, 'Shmini Atzeret', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1], [23, TISHREI$1, 'Simchat Torah', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1]]);
|
|
4567
4608
|
add(new HolidayEvent(new HDate(24, KISLEV$1, year), 'Chanukah: 1 Candle', EREV$1 | MINOR_HOLIDAY$1 | CHANUKAH_CANDLES$1, {
|
|
@@ -4594,37 +4635,52 @@ function getHolidaysForYear(year) {
|
|
|
4594
4635
|
add(new HolidayEvent(new HDate(pesachAbs - (pesach.getDay() == SUN ? 28 : 29)), 'Shushan Purim', MINOR_HOLIDAY$1, {
|
|
4595
4636
|
emoji: '🎭️📜'
|
|
4596
4637
|
}), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 14) - 7), 'Shabbat Parah', SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 14)), 'Shabbat HaChodesh', SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 1)), 'Shabbat HaGadol', SPECIAL_SHABBAT$1), new HolidayEvent( // if the fast falls on Shabbat, move to Thursday
|
|
4597
|
-
pesach.prev().getDay() == SAT$1 ? pesach.onOrBefore(THU) : new HDate(14, NISAN$
|
|
4598
|
-
addEvents(year, [[14, NISAN$
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
}], [
|
|
4604
|
-
cholHaMoedDay:
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
}], [
|
|
4610
|
-
cholHaMoedDay:
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
}], [20, NISAN$
|
|
4616
|
-
cholHaMoedDay:
|
|
4617
|
-
|
|
4638
|
+
pesach.prev().getDay() == SAT$1 ? pesach.onOrBefore(THU) : new HDate(14, NISAN$2, year), 'Ta\'anit Bechorot', MINOR_FAST$1));
|
|
4639
|
+
addEvents(year, [[14, NISAN$2, 'Erev Pesach', EREV$1 | LIGHT_CANDLES$1, {
|
|
4640
|
+
emoji: '🫓🍷'
|
|
4641
|
+
}], // Attributes for Israel and Diaspora are different
|
|
4642
|
+
[15, NISAN$2, 'Pesach I', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, {
|
|
4643
|
+
emoji: emojiPesach
|
|
4644
|
+
}], [16, NISAN$2, 'Pesach II (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4645
|
+
cholHaMoedDay: 1,
|
|
4646
|
+
emoji: emojiPesach
|
|
4647
|
+
}], [17, NISAN$2, 'Pesach III (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4648
|
+
cholHaMoedDay: 2,
|
|
4649
|
+
emoji: emojiPesach
|
|
4650
|
+
}], [18, NISAN$2, 'Pesach IV (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4651
|
+
cholHaMoedDay: 3,
|
|
4652
|
+
emoji: emojiPesach
|
|
4653
|
+
}], [19, NISAN$2, 'Pesach V (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4654
|
+
cholHaMoedDay: 4,
|
|
4655
|
+
emoji: emojiPesach
|
|
4656
|
+
}], [20, NISAN$2, 'Pesach VI (CH\'\'M)', LIGHT_CANDLES$1 | IL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4657
|
+
cholHaMoedDay: 5,
|
|
4658
|
+
emoji: emojiPesach
|
|
4659
|
+
}], [21, NISAN$2, 'Pesach VII', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, {
|
|
4660
|
+
emoji: emojiPesach
|
|
4661
|
+
}], [15, NISAN$2, 'Pesach I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, {
|
|
4662
|
+
emoji: '🫓🍷'
|
|
4663
|
+
}], [16, NISAN$2, 'Pesach II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, {
|
|
4664
|
+
emoji: emojiPesach
|
|
4665
|
+
}], [17, NISAN$2, 'Pesach III (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4666
|
+
cholHaMoedDay: 1,
|
|
4667
|
+
emoji: emojiPesach
|
|
4668
|
+
}], [18, NISAN$2, 'Pesach IV (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4669
|
+
cholHaMoedDay: 2,
|
|
4670
|
+
emoji: emojiPesach
|
|
4671
|
+
}], [19, NISAN$2, 'Pesach V (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4672
|
+
cholHaMoedDay: 3,
|
|
4673
|
+
emoji: emojiPesach
|
|
4674
|
+
}], [20, NISAN$2, 'Pesach VI (CH\'\'M)', LIGHT_CANDLES$1 | CHUL_ONLY$1 | CHOL_HAMOED$1, {
|
|
4675
|
+
cholHaMoedDay: 4,
|
|
4676
|
+
emoji: emojiPesach
|
|
4677
|
+
}], [21, NISAN$2, 'Pesach VII', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, {
|
|
4678
|
+
emoji: emojiPesach
|
|
4679
|
+
}], [22, NISAN$2, 'Pesach VIII', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, {
|
|
4680
|
+
emoji: emojiPesach
|
|
4681
|
+
}], [14, IYYAR, 'Pesach Sheni', MINOR_HOLIDAY$1], [18, IYYAR, 'Lag BaOmer', MINOR_HOLIDAY$1, {
|
|
4618
4682
|
emoji: '🔥'
|
|
4619
|
-
}], [5, SIVAN$1, 'Erev Shavuot', EREV$1 | LIGHT_CANDLES$1, {
|
|
4620
|
-
emoji: '⛰️🌸'
|
|
4621
|
-
}], [6, SIVAN$1, 'Shavuot', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, {
|
|
4622
|
-
emoji: '⛰️🌸'
|
|
4623
|
-
}], [6, SIVAN$1, 'Shavuot I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, {
|
|
4624
|
-
emoji: '⛰️🌸'
|
|
4625
|
-
}], [7, SIVAN$1, 'Shavuot II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, {
|
|
4626
|
-
emoji: '⛰️🌸'
|
|
4627
|
-
}], [15, AV, 'Tu B\'Av', MINOR_HOLIDAY$1, {
|
|
4683
|
+
}], [5, SIVAN$1, 'Erev Shavuot', EREV$1 | LIGHT_CANDLES$1, emojiShavuot], [6, SIVAN$1, 'Shavuot', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, emojiShavuot], [6, SIVAN$1, 'Shavuot I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, emojiShavuot], [7, SIVAN$1, 'Shavuot II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, emojiShavuot], [15, AV, 'Tu B\'Av', MINOR_HOLIDAY$1, {
|
|
4628
4684
|
emoji: '❤️'
|
|
4629
4685
|
}], [1, ELUL$1, 'Rosh Hashana LaBehemot', MINOR_HOLIDAY$1, {
|
|
4630
4686
|
emoji: '🐑'
|
|
@@ -4644,7 +4700,7 @@ function getHolidaysForYear(year) {
|
|
|
4644
4700
|
|
|
4645
4701
|
if (year >= 5711) {
|
|
4646
4702
|
// Yom HaShoah first observed in 1951
|
|
4647
|
-
let nisan27dt = new HDate(27, NISAN$
|
|
4703
|
+
let nisan27dt = new HDate(27, NISAN$2, year);
|
|
4648
4704
|
/* When the actual date of Yom Hashoah falls on a Friday, the
|
|
4649
4705
|
* state of Israel observes Yom Hashoah on the preceding
|
|
4650
4706
|
* Thursday. When it falls on a Sunday, Yom Hashoah is observed
|
|
@@ -4653,9 +4709,9 @@ function getHolidaysForYear(year) {
|
|
|
4653
4709
|
*/
|
|
4654
4710
|
|
|
4655
4711
|
if (nisan27dt.getDay() == FRI$1) {
|
|
4656
|
-
nisan27dt = new HDate(26, NISAN$
|
|
4712
|
+
nisan27dt = new HDate(26, NISAN$2, year);
|
|
4657
4713
|
} else if (nisan27dt.getDay() == SUN) {
|
|
4658
|
-
nisan27dt = new HDate(28, NISAN$
|
|
4714
|
+
nisan27dt = new HDate(28, NISAN$2, year);
|
|
4659
4715
|
}
|
|
4660
4716
|
|
|
4661
4717
|
add(new HolidayEvent(nisan27dt, 'Yom HaShoah', MODERN_HOLIDAY$1));
|
|
@@ -4690,7 +4746,7 @@ function getHolidaysForYear(year) {
|
|
|
4690
4746
|
}
|
|
4691
4747
|
|
|
4692
4748
|
if (year >= 5777) {
|
|
4693
|
-
add(new HolidayEvent(new HDate(7, CHESHVAN$1, year), 'Yom HaAliyah School Observance', MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(new HDate(10, NISAN$
|
|
4749
|
+
add(new HolidayEvent(new HDate(7, CHESHVAN$1, year), 'Yom HaAliyah School Observance', MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(new HDate(10, NISAN$2, year), 'Yom HaAliyah', MODERN_HOLIDAY$1, emojiIsraelFlag));
|
|
4694
4750
|
}
|
|
4695
4751
|
|
|
4696
4752
|
let tamuz17 = new HDate(17, TAMUZ, year);
|
|
@@ -4723,7 +4779,7 @@ function getHolidaysForYear(year) {
|
|
|
4723
4779
|
for (let month = 1; month <= monthsInYear; month++) {
|
|
4724
4780
|
const monthName = HDate.getMonthName(month, year);
|
|
4725
4781
|
|
|
4726
|
-
if ((month == NISAN$
|
|
4782
|
+
if ((month == NISAN$2 ? HDate.daysInMonth(HDate.monthsInYear(year - 1), year - 1) : HDate.daysInMonth(month - 1, year)) == 30) {
|
|
4727
4783
|
add(new RoshChodeshEvent(new HDate(1, month, year), monthName));
|
|
4728
4784
|
add(new RoshChodeshEvent(new HDate(30, month - 1, year), monthName));
|
|
4729
4785
|
} else if (month !== TISHREI$1) {
|
|
@@ -4739,7 +4795,7 @@ function getHolidaysForYear(year) {
|
|
|
4739
4795
|
add(new MevarchimChodeshEvent(new HDate(29, month, year).onOrBefore(SAT$1), nextMonthName));
|
|
4740
4796
|
}
|
|
4741
4797
|
|
|
4742
|
-
const sedra =
|
|
4798
|
+
const sedra = getSedra_(year, false);
|
|
4743
4799
|
const beshalachHd = sedra.find(15);
|
|
4744
4800
|
add(new HolidayEvent(beshalachHd, 'Shabbat Shirah', SPECIAL_SHABBAT$1));
|
|
4745
4801
|
yearCache[year] = h;
|
|
@@ -4905,14 +4961,107 @@ class MishnaYomiEvent extends Event {
|
|
|
4905
4961
|
|
|
4906
4962
|
}
|
|
4907
4963
|
|
|
4908
|
-
|
|
4964
|
+
const NISAN$1 = months.NISAN;
|
|
4965
|
+
const CHESHVAN = months.CHESHVAN;
|
|
4966
|
+
const KISLEV = months.KISLEV;
|
|
4967
|
+
const TEVET = months.TEVET;
|
|
4968
|
+
const SHVAT = months.SHVAT;
|
|
4969
|
+
const ADAR_I = months.ADAR_I;
|
|
4970
|
+
const ADAR_II = months.ADAR_II;
|
|
4971
|
+
/**
|
|
4972
|
+
* @private
|
|
4973
|
+
* @param {number} hyear Hebrew year
|
|
4974
|
+
* @param {Date|HDate} gdate Gregorian or Hebrew date of death
|
|
4975
|
+
* @return {HDate} anniversary occurring in hyear
|
|
4976
|
+
*/
|
|
4977
|
+
|
|
4978
|
+
function getYahrzeit_(hyear, gdate) {
|
|
4979
|
+
const orig = HDate.isHDate(gdate) ? gdate : new HDate(gdate);
|
|
4980
|
+
let hDeath = {
|
|
4981
|
+
yy: orig.getFullYear(),
|
|
4982
|
+
mm: orig.getMonth(),
|
|
4983
|
+
dd: orig.getDate()
|
|
4984
|
+
};
|
|
4985
|
+
|
|
4986
|
+
if (hyear <= hDeath.yy) {
|
|
4987
|
+
// `Hebrew year ${hyear} occurs on or before original date in ${hDeath.yy}`
|
|
4988
|
+
return undefined;
|
|
4989
|
+
}
|
|
4990
|
+
|
|
4991
|
+
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !HDate.longCheshvan(hDeath.yy + 1)) {
|
|
4992
|
+
// If it's Heshvan 30 it depends on the first anniversary;
|
|
4993
|
+
// if that was not Heshvan 30, use the day before Kislev 1.
|
|
4994
|
+
hDeath = HDate.abs2hebrew(HDate.hebrew2abs(hyear, KISLEV, 1) - 1);
|
|
4995
|
+
} else if (hDeath.mm == KISLEV && hDeath.dd == 30 && HDate.shortKislev(hDeath.yy + 1)) {
|
|
4996
|
+
// If it's Kislev 30 it depends on the first anniversary;
|
|
4997
|
+
// if that was not Kislev 30, use the day before Teveth 1.
|
|
4998
|
+
hDeath = HDate.abs2hebrew(HDate.hebrew2abs(hyear, TEVET, 1) - 1);
|
|
4999
|
+
} else if (hDeath.mm == ADAR_II) {
|
|
5000
|
+
// If it's Adar II, use the same day in last month of year (Adar or Adar II).
|
|
5001
|
+
hDeath.mm = HDate.monthsInYear(hyear);
|
|
5002
|
+
} else if (hDeath.mm == ADAR_I && hDeath.dd == 30 && !HDate.isLeapYear(hyear)) {
|
|
5003
|
+
// If it's the 30th in Adar I and year is not a leap year
|
|
5004
|
+
// (so Adar has only 29 days), use the last day in Shevat.
|
|
5005
|
+
hDeath.dd = 30;
|
|
5006
|
+
hDeath.mm = SHVAT;
|
|
5007
|
+
} // In all other cases, use the normal anniversary of the date of death.
|
|
5008
|
+
// advance day to rosh chodesh if needed
|
|
5009
|
+
|
|
5010
|
+
|
|
5011
|
+
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !HDate.longCheshvan(hyear)) {
|
|
5012
|
+
hDeath.mm = KISLEV;
|
|
5013
|
+
hDeath.dd = 1;
|
|
5014
|
+
} else if (hDeath.mm == KISLEV && hDeath.dd == 30 && HDate.shortKislev(hyear)) {
|
|
5015
|
+
hDeath.mm = TEVET;
|
|
5016
|
+
hDeath.dd = 1;
|
|
5017
|
+
}
|
|
5018
|
+
|
|
5019
|
+
return new HDate(hDeath.dd, hDeath.mm, hyear);
|
|
5020
|
+
}
|
|
5021
|
+
/**
|
|
5022
|
+
* @private
|
|
5023
|
+
* @param {number} hyear Hebrew year
|
|
5024
|
+
* @param {Date|HDate} gdate Gregorian or Hebrew date of event
|
|
5025
|
+
* @return {HDate} anniversary occurring in `hyear`
|
|
5026
|
+
*/
|
|
5027
|
+
|
|
5028
|
+
function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
5029
|
+
const orig = HDate.isHDate(gdate) ? gdate : new HDate(gdate);
|
|
5030
|
+
const origYear = orig.getFullYear();
|
|
5031
|
+
|
|
5032
|
+
if (hyear <= origYear) {
|
|
5033
|
+
// `Hebrew year ${hyear} occurs on or before original date in ${origYear}`
|
|
5034
|
+
return undefined;
|
|
5035
|
+
}
|
|
5036
|
+
|
|
5037
|
+
const isOrigLeap = HDate.isLeapYear(origYear);
|
|
5038
|
+
let month = orig.getMonth();
|
|
5039
|
+
let day = orig.getDate();
|
|
5040
|
+
|
|
5041
|
+
if (month == ADAR_I && !isOrigLeap || month == ADAR_II && isOrigLeap) {
|
|
5042
|
+
month = HDate.monthsInYear(hyear);
|
|
5043
|
+
} else if (month == CHESHVAN && day == 30 && !HDate.longCheshvan(hyear)) {
|
|
5044
|
+
month = KISLEV;
|
|
5045
|
+
day = 1;
|
|
5046
|
+
} else if (month == KISLEV && day == 30 && HDate.shortKislev(hyear)) {
|
|
5047
|
+
month = TEVET;
|
|
5048
|
+
day = 1;
|
|
5049
|
+
} else if (month == ADAR_I && day == 30 && isOrigLeap && !HDate.isLeapYear(hyear)) {
|
|
5050
|
+
month = NISAN$1;
|
|
5051
|
+
day = 1;
|
|
5052
|
+
}
|
|
5053
|
+
|
|
5054
|
+
return new HDate(day, month, hyear);
|
|
5055
|
+
}
|
|
4909
5056
|
|
|
4910
|
-
|
|
5057
|
+
const version="3.33.6";
|
|
5058
|
+
|
|
5059
|
+
const headers$1={"plural-forms":"nplurals=2; plural=(n > 1);",language:"en_CA@ashkenazi"};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"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
|
|
4911
5060
|
|
|
4912
5061
|
Locale.addLocale('ashkenazi', poAshkenazi);
|
|
4913
5062
|
Locale.addLocale('a', poAshkenazi);
|
|
4914
5063
|
|
|
4915
|
-
|
|
5064
|
+
const headers={"plural-forms":"nplurals=2; plural=(n > 1);",language:"he_IL"};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 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:["עוקצים"]}};var poHe = {headers:headers,contexts:contexts};
|
|
4916
5065
|
|
|
4917
5066
|
Locale.addLocale('he', poHe);
|
|
4918
5067
|
Locale.addLocale('h', poHe);
|
|
@@ -4962,12 +5111,6 @@ const SIVAN = months.SIVAN; // const TAMUZ = months.TAMUZ;
|
|
|
4962
5111
|
|
|
4963
5112
|
const ELUL = months.ELUL;
|
|
4964
5113
|
const TISHREI = months.TISHREI;
|
|
4965
|
-
const CHESHVAN = months.CHESHVAN;
|
|
4966
|
-
const KISLEV = months.KISLEV;
|
|
4967
|
-
const TEVET = months.TEVET;
|
|
4968
|
-
const SHVAT = months.SHVAT;
|
|
4969
|
-
const ADAR_I = months.ADAR_I;
|
|
4970
|
-
const ADAR_II = months.ADAR_II;
|
|
4971
5114
|
const LIGHT_CANDLES = flags.LIGHT_CANDLES;
|
|
4972
5115
|
const YOM_TOV_ENDS = flags.YOM_TOV_ENDS;
|
|
4973
5116
|
const CHUL_ONLY = flags.CHUL_ONLY;
|
|
@@ -5021,7 +5164,7 @@ const RECOGNIZED_OPTIONS = {
|
|
|
5021
5164
|
};
|
|
5022
5165
|
/**
|
|
5023
5166
|
* @private
|
|
5024
|
-
* @param {
|
|
5167
|
+
* @param {CalOptions} options
|
|
5025
5168
|
*/
|
|
5026
5169
|
|
|
5027
5170
|
function warnUnrecognizedOptions(options) {
|
|
@@ -5048,7 +5191,7 @@ function shallowCopy(target, source) {
|
|
|
5048
5191
|
/**
|
|
5049
5192
|
* Modifies options in-place
|
|
5050
5193
|
* @private
|
|
5051
|
-
* @param {
|
|
5194
|
+
* @param {CalOptions} options
|
|
5052
5195
|
*/
|
|
5053
5196
|
|
|
5054
5197
|
|
|
@@ -5083,7 +5226,7 @@ function checkCandleOptions(options) {
|
|
|
5083
5226
|
}
|
|
5084
5227
|
/**
|
|
5085
5228
|
* Options to configure which events are returned
|
|
5086
|
-
* @typedef {Object}
|
|
5229
|
+
* @typedef {Object} CalOptions
|
|
5087
5230
|
* @property {Location} location - latitude/longitude/tzid used for candle-lighting
|
|
5088
5231
|
* @property {number} year - Gregorian or Hebrew year
|
|
5089
5232
|
* @property {boolean} isHebrewYear - to interpret year as Hebrew year
|
|
@@ -5139,7 +5282,7 @@ function getAbs(d) {
|
|
|
5139
5282
|
/**
|
|
5140
5283
|
* Parse options object to determine start & end days
|
|
5141
5284
|
* @private
|
|
5142
|
-
* @param {
|
|
5285
|
+
* @param {CalOptions} options
|
|
5143
5286
|
* @return {number[]}
|
|
5144
5287
|
*/
|
|
5145
5288
|
|
|
@@ -5216,7 +5359,7 @@ function getStartAndEnd(options) {
|
|
|
5216
5359
|
/**
|
|
5217
5360
|
* Mask to filter Holiday array
|
|
5218
5361
|
* @private
|
|
5219
|
-
* @param {
|
|
5362
|
+
* @param {CalOptions} options
|
|
5220
5363
|
* @return {number}
|
|
5221
5364
|
*/
|
|
5222
5365
|
|
|
@@ -5296,20 +5439,51 @@ function getMaskFromOptions(options) {
|
|
|
5296
5439
|
}
|
|
5297
5440
|
|
|
5298
5441
|
const MASK_LIGHT_CANDLES = LIGHT_CANDLES | LIGHT_CANDLES_TZEIS | CHANUKAH_CANDLES | YOM_TOV_ENDS;
|
|
5442
|
+
const defaultLocation = new Location(0, 0, false, 'UTC');
|
|
5443
|
+
const hour12cc = {
|
|
5444
|
+
US: 1,
|
|
5445
|
+
CA: 1,
|
|
5446
|
+
BR: 1,
|
|
5447
|
+
AU: 1,
|
|
5448
|
+
NZ: 1,
|
|
5449
|
+
DO: 1,
|
|
5450
|
+
PR: 1,
|
|
5451
|
+
GR: 1,
|
|
5452
|
+
IN: 1,
|
|
5453
|
+
KR: 1,
|
|
5454
|
+
NP: 1,
|
|
5455
|
+
ZA: 1
|
|
5456
|
+
};
|
|
5457
|
+
/**
|
|
5458
|
+
* @private
|
|
5459
|
+
* @param {Event} ev
|
|
5460
|
+
* @return {boolean}
|
|
5461
|
+
*/
|
|
5462
|
+
|
|
5463
|
+
function observedInIsrael(ev) {
|
|
5464
|
+
return ev.observedInIsrael();
|
|
5465
|
+
}
|
|
5466
|
+
/**
|
|
5467
|
+
* @private
|
|
5468
|
+
* @param {Event} ev
|
|
5469
|
+
* @return {boolean}
|
|
5470
|
+
*/
|
|
5471
|
+
|
|
5472
|
+
|
|
5473
|
+
function observedInDiaspora(ev) {
|
|
5474
|
+
return ev.observedInDiaspora();
|
|
5475
|
+
}
|
|
5299
5476
|
/**
|
|
5300
|
-
* @namespace
|
|
5301
5477
|
* HebrewCalendar is the main interface to the `@hebcal/core` library.
|
|
5302
5478
|
* This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
|
|
5303
5479
|
* Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
|
|
5304
5480
|
* Event names can be rendered in several languges using the `locale` option.
|
|
5305
5481
|
*/
|
|
5306
5482
|
|
|
5307
|
-
const HebrewCalendar = {
|
|
5308
|
-
/** @private */
|
|
5309
|
-
defaultLocation: new Location(0, 0, false, 'UTC'),
|
|
5310
5483
|
|
|
5484
|
+
class HebrewCalendar {
|
|
5311
5485
|
/**
|
|
5312
|
-
* Calculates holidays and other Hebrew calendar events based on {@link
|
|
5486
|
+
* Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
|
|
5313
5487
|
*
|
|
5314
5488
|
* Each holiday is represented by an {@link Event} object which includes a date,
|
|
5315
5489
|
* a description, flags and optional attributes.
|
|
@@ -5405,14 +5579,14 @@ const HebrewCalendar = {
|
|
|
5405
5579
|
* const date = hd.greg();
|
|
5406
5580
|
* console.log(date.toLocaleDateString(), ev.render(), hd.toString());
|
|
5407
5581
|
* }
|
|
5408
|
-
* @param {
|
|
5582
|
+
* @param {CalOptions} [options={}]
|
|
5409
5583
|
* @return {Event[]}
|
|
5410
5584
|
*/
|
|
5411
|
-
calendar
|
|
5585
|
+
static calendar(options = {}) {
|
|
5412
5586
|
options = shallowCopy({}, options); // so we can modify freely
|
|
5413
5587
|
|
|
5414
5588
|
checkCandleOptions(options);
|
|
5415
|
-
const location = options.location = options.location ||
|
|
5589
|
+
const location = options.location = options.location || defaultLocation;
|
|
5416
5590
|
const il = options.il = options.il || location.il || false;
|
|
5417
5591
|
options.mask = getMaskFromOptions(options);
|
|
5418
5592
|
|
|
@@ -5462,7 +5636,7 @@ const HebrewCalendar = {
|
|
|
5462
5636
|
holidaysYear = HebrewCalendar.getHolidaysForYear(currentYear);
|
|
5463
5637
|
|
|
5464
5638
|
if (options.sedrot && currentYear >= 3762) {
|
|
5465
|
-
sedra =
|
|
5639
|
+
sedra = getSedra_(currentYear, il);
|
|
5466
5640
|
}
|
|
5467
5641
|
|
|
5468
5642
|
if (options.omer) {
|
|
@@ -5537,8 +5711,7 @@ const HebrewCalendar = {
|
|
|
5537
5711
|
}
|
|
5538
5712
|
|
|
5539
5713
|
return evts;
|
|
5540
|
-
}
|
|
5541
|
-
|
|
5714
|
+
}
|
|
5542
5715
|
/**
|
|
5543
5716
|
* Calculates a birthday or anniversary (non-yahrzeit).
|
|
5544
5717
|
* `hyear` must be after original `gdate` of anniversary.
|
|
@@ -5565,35 +5738,11 @@ const HebrewCalendar = {
|
|
|
5565
5738
|
* @param {Date|HDate} gdate Gregorian or Hebrew date of event
|
|
5566
5739
|
* @return {HDate} anniversary occurring in `hyear`
|
|
5567
5740
|
*/
|
|
5568
|
-
getBirthdayOrAnniversary: function (hyear, gdate) {
|
|
5569
|
-
const orig = HDate.isHDate(gdate) ? gdate : new HDate(gdate);
|
|
5570
|
-
const origYear = orig.getFullYear();
|
|
5571
|
-
|
|
5572
|
-
if (hyear <= origYear) {
|
|
5573
|
-
// `Hebrew year ${hyear} occurs on or before original date in ${origYear}`
|
|
5574
|
-
return undefined;
|
|
5575
|
-
}
|
|
5576
5741
|
|
|
5577
|
-
const isOrigLeap = HDate.isLeapYear(origYear);
|
|
5578
|
-
let month = orig.getMonth();
|
|
5579
|
-
let day = orig.getDate();
|
|
5580
|
-
|
|
5581
|
-
if (month == ADAR_I && !isOrigLeap || month == ADAR_II && isOrigLeap) {
|
|
5582
|
-
month = HDate.monthsInYear(hyear);
|
|
5583
|
-
} else if (month == CHESHVAN && day == 30 && !HDate.longCheshvan(hyear)) {
|
|
5584
|
-
month = KISLEV;
|
|
5585
|
-
day = 1;
|
|
5586
|
-
} else if (month == KISLEV && day == 30 && HDate.shortKislev(hyear)) {
|
|
5587
|
-
month = TEVET;
|
|
5588
|
-
day = 1;
|
|
5589
|
-
} else if (month == ADAR_I && day == 30 && isOrigLeap && !HDate.isLeapYear(hyear)) {
|
|
5590
|
-
month = NISAN;
|
|
5591
|
-
day = 1;
|
|
5592
|
-
}
|
|
5593
|
-
|
|
5594
|
-
return new HDate(day, month, hyear);
|
|
5595
|
-
},
|
|
5596
5742
|
|
|
5743
|
+
static getBirthdayOrAnniversary(hyear, gdate) {
|
|
5744
|
+
return getBirthdayOrAnniversary_(hyear, gdate);
|
|
5745
|
+
}
|
|
5597
5746
|
/**
|
|
5598
5747
|
* Calculates yahrzeit.
|
|
5599
5748
|
* `hyear` must be after original `gdate` of death.
|
|
@@ -5628,50 +5777,11 @@ const HebrewCalendar = {
|
|
|
5628
5777
|
* @param {Date|HDate} gdate Gregorian or Hebrew date of death
|
|
5629
5778
|
* @return {HDate} anniversary occurring in hyear
|
|
5630
5779
|
*/
|
|
5631
|
-
getYahrzeit: function (hyear, gdate) {
|
|
5632
|
-
const orig = HDate.isHDate(gdate) ? gdate : new HDate(gdate);
|
|
5633
|
-
let hDeath = {
|
|
5634
|
-
yy: orig.getFullYear(),
|
|
5635
|
-
mm: orig.getMonth(),
|
|
5636
|
-
dd: orig.getDate()
|
|
5637
|
-
};
|
|
5638
|
-
|
|
5639
|
-
if (hyear <= hDeath.yy) {
|
|
5640
|
-
// `Hebrew year ${hyear} occurs on or before original date in ${hDeath.yy}`
|
|
5641
|
-
return undefined;
|
|
5642
|
-
}
|
|
5643
|
-
|
|
5644
|
-
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !HDate.longCheshvan(hDeath.yy + 1)) {
|
|
5645
|
-
// If it's Heshvan 30 it depends on the first anniversary;
|
|
5646
|
-
// if that was not Heshvan 30, use the day before Kislev 1.
|
|
5647
|
-
hDeath = HDate.abs2hebrew(HDate.hebrew2abs(hyear, KISLEV, 1) - 1);
|
|
5648
|
-
} else if (hDeath.mm == KISLEV && hDeath.dd == 30 && HDate.shortKislev(hDeath.yy + 1)) {
|
|
5649
|
-
// If it's Kislev 30 it depends on the first anniversary;
|
|
5650
|
-
// if that was not Kislev 30, use the day before Teveth 1.
|
|
5651
|
-
hDeath = HDate.abs2hebrew(HDate.hebrew2abs(hyear, TEVET, 1) - 1);
|
|
5652
|
-
} else if (hDeath.mm == ADAR_II) {
|
|
5653
|
-
// If it's Adar II, use the same day in last month of year (Adar or Adar II).
|
|
5654
|
-
hDeath.mm = HDate.monthsInYear(hyear);
|
|
5655
|
-
} else if (hDeath.mm == ADAR_I && hDeath.dd == 30 && !HDate.isLeapYear(hyear)) {
|
|
5656
|
-
// If it's the 30th in Adar I and year is not a leap year
|
|
5657
|
-
// (so Adar has only 29 days), use the last day in Shevat.
|
|
5658
|
-
hDeath.dd = 30;
|
|
5659
|
-
hDeath.mm = SHVAT;
|
|
5660
|
-
} // In all other cases, use the normal anniversary of the date of death.
|
|
5661
|
-
// advance day to rosh chodesh if needed
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !HDate.longCheshvan(hyear)) {
|
|
5665
|
-
hDeath.mm = KISLEV;
|
|
5666
|
-
hDeath.dd = 1;
|
|
5667
|
-
} else if (hDeath.mm == KISLEV && hDeath.dd == 30 && HDate.shortKislev(hyear)) {
|
|
5668
|
-
hDeath.mm = TEVET;
|
|
5669
|
-
hDeath.dd = 1;
|
|
5670
|
-
}
|
|
5671
5780
|
|
|
5672
|
-
return new HDate(hDeath.dd, hDeath.mm, hyear);
|
|
5673
|
-
},
|
|
5674
5781
|
|
|
5782
|
+
static getYahrzeit(hyear, gdate) {
|
|
5783
|
+
return getYahrzeit_(hyear, gdate);
|
|
5784
|
+
}
|
|
5675
5785
|
/**
|
|
5676
5786
|
* Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
|
|
5677
5787
|
* `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`
|
|
@@ -5680,79 +5790,74 @@ const HebrewCalendar = {
|
|
|
5680
5790
|
* @param {number} year Hebrew year
|
|
5681
5791
|
* @return {Map<string,Event[]>}
|
|
5682
5792
|
*/
|
|
5683
|
-
getHolidaysForYear: getHolidaysForYear,
|
|
5684
5793
|
|
|
5794
|
+
|
|
5795
|
+
static getHolidaysForYear(year) {
|
|
5796
|
+
return getHolidaysForYear_(year);
|
|
5797
|
+
}
|
|
5685
5798
|
/**
|
|
5686
5799
|
* Returns an array of holidays for the year
|
|
5687
5800
|
* @param {number} year Hebrew year
|
|
5688
5801
|
* @param {boolean} il use the Israeli schedule for holidays
|
|
5689
5802
|
* @return {Event[]}
|
|
5690
5803
|
*/
|
|
5691
|
-
|
|
5692
|
-
|
|
5804
|
+
|
|
5805
|
+
|
|
5806
|
+
static getHolidaysForYearArray(year, il) {
|
|
5807
|
+
const yearMap = getHolidaysForYear_(year);
|
|
5693
5808
|
const startAbs = HDate.hebrew2abs(year, TISHREI, 1);
|
|
5694
5809
|
const endAbs = HDate.hebrew2abs(year + 1, TISHREI, 1) - 1;
|
|
5695
|
-
|
|
5810
|
+
let events = [];
|
|
5811
|
+
const myFilter = il ? observedInIsrael : observedInDiaspora;
|
|
5696
5812
|
|
|
5697
5813
|
for (let absDt = startAbs; absDt <= endAbs; absDt++) {
|
|
5698
5814
|
const hd = new HDate(absDt);
|
|
5699
5815
|
const holidays = yearMap.get(hd.toString());
|
|
5700
5816
|
|
|
5701
5817
|
if (holidays) {
|
|
5702
|
-
const filtered = holidays.filter(
|
|
5703
|
-
|
|
5818
|
+
const filtered = holidays.filter(myFilter);
|
|
5819
|
+
events = events.concat(filtered);
|
|
5704
5820
|
}
|
|
5705
5821
|
}
|
|
5706
5822
|
|
|
5707
5823
|
return events;
|
|
5708
|
-
}
|
|
5709
|
-
|
|
5824
|
+
}
|
|
5710
5825
|
/**
|
|
5711
5826
|
* Returns an array of Events on this date (or undefined if no events)
|
|
5712
5827
|
* @param {HDate|Date|number} date Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
5713
5828
|
* @param {boolean} [il] use the Israeli schedule for holidays
|
|
5714
5829
|
* @return {Event[]}
|
|
5715
5830
|
*/
|
|
5716
|
-
|
|
5831
|
+
|
|
5832
|
+
|
|
5833
|
+
static getHolidaysOnDate(date, il) {
|
|
5717
5834
|
const hd = HDate.isHDate(date) ? date : new HDate(date);
|
|
5718
|
-
const yearMap =
|
|
5835
|
+
const yearMap = getHolidaysForYear_(hd.getFullYear());
|
|
5719
5836
|
const events = yearMap.get(hd.toString());
|
|
5720
5837
|
|
|
5721
5838
|
if (typeof il === 'undefined' || typeof events === 'undefined') {
|
|
5722
5839
|
return events;
|
|
5723
5840
|
}
|
|
5724
5841
|
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
US: 1,
|
|
5729
|
-
CA: 1,
|
|
5730
|
-
BR: 1,
|
|
5731
|
-
AU: 1,
|
|
5732
|
-
NZ: 1,
|
|
5733
|
-
DO: 1,
|
|
5734
|
-
PR: 1,
|
|
5735
|
-
GR: 1,
|
|
5736
|
-
IN: 1,
|
|
5737
|
-
KR: 1,
|
|
5738
|
-
NP: 1,
|
|
5739
|
-
ZA: 1
|
|
5740
|
-
},
|
|
5741
|
-
|
|
5842
|
+
const myFilter = il ? observedInIsrael : observedInDiaspora;
|
|
5843
|
+
return events.filter(myFilter);
|
|
5844
|
+
}
|
|
5742
5845
|
/**
|
|
5743
5846
|
* Helper function to format a 23-hour (00:00-23:59) time in US format ("8:13pm") or
|
|
5744
|
-
* keep as "20:13" for any other locale/country. Uses `
|
|
5847
|
+
* keep as "20:13" for any other locale/country. Uses `CalOptions` to determine
|
|
5745
5848
|
* locale.
|
|
5746
5849
|
* @param {string} timeStr - original time like "20:30"
|
|
5747
5850
|
* @param {string} suffix - "p" or "pm" or " P.M.". Add leading space if you want it
|
|
5748
|
-
* @param {
|
|
5851
|
+
* @param {CalOptions} options
|
|
5749
5852
|
* @return {string}
|
|
5750
5853
|
*/
|
|
5751
|
-
|
|
5854
|
+
|
|
5855
|
+
|
|
5856
|
+
static reformatTimeStr(timeStr, suffix, options) {
|
|
5752
5857
|
if (typeof timeStr !== 'string') throw new TypeError(`Bad timeStr: ${timeStr}`);
|
|
5753
5858
|
const cc = options.location && options.location.cc || (options.il ? 'IL' : 'US');
|
|
5754
5859
|
|
|
5755
|
-
if (typeof
|
|
5860
|
+
if (typeof hour12cc[cc] === 'undefined') {
|
|
5756
5861
|
return timeStr;
|
|
5757
5862
|
}
|
|
5758
5863
|
|
|
@@ -5766,13 +5871,13 @@ const HebrewCalendar = {
|
|
|
5766
5871
|
}
|
|
5767
5872
|
|
|
5768
5873
|
return `${hour}:${hm[1]}${suffix}`;
|
|
5769
|
-
}
|
|
5770
|
-
|
|
5874
|
+
}
|
|
5771
5875
|
/** @return {string} */
|
|
5772
|
-
version: function () {
|
|
5773
|
-
return version;
|
|
5774
|
-
},
|
|
5775
5876
|
|
|
5877
|
+
|
|
5878
|
+
static version() {
|
|
5879
|
+
return version;
|
|
5880
|
+
}
|
|
5776
5881
|
/**
|
|
5777
5882
|
* Convenience function to create an instance of `Sedra` or reuse a previously
|
|
5778
5883
|
* created and cached instance.
|
|
@@ -5781,15 +5886,20 @@ const HebrewCalendar = {
|
|
|
5781
5886
|
* @param {boolean} il
|
|
5782
5887
|
* @return {Sedra}
|
|
5783
5888
|
*/
|
|
5784
|
-
|
|
5785
|
-
|
|
5889
|
+
|
|
5890
|
+
|
|
5891
|
+
static getSedra(hyear, il) {
|
|
5892
|
+
return getSedra_(hyear, il);
|
|
5893
|
+
}
|
|
5894
|
+
|
|
5895
|
+
}
|
|
5786
5896
|
/**
|
|
5787
5897
|
* Appends the Event `ev` to the `events` array. Also may add related
|
|
5788
5898
|
* timed events like candle-lighting or fast start/end
|
|
5789
5899
|
* @private
|
|
5790
5900
|
* @param {Event[]} events
|
|
5791
5901
|
* @param {Event} ev
|
|
5792
|
-
* @param {
|
|
5902
|
+
* @param {CalOptions} options
|
|
5793
5903
|
* @param {Event} candlesEv
|
|
5794
5904
|
* @param {number} dow
|
|
5795
5905
|
* @return {Event}
|