@hebcal/core 3.33.4 → 3.33.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,23 @@
1
- /*! @hebcal/core v3.33.4 */
1
+ /*! @hebcal/core v3.33.7 */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
+ function _defineProperty(obj, key, value) {
7
+ if (key in obj) {
8
+ Object.defineProperty(obj, key, {
9
+ value: value,
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true
13
+ });
14
+ } else {
15
+ obj[key] = value;
16
+ }
17
+
18
+ return obj;
19
+ }
20
+
6
21
  /*
7
22
  Hebcal - A Jewish Calendar Generator
8
23
  Copyright (c) 1994-2020 Danny Sadinoff
@@ -46,53 +61,54 @@ function quotient(x, y) {
46
61
  }
47
62
  /**
48
63
  * Gregorian date helper functions.
49
- * @namespace
50
64
  */
51
65
 
52
66
 
53
- const greg = {
67
+ class greg {
54
68
  /**
55
69
  * Long names of the Gregorian months (1='January', 12='December')
56
70
  * @readonly
57
71
  * @type {string[]}
58
72
  */
59
- monthNames: ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
60
73
 
61
74
  /**
62
75
  * Returns true if the Gregorian year is a leap year
63
76
  * @param {number} year Gregorian year
64
77
  * @return {boolean}
65
78
  */
66
- isLeapYear: function (year) {
79
+ static isLeapYear(year) {
67
80
  return !(year % 4) && (!!(year % 100) || !(year % 400));
68
- },
69
-
81
+ }
70
82
  /**
71
83
  * Number of days in the Gregorian month for given year
72
84
  * @param {number} month Gregorian month (1=January, 12=December)
73
85
  * @param {number} year Gregorian year
74
86
  * @return {number}
75
87
  */
76
- daysInMonth: function (month, year) {
88
+
89
+
90
+ static daysInMonth(month, year) {
77
91
  // 1 based months
78
92
  return monthLengths[+this.isLeapYear(year)][month];
79
- },
80
-
93
+ }
81
94
  /**
82
95
  * Returns true if the object is a Javascript Date
83
96
  * @param {Object} obj
84
97
  * @return {boolean}
85
98
  */
86
- isDate: function (obj) {
87
- return typeof obj === 'object' && Date.prototype === obj.__proto__;
88
- },
89
99
 
100
+
101
+ static isDate(obj) {
102
+ return typeof obj === 'object' && Date.prototype === obj.__proto__;
103
+ }
90
104
  /**
91
105
  * Returns number of days since January 1 of that year
92
106
  * @param {Date} date Gregorian date
93
107
  * @return {number}
94
108
  */
95
- dayOfYear: function (date) {
109
+
110
+
111
+ static dayOfYear(date) {
96
112
  if (!this.isDate(date)) {
97
113
  throw new TypeError('Argument to greg.dayOfYear not a Date');
98
114
  }
@@ -109,14 +125,15 @@ const greg = {
109
125
  }
110
126
 
111
127
  return doy;
112
- },
113
-
128
+ }
114
129
  /**
115
130
  * Converts Gregorian date to absolute R.D. (Rata Die) days
116
131
  * @param {Date} date Gregorian date
117
132
  * @return {number}
118
133
  */
119
- greg2abs: function (date) {
134
+
135
+
136
+ static greg2abs(date) {
120
137
  if (!this.isDate(date)) {
121
138
  throw new TypeError('Argument to greg.greg2abs not a Date');
122
139
  }
@@ -127,14 +144,15 @@ const greg = {
127
144
  Math.floor(year / 4) - // + Julian Leap years
128
145
  Math.floor(year / 100) + // - century years
129
146
  Math.floor(year / 400)); // + Gregorian leap years
130
- },
131
-
147
+ }
132
148
  /**
133
149
  * @private
134
150
  * @param {number} theDate - R.D. number of days
135
151
  * @return {number}
136
152
  */
137
- yearFromFixed: function (theDate) {
153
+
154
+
155
+ static yearFromFixed(theDate) {
138
156
  const l0 = theDate - 1;
139
157
  const n400 = quotient(l0, 146097);
140
158
  const d1 = mod(l0, 146097);
@@ -145,8 +163,7 @@ const greg = {
145
163
  const n1 = quotient(d3, 365);
146
164
  const year = 400 * n400 + 100 * n100 + 4 * n4 + n1;
147
165
  return n100 != 4 && n1 != 4 ? year + 1 : year;
148
- },
149
-
166
+ }
150
167
  /**
151
168
  * @private
152
169
  * @param {number} year
@@ -154,11 +171,12 @@ const greg = {
154
171
  * @param {number} day
155
172
  * @return {number}
156
173
  */
157
- toFixed: function (year, month, day) {
174
+
175
+
176
+ static toFixed(year, month, day) {
158
177
  const py = year - 1;
159
178
  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;
160
- },
161
-
179
+ }
162
180
  /**
163
181
  * Converts from Rata Die (R.D. number) to Gregorian date.
164
182
  * See the footnote on page 384 of ``Calendrical Calculations, Part II:
@@ -168,7 +186,9 @@ const greg = {
168
186
  * @param {number} theDate - R.D. number of days
169
187
  * @return {Date}
170
188
  */
171
- abs2greg: function (theDate) {
189
+
190
+
191
+ static abs2greg(theDate) {
172
192
  if (typeof theDate !== 'number') {
173
193
  throw new TypeError('Argument to greg.abs2greg not a Number');
174
194
  }
@@ -187,7 +207,10 @@ const greg = {
187
207
 
188
208
  return dt;
189
209
  }
190
- };
210
+
211
+ }
212
+
213
+ _defineProperty(greg, "monthNames", ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']);
191
214
 
192
215
  const GERESH = '׳';
193
216
  const GERSHAYIM = '״';
@@ -375,18 +398,14 @@ const alias = {
375
398
  * * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
376
399
  * * `he` - Hebrew (e.g. "שַׁבָּת")
377
400
  * * `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
378
- * @namespace
379
401
  */
380
402
 
381
- const Locale = {
403
+ class Locale {
382
404
  /** @private */
383
- locales: Object.create(null),
384
405
 
385
406
  /** @private */
386
- activeLocale: null,
387
407
 
388
408
  /** @private */
389
- activeName: null,
390
409
 
391
410
  /**
392
411
  * Returns translation only if `locale` offers a non-empty translation for `id`.
@@ -395,7 +414,7 @@ const Locale = {
395
414
  * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
396
415
  * @return {string}
397
416
  */
398
- lookupTranslation: function lookupTranslation(id, locale) {
417
+ static lookupTranslation(id, locale) {
399
418
  const locale0 = locale && locale.toLowerCase();
400
419
  const loc = typeof locale == 'string' && this.locales[locale0] || this.activeLocale;
401
420
  const array = loc[id];
@@ -405,15 +424,16 @@ const Locale = {
405
424
  }
406
425
 
407
426
  return undefined;
408
- },
409
-
427
+ }
410
428
  /**
411
429
  * By default, if no translation was found, returns `id`.
412
430
  * @param {string} id Message ID to translate
413
431
  * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
414
432
  * @return {string}
415
433
  */
416
- gettext: function gettext(id, locale) {
434
+
435
+
436
+ static gettext(id, locale) {
417
437
  const text = this.lookupTranslation(id, locale);
418
438
 
419
439
  if (typeof text == 'undefined') {
@@ -421,21 +441,21 @@ const Locale = {
421
441
  }
422
442
 
423
443
  return text;
424
- },
425
-
444
+ }
426
445
  /**
427
446
  * Register locale translations.
428
447
  * @param {string} locale Locale name (i.e.: `'he'`, `'fr'`)
429
448
  * @param {LocaleDate} data parsed data from a `.po` file.
430
449
  */
431
- addLocale: function addLocale(locale, data) {
450
+
451
+
452
+ static addLocale(locale, data) {
432
453
  if (typeof data.contexts !== 'object' || typeof data.contexts[''] !== 'object') {
433
454
  throw new TypeError(`Locale '${locale}' invalid compact format`);
434
455
  }
435
456
 
436
457
  this.locales[locale.toLowerCase()] = data.contexts[''];
437
- },
438
-
458
+ }
439
459
  /**
440
460
  * Activates a locale. Throws an error if the locale has not been previously added.
441
461
  * After setting the locale to be used, all strings marked for translations
@@ -443,7 +463,9 @@ const Locale = {
443
463
  * @param {string} locale Locale name (i.e: `'he'`, `'fr'`)
444
464
  * @return {LocaleData}
445
465
  */
446
- useLocale: function useLocale(locale) {
466
+
467
+
468
+ static useLocale(locale) {
447
469
  const locale0 = locale.toLowerCase();
448
470
  const obj = this.locales[locale0];
449
471
 
@@ -454,30 +476,33 @@ const Locale = {
454
476
  this.activeName = alias[locale0] || locale0;
455
477
  this.activeLocale = obj;
456
478
  return this.activeLocale;
457
- },
458
-
479
+ }
459
480
  /**
460
481
  * Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
461
482
  * @return {string}
462
483
  */
463
- getLocaleName: function getLocaleName() {
464
- return this.activeName;
465
- },
466
484
 
485
+
486
+ static getLocaleName() {
487
+ return this.activeName;
488
+ }
467
489
  /**
468
490
  * Returns the names of registered locales
469
491
  * @return {string[]}
470
492
  */
471
- getLocaleNames: function getLocaleNames() {
472
- return Object.keys(this.locales).sort();
473
- },
474
493
 
494
+
495
+ static getLocaleNames() {
496
+ return Object.keys(this.locales).sort();
497
+ }
475
498
  /**
476
499
  * @param {number} n
477
500
  * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
478
501
  * @return {string}
479
502
  */
480
- ordinal: function ordinal(n, locale) {
503
+
504
+
505
+ static ordinal(n, locale) {
481
506
  const locale1 = locale && locale.toLowerCase();
482
507
  const locale0 = locale1 || this.activeName;
483
508
 
@@ -506,28 +531,38 @@ const Locale = {
506
531
  default:
507
532
  return n + '.';
508
533
  }
509
- },
510
-
534
+ }
511
535
  /**
512
536
  * @private
513
537
  * @param {number} n
514
538
  * @return {string}
515
539
  */
516
- getEnOrdinal: function getEnOrdinal(n) {
540
+
541
+
542
+ static getEnOrdinal(n) {
517
543
  const s = ['th', 'st', 'nd', 'rd'];
518
544
  const v = n % 100;
519
545
  return n + (s[(v - 20) % 10] || s[v] || s[0]);
520
- },
521
-
546
+ }
522
547
  /**
523
548
  * Removes nekudot from Hebrew string
524
549
  * @param {string} str
525
550
  * @return {string}
526
551
  */
527
- hebrewStripNikkud: function hebrewStripNikkud(str) {
552
+
553
+
554
+ static hebrewStripNikkud(str) {
528
555
  return str.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
529
556
  }
530
- };
557
+
558
+ }
559
+
560
+ _defineProperty(Locale, "locales", Object.create(null));
561
+
562
+ _defineProperty(Locale, "activeLocale", null);
563
+
564
+ _defineProperty(Locale, "activeName", null);
565
+
531
566
  Locale.addLocale('en', noopLocale);
532
567
  Locale.addLocale('s', noopLocale);
533
568
  Locale.addLocale('', noopLocale);
@@ -2778,18 +2813,20 @@ class Location {
2778
2813
  * @param {string} geoid - optional string or numeric geographic ID
2779
2814
  */
2780
2815
  constructor(latitude, longitude, il, tzid, cityName, countryCode, geoid) {
2781
- this.latitude = +latitude;
2816
+ const lat = typeof latitude === 'number' ? latitude : parseFloat(latitude);
2782
2817
 
2783
- if (this.latitude < -90 || this.latitude > 90) {
2784
- throw new RangeError(`Latitude ${this.latitude} out of range [-90,90]`);
2818
+ if (isNaN(lat) || lat < -90 || lat > 90) {
2819
+ throw new RangeError(`Latitude ${latitude} out of range [-90,90]`);
2785
2820
  }
2786
2821
 
2787
- this.longitude = +longitude;
2822
+ const long = typeof longitude === 'number' ? longitude : parseFloat(longitude);
2788
2823
 
2789
- if (this.longitude < -180 || this.longitude > 180) {
2790
- throw new RangeError(`Longitude ${this.longitude} out of range [-180,180]`);
2824
+ if (isNaN(long) || long < -180 || long > 180) {
2825
+ throw new RangeError(`Longitude ${longitude} out of range [-180,180]`);
2791
2826
  }
2792
2827
 
2828
+ this.latitude = lat;
2829
+ this.longitude = long;
2793
2830
  this.il = Boolean(il);
2794
2831
  this.tzid = tzid;
2795
2832
  this.name = cityName;
@@ -3056,7 +3093,7 @@ const TZEIT_3MEDIUM_STARS = 7.083;
3056
3093
  * @param {HDate} hd
3057
3094
  * @param {number} dow
3058
3095
  * @param {Location} location
3059
- * @param {HebrewCalendar.Options} options
3096
+ * @param {CalOptions} options
3060
3097
  * @return {Event}
3061
3098
  */
3062
3099
 
@@ -3467,7 +3504,7 @@ class OmerEvent extends Event {
3467
3504
 
3468
3505
 
3469
3506
  getEmoji() {
3470
- if (this.emoji) return this.emoji;
3507
+ if (typeof this.emoji === 'string') return this.emoji;
3471
3508
  const number = this.omer;
3472
3509
  const ones = number % 10;
3473
3510
  const tens = Math.floor(number / 10);
@@ -3477,7 +3514,8 @@ class OmerEvent extends Event {
3477
3514
 
3478
3515
 
3479
3516
  getWeeks() {
3480
- return this.weekNumber;
3517
+ const day7 = this.daysWithinWeeks === 7;
3518
+ return day7 ? this.weekNumber : this.weekNumber - 1;
3481
3519
  }
3482
3520
  /** @return {number} */
3483
3521
 
@@ -4482,6 +4520,11 @@ const emojiIsraelFlag = {
4482
4520
  emoji: '🇮🇱'
4483
4521
  };
4484
4522
  const chanukahEmoji = '🕎';
4523
+ const emojiPesach = '🫓';
4524
+ const emojiShavuot = {
4525
+ emoji: '⛰️🌸'
4526
+ };
4527
+ const emojiSukkot = '🌿🍋';
4485
4528
  const yearCache = Object.create(null);
4486
4529
  /**
4487
4530
  * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
@@ -4538,34 +4581,48 @@ function getHolidaysForYear_(year) {
4538
4581
  add(new RoshHashanaEvent(RH, year, CHAG | LIGHT_CANDLES_TZEIS$1));
4539
4582
  addEvents(year, [[2, TISHREI$1, 'Rosh Hashana II', CHAG | YOM_TOV_ENDS$1, {
4540
4583
  emoji: '🍏🍯'
4541
- }], [3 + (RH.getDay() == THU), TISHREI$1, 'Tzom Gedaliah', MINOR_FAST$1], [9, TISHREI$1, 'Erev Yom Kippur', EREV$1 | LIGHT_CANDLES$1, {
4542
- emoji: '📖✍️'
4543
- }]]); // first SAT after RH
4584
+ }], [3 + (RH.getDay() == THU), TISHREI$1, 'Tzom Gedaliah', MINOR_FAST$1], [9, TISHREI$1, 'Erev Yom Kippur', EREV$1 | LIGHT_CANDLES$1]]); // first SAT after RH
4544
4585
 
4545
4586
  add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, 7 + RH.abs())), 'Shabbat Shuva', SPECIAL_SHABBAT$1));
4546
- addEvents(year, [[10, TISHREI$1, 'Yom Kippur', CHAG | YOM_TOV_ENDS$1 | MAJOR_FAST$1, {
4547
- emoji: '📖✍️'
4548
- }], [14, TISHREI$1, 'Erev Sukkot', EREV$1 | LIGHT_CANDLES$1], // Attributes for Israel and Diaspora are different
4549
- [15, TISHREI$1, 'Sukkot I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1], [16, TISHREI$1, 'Sukkot II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1], [17, TISHREI$1, 'Sukkot III (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4550
- cholHaMoedDay: 1
4587
+ addEvents(year, [[10, TISHREI$1, 'Yom Kippur', CHAG | YOM_TOV_ENDS$1 | MAJOR_FAST$1], [14, TISHREI$1, 'Erev Sukkot', EREV$1 | LIGHT_CANDLES$1, {
4588
+ emoji: emojiSukkot
4589
+ }], // Attributes for Israel and Diaspora are different
4590
+ [15, TISHREI$1, 'Sukkot I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, {
4591
+ emoji: emojiSukkot
4592
+ }], [16, TISHREI$1, 'Sukkot II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, {
4593
+ emoji: emojiSukkot
4594
+ }], [17, TISHREI$1, 'Sukkot III (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4595
+ cholHaMoedDay: 1,
4596
+ emoji: emojiSukkot
4551
4597
  }], [18, TISHREI$1, 'Sukkot IV (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4552
- cholHaMoedDay: 2
4598
+ cholHaMoedDay: 2,
4599
+ emoji: emojiSukkot
4553
4600
  }], [19, TISHREI$1, 'Sukkot V (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4554
- cholHaMoedDay: 3
4601
+ cholHaMoedDay: 3,
4602
+ emoji: emojiSukkot
4555
4603
  }], [20, TISHREI$1, 'Sukkot VI (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4556
- cholHaMoedDay: 4
4557
- }], [15, TISHREI$1, 'Sukkot I', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1], [16, TISHREI$1, 'Sukkot II (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4558
- cholHaMoedDay: 1
4604
+ cholHaMoedDay: 4,
4605
+ emoji: emojiSukkot
4606
+ }], [15, TISHREI$1, 'Sukkot I', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, {
4607
+ emoji: emojiSukkot
4608
+ }], [16, TISHREI$1, 'Sukkot II (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4609
+ cholHaMoedDay: 1,
4610
+ emoji: emojiSukkot
4559
4611
  }], [17, TISHREI$1, 'Sukkot III (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4560
- cholHaMoedDay: 2
4612
+ cholHaMoedDay: 2,
4613
+ emoji: emojiSukkot
4561
4614
  }], [18, TISHREI$1, 'Sukkot IV (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4562
- cholHaMoedDay: 3
4615
+ cholHaMoedDay: 3,
4616
+ emoji: emojiSukkot
4563
4617
  }], [19, TISHREI$1, 'Sukkot V (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4564
- cholHaMoedDay: 4
4618
+ cholHaMoedDay: 4,
4619
+ emoji: emojiSukkot
4565
4620
  }], [20, TISHREI$1, 'Sukkot VI (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4566
- cholHaMoedDay: 5
4621
+ cholHaMoedDay: 5,
4622
+ emoji: emojiSukkot
4567
4623
  }], [21, TISHREI$1, 'Sukkot VII (Hoshana Raba)', LIGHT_CANDLES$1 | CHOL_HAMOED$1, {
4568
- cholHaMoedDay: -1
4624
+ cholHaMoedDay: -1,
4625
+ emoji: emojiSukkot
4569
4626
  }], [22, TISHREI$1, 'Shmini Atzeret', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1], // [22, TISHREI, "Shmini Atzeret / Simchat Torah", YOM_TOV_ENDS | IL_ONLY],
4570
4627
  [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]]);
4571
4628
  add(new HolidayEvent(new HDate(24, KISLEV$1, year), 'Chanukah: 1 Candle', EREV$1 | MINOR_HOLIDAY$1 | CHANUKAH_CANDLES$1, {
@@ -4599,36 +4656,51 @@ function getHolidaysForYear_(year) {
4599
4656
  emoji: '🎭️📜'
4600
4657
  }), 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
4601
4658
  pesach.prev().getDay() == SAT$1 ? pesach.onOrBefore(THU) : new HDate(14, NISAN$2, year), 'Ta\'anit Bechorot', MINOR_FAST$1));
4602
- addEvents(year, [[14, NISAN$2, 'Erev Pesach', EREV$1 | LIGHT_CANDLES$1], // Attributes for Israel and Diaspora are different
4603
- [15, NISAN$2, 'Pesach I', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1], [16, NISAN$2, 'Pesach II (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4604
- cholHaMoedDay: 1
4659
+ addEvents(year, [[14, NISAN$2, 'Erev Pesach', EREV$1 | LIGHT_CANDLES$1, {
4660
+ emoji: '🫓🍷'
4661
+ }], // Attributes for Israel and Diaspora are different
4662
+ [15, NISAN$2, 'Pesach I', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, {
4663
+ emoji: emojiPesach
4664
+ }], [16, NISAN$2, 'Pesach II (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4665
+ cholHaMoedDay: 1,
4666
+ emoji: emojiPesach
4605
4667
  }], [17, NISAN$2, 'Pesach III (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4606
- cholHaMoedDay: 2
4668
+ cholHaMoedDay: 2,
4669
+ emoji: emojiPesach
4607
4670
  }], [18, NISAN$2, 'Pesach IV (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4608
- cholHaMoedDay: 3
4671
+ cholHaMoedDay: 3,
4672
+ emoji: emojiPesach
4609
4673
  }], [19, NISAN$2, 'Pesach V (CH\'\'M)', IL_ONLY$1 | CHOL_HAMOED$1, {
4610
- cholHaMoedDay: 4
4674
+ cholHaMoedDay: 4,
4675
+ emoji: emojiPesach
4611
4676
  }], [20, NISAN$2, 'Pesach VI (CH\'\'M)', LIGHT_CANDLES$1 | IL_ONLY$1 | CHOL_HAMOED$1, {
4612
- cholHaMoedDay: 5
4613
- }], [21, NISAN$2, 'Pesach VII', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1], [15, NISAN$2, 'Pesach I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1], [16, NISAN$2, 'Pesach II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1], [17, NISAN$2, 'Pesach III (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4614
- cholHaMoedDay: 1
4677
+ cholHaMoedDay: 5,
4678
+ emoji: emojiPesach
4679
+ }], [21, NISAN$2, 'Pesach VII', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, {
4680
+ emoji: emojiPesach
4681
+ }], [15, NISAN$2, 'Pesach I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, {
4682
+ emoji: '🫓🍷'
4683
+ }], [16, NISAN$2, 'Pesach II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, {
4684
+ emoji: emojiPesach
4685
+ }], [17, NISAN$2, 'Pesach III (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4686
+ cholHaMoedDay: 1,
4687
+ emoji: emojiPesach
4615
4688
  }], [18, NISAN$2, 'Pesach IV (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4616
- cholHaMoedDay: 2
4689
+ cholHaMoedDay: 2,
4690
+ emoji: emojiPesach
4617
4691
  }], [19, NISAN$2, 'Pesach V (CH\'\'M)', CHUL_ONLY$1 | CHOL_HAMOED$1, {
4618
- cholHaMoedDay: 3
4692
+ cholHaMoedDay: 3,
4693
+ emoji: emojiPesach
4619
4694
  }], [20, NISAN$2, 'Pesach VI (CH\'\'M)', LIGHT_CANDLES$1 | CHUL_ONLY$1 | CHOL_HAMOED$1, {
4620
- cholHaMoedDay: 4
4621
- }], [21, NISAN$2, 'Pesach VII', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1], [22, NISAN$2, 'Pesach VIII', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1], [14, IYYAR, 'Pesach Sheni', MINOR_HOLIDAY$1], [18, IYYAR, 'Lag BaOmer', MINOR_HOLIDAY$1, {
4695
+ cholHaMoedDay: 4,
4696
+ emoji: emojiPesach
4697
+ }], [21, NISAN$2, 'Pesach VII', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, {
4698
+ emoji: emojiPesach
4699
+ }], [22, NISAN$2, 'Pesach VIII', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, {
4700
+ emoji: emojiPesach
4701
+ }], [14, IYYAR, 'Pesach Sheni', MINOR_HOLIDAY$1], [18, IYYAR, 'Lag BaOmer', MINOR_HOLIDAY$1, {
4622
4702
  emoji: '🔥'
4623
- }], [5, SIVAN$1, 'Erev Shavuot', EREV$1 | LIGHT_CANDLES$1, {
4624
- emoji: '⛰️🌸'
4625
- }], [6, SIVAN$1, 'Shavuot', CHAG | YOM_TOV_ENDS$1 | IL_ONLY$1, {
4626
- emoji: '⛰️🌸'
4627
- }], [6, SIVAN$1, 'Shavuot I', CHAG | LIGHT_CANDLES_TZEIS$1 | CHUL_ONLY$1, {
4628
- emoji: '⛰️🌸'
4629
- }], [7, SIVAN$1, 'Shavuot II', CHAG | YOM_TOV_ENDS$1 | CHUL_ONLY$1, {
4630
- emoji: '⛰️🌸'
4631
- }], [15, AV, 'Tu B\'Av', MINOR_HOLIDAY$1, {
4703
+ }], [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, {
4632
4704
  emoji: '❤️'
4633
4705
  }], [1, ELUL$1, 'Rosh Hashana LaBehemot', MINOR_HOLIDAY$1, {
4634
4706
  emoji: '🐑'
@@ -5002,7 +5074,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
5002
5074
  return new HDate(day, month, hyear);
5003
5075
  }
5004
5076
 
5005
- var version="3.33.4";
5077
+ var version="3.33.7";
5006
5078
 
5007
5079
  var headers$1={"plural-forms":"nplurals=2; plural=(n > 1);",language:"en_CA@ashkenazi"};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"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
5008
5080
 
@@ -5112,7 +5184,7 @@ const RECOGNIZED_OPTIONS = {
5112
5184
  };
5113
5185
  /**
5114
5186
  * @private
5115
- * @param {HebrewCalendar.Options} options
5187
+ * @param {CalOptions} options
5116
5188
  */
5117
5189
 
5118
5190
  function warnUnrecognizedOptions(options) {
@@ -5139,7 +5211,7 @@ function shallowCopy(target, source) {
5139
5211
  /**
5140
5212
  * Modifies options in-place
5141
5213
  * @private
5142
- * @param {HebrewCalendar.Options} options
5214
+ * @param {CalOptions} options
5143
5215
  */
5144
5216
 
5145
5217
 
@@ -5174,7 +5246,7 @@ function checkCandleOptions(options) {
5174
5246
  }
5175
5247
  /**
5176
5248
  * Options to configure which events are returned
5177
- * @typedef {Object} HebrewCalendar.Options
5249
+ * @typedef {Object} CalOptions
5178
5250
  * @property {Location} location - latitude/longitude/tzid used for candle-lighting
5179
5251
  * @property {number} year - Gregorian or Hebrew year
5180
5252
  * @property {boolean} isHebrewYear - to interpret year as Hebrew year
@@ -5230,7 +5302,7 @@ function getAbs(d) {
5230
5302
  /**
5231
5303
  * Parse options object to determine start & end days
5232
5304
  * @private
5233
- * @param {HebrewCalendar.Options} options
5305
+ * @param {CalOptions} options
5234
5306
  * @return {number[]}
5235
5307
  */
5236
5308
 
@@ -5307,7 +5379,7 @@ function getStartAndEnd(options) {
5307
5379
  /**
5308
5380
  * Mask to filter Holiday array
5309
5381
  * @private
5310
- * @param {HebrewCalendar.Options} options
5382
+ * @param {CalOptions} options
5311
5383
  * @return {number}
5312
5384
  */
5313
5385
 
@@ -5431,7 +5503,7 @@ function observedInDiaspora(ev) {
5431
5503
 
5432
5504
  class HebrewCalendar {
5433
5505
  /**
5434
- * Calculates holidays and other Hebrew calendar events based on {@link HebrewCalendar.Options}.
5506
+ * Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
5435
5507
  *
5436
5508
  * Each holiday is represented by an {@link Event} object which includes a date,
5437
5509
  * a description, flags and optional attributes.
@@ -5527,7 +5599,7 @@ class HebrewCalendar {
5527
5599
  * const date = hd.greg();
5528
5600
  * console.log(date.toLocaleDateString(), ev.render(), hd.toString());
5529
5601
  * }
5530
- * @param {HebrewCalendar.Options} [options={}]
5602
+ * @param {CalOptions} [options={}]
5531
5603
  * @return {Event[]}
5532
5604
  */
5533
5605
  static calendar(options = {}) {
@@ -5792,11 +5864,11 @@ class HebrewCalendar {
5792
5864
  }
5793
5865
  /**
5794
5866
  * Helper function to format a 23-hour (00:00-23:59) time in US format ("8:13pm") or
5795
- * keep as "20:13" for any other locale/country. Uses `HebrewCalendar.Options` to determine
5867
+ * keep as "20:13" for any other locale/country. Uses `CalOptions` to determine
5796
5868
  * locale.
5797
5869
  * @param {string} timeStr - original time like "20:30"
5798
5870
  * @param {string} suffix - "p" or "pm" or " P.M.". Add leading space if you want it
5799
- * @param {HebrewCalendar.Options} options
5871
+ * @param {CalOptions} options
5800
5872
  * @return {string}
5801
5873
  */
5802
5874
 
@@ -5847,7 +5919,7 @@ class HebrewCalendar {
5847
5919
  * @private
5848
5920
  * @param {Event[]} events
5849
5921
  * @param {Event} ev
5850
- * @param {HebrewCalendar.Options} options
5922
+ * @param {CalOptions} options
5851
5923
  * @param {Event} candlesEv
5852
5924
  * @param {number} dow
5853
5925
  * @return {Event}