@hebcal/core 5.3.9 → 5.3.11

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.3.9 */
1
+ /*! @hebcal/core v5.3.11 */
2
2
  /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
3
3
  /** @private */
4
4
  const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
@@ -7732,14 +7732,6 @@ function pad4(number) {
7732
7732
  return String(number);
7733
7733
  }
7734
7734
 
7735
- Object.defineProperties(globalThis, p({
7736
- Temporal: mr
7737
- })), Object.defineProperties(Intl, p({
7738
- DateTimeFormat: Sr
7739
- })), Object.defineProperties(Date.prototype, p({
7740
- toTemporalInstant: toTemporalInstant
7741
- }));
7742
-
7743
7735
  /**
7744
7736
  * @private
7745
7737
  * @param {number} number
@@ -7752,6 +7744,24 @@ function pad2(number) {
7752
7744
  return String(number);
7753
7745
  }
7754
7746
 
7747
+ /**
7748
+ * Returns YYYY-MM-DD in the local timezone
7749
+ * @private
7750
+ * @param {Date} dt
7751
+ * @return {string}
7752
+ */
7753
+ function isoDateString(dt) {
7754
+ return pad4(dt.getFullYear()) + '-' + pad2(dt.getMonth() + 1) + '-' + pad2(dt.getDate());
7755
+ }
7756
+
7757
+ Object.defineProperties(globalThis, p({
7758
+ Temporal: mr
7759
+ })), Object.defineProperties(Intl, p({
7760
+ DateTimeFormat: Sr
7761
+ })), Object.defineProperties(Date.prototype, p({
7762
+ toTemporalInstant: toTemporalInstant
7763
+ }));
7764
+
7755
7765
  /**
7756
7766
  * @private
7757
7767
  * @param {Temporal.ZonedDateTime} zdt
@@ -7834,6 +7844,7 @@ class Zmanim {
7834
7844
  /**
7835
7845
  * Convenience function to get the time when sun is above or below the horizon
7836
7846
  * for a certain angle (in degrees).
7847
+ * This function does not support elevation adjustment.
7837
7848
  * @param {number} angle
7838
7849
  * @param {boolean} rising
7839
7850
  * @return {Date}
@@ -7845,6 +7856,7 @@ class Zmanim {
7845
7856
  }
7846
7857
  /**
7847
7858
  * Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
7859
+ * If elevation is enabled, this function will include elevation in the calculation.
7848
7860
  * @return {Date}
7849
7861
  */
7850
7862
  sunrise() {
@@ -7852,7 +7864,8 @@ class Zmanim {
7852
7864
  return zdtToDate(zdt);
7853
7865
  }
7854
7866
  /**
7855
- * Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
7867
+ * Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon).
7868
+ * This function does not support elevation adjustment.
7856
7869
  * @return {Date}
7857
7870
  */
7858
7871
  seaLevelSunrise() {
@@ -7860,7 +7873,8 @@ class Zmanim {
7860
7873
  return zdtToDate(zdt);
7861
7874
  }
7862
7875
  /**
7863
- * When the upper edge of the Sun disappears below the horizon (0.833° below horizon)
7876
+ * When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
7877
+ * If elevation is enabled, this function will include elevation in the calculation.
7864
7878
  * @return {Date}
7865
7879
  */
7866
7880
  sunset() {
@@ -7868,7 +7882,8 @@ class Zmanim {
7868
7882
  return zdtToDate(zdt);
7869
7883
  }
7870
7884
  /**
7871
- * When the upper edge of the Sun disappears below the horizon (0.833° below horizon)
7885
+ * When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
7886
+ * This function does not support elevation adjustment.
7872
7887
  * @return {Date}
7873
7888
  */
7874
7889
  seaLevelSunset() {
@@ -7876,7 +7891,9 @@ class Zmanim {
7876
7891
  return zdtToDate(zdt);
7877
7892
  }
7878
7893
  /**
7879
- * Civil dawn; Sun is 6° below the horizon in the morning
7894
+ * Civil dawn; Sun is 6° below the horizon in the morning.
7895
+ * Because degree-based functions estimate the amount of light in the sky,
7896
+ * the result is not impacted by elevation.
7880
7897
  * @return {Date}
7881
7898
  */
7882
7899
  dawn() {
@@ -7884,14 +7901,20 @@ class Zmanim {
7884
7901
  return zdtToDate(zdt);
7885
7902
  }
7886
7903
  /**
7887
- * Civil dusk; Sun is 6° below the horizon in the evening
7904
+ * Civil dusk; Sun is 6° below the horizon in the evening.
7905
+ * Because degree-based functions estimate the amount of light in the sky,
7906
+ * the result is not impacted by elevation.
7888
7907
  * @return {Date}
7889
7908
  */
7890
7909
  dusk() {
7891
7910
  const zdt = this.noaa.getEndCivilTwilight();
7892
7911
  return zdtToDate(zdt);
7893
7912
  }
7894
- /** @return {Date} */
7913
+ /**
7914
+ * Returns sunset for the previous day.
7915
+ * If elevation is enabled, this function will include elevation in the calculation.
7916
+ * @return {Date}
7917
+ */
7895
7918
  gregEve() {
7896
7919
  const prev = new Date(this.date);
7897
7920
  prev.setDate(prev.getDate() - 1);
@@ -7910,32 +7933,41 @@ class Zmanim {
7910
7933
  * @return {Date}
7911
7934
  */
7912
7935
  chatzot() {
7913
- const zdt = this.noaa.getSunTransit();
7936
+ const startOfDay = this.noaa.getSeaLevelSunrise();
7937
+ const endOfDay = this.noaa.getSeaLevelSunset();
7938
+ const zdt = this.noaa.getSunTransit(startOfDay, endOfDay);
7914
7939
  return zdtToDate(zdt);
7915
7940
  }
7916
7941
  /**
7917
- * Midnight – Chatzot; Sunset plus 6 halachic hours
7942
+ * Midnight – Chatzot; Sunset plus 6 halachic hours.
7943
+ * If elevation is enabled, this function will include elevation in the calculation.
7918
7944
  * @return {Date}
7919
7945
  */
7920
7946
  chatzotNight() {
7921
7947
  return new Date(this.sunrise().getTime() - this.nightHour() * 6);
7922
7948
  }
7923
7949
  /**
7924
- * Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning
7950
+ * Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning.
7951
+ * Because degree-based functions estimate the amount of light in the sky,
7952
+ * the result is not impacted by elevation.
7925
7953
  * @return {Date}
7926
7954
  */
7927
7955
  alotHaShachar() {
7928
7956
  return this.timeAtAngle(16.1, true);
7929
7957
  }
7930
7958
  /**
7931
- * Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning
7959
+ * Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning.
7960
+ * Because degree-based functions estimate the amount of light in the sky,
7961
+ * the result is not impacted by elevation.
7932
7962
  * @return {Date}
7933
7963
  */
7934
7964
  misheyakir() {
7935
7965
  return this.timeAtAngle(11.5, true);
7936
7966
  }
7937
7967
  /**
7938
- * Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning
7968
+ * Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning.
7969
+ * Because degree-based functions estimate the amount of light in the sky,
7970
+ * the result is not impacted by elevation.
7939
7971
  * @return {Date}
7940
7972
  */
7941
7973
  misheyakirMachmir() {
@@ -7956,7 +7988,8 @@ class Zmanim {
7956
7988
  return zdtToDate(zdt);
7957
7989
  }
7958
7990
  /**
7959
- * Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra
7991
+ * Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra.
7992
+ * If elevation is enabled, this function will include elevation in the calculation.
7960
7993
  * @return {Date}
7961
7994
  */
7962
7995
  sofZmanShma() {
@@ -7964,7 +7997,8 @@ class Zmanim {
7964
7997
  return this.getShaahZmanisBasedZman(3);
7965
7998
  }
7966
7999
  /**
7967
- * Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra
8000
+ * Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra.
8001
+ * If elevation is enabled, this function will include elevation in the calculation.
7968
8002
  * @return {Date}
7969
8003
  */
7970
8004
  sofZmanTfilla() {
@@ -8064,21 +8098,24 @@ class Zmanim {
8064
8098
  return new Date(alot.getTime() + 4 * temporalHour);
8065
8099
  }
8066
8100
  /**
8067
- * Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours
8101
+ * Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours.
8102
+ * If elevation is enabled, this function will include elevation in the calculation.
8068
8103
  * @return {Date}
8069
8104
  */
8070
8105
  minchaGedola() {
8071
8106
  return this.getShaahZmanisBasedZman(6.5);
8072
8107
  }
8073
8108
  /**
8074
- * Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours
8109
+ * Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours.
8110
+ * If elevation is enabled, this function will include elevation in the calculation.
8075
8111
  * @return {Date}
8076
8112
  */
8077
8113
  minchaKetana() {
8078
8114
  return this.getShaahZmanisBasedZman(9.5);
8079
8115
  }
8080
8116
  /**
8081
- * Plag haMincha; Sunrise plus 10.75 halachic hours
8117
+ * Plag haMincha; Sunrise plus 10.75 halachic hours.
8118
+ * If elevation is enabled, this function will include elevation in the calculation.
8082
8119
  * @return {Date}
8083
8120
  */
8084
8121
  plagHaMincha() {
@@ -8087,6 +8124,8 @@ class Zmanim {
8087
8124
  /**
8088
8125
  * @param {number} [angle=8.5] optional time for solar depression.
8089
8126
  * Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars.
8127
+ * Because degree-based functions estimate the amount of light in the sky,
8128
+ * the result is not impacted by elevation.
8090
8129
  * @return {Date}
8091
8130
  */
8092
8131
  tzeit(angle = 8.5) {
@@ -8110,7 +8149,9 @@ class Zmanim {
8110
8149
  * Rabbeinu Tam holds that bein hashmashos is a specific time
8111
8150
  * between sunset and tzeis hakochavim.
8112
8151
  * One opinion on how to calculate this time is that
8113
- * it is 13.5 minutes before tzies 7.083
8152
+ * it is 13.5 minutes before tzies 7.083.
8153
+ * Because degree-based functions estimate the amount of light in the sky,
8154
+ * the result is not impacted by elevation.
8114
8155
  * @return {Date}
8115
8156
  */
8116
8157
  beinHaShmashos() {
@@ -8186,6 +8227,8 @@ class Zmanim {
8186
8227
 
8187
8228
  /**
8188
8229
  * Returns sunrise + `offset` minutes (either positive or negative).
8230
+ * If elevation is enabled, this function will include elevation in the calculation
8231
+ * unless `forceSeaLevel` is `true`.
8189
8232
  * @param {number} offset minutes
8190
8233
  * @param {boolean} roundMinute round time to nearest minute (default true)
8191
8234
  * @param {boolean} forceSeaLevel use sea-level sunrise (default false)
@@ -8208,6 +8251,8 @@ class Zmanim {
8208
8251
 
8209
8252
  /**
8210
8253
  * Returns sunset + `offset` minutes (either positive or negative).
8254
+ * If elevation is enabled, this function will include elevation in the calculation
8255
+ * unless `forceSeaLevel` is `true`.
8211
8256
  * @param {number} offset minutes
8212
8257
  * @param {boolean} roundMinute round time to nearest minute (default true)
8213
8258
  * @param {boolean} forceSeaLevel use sea-level sunset (default false)
@@ -9491,8 +9536,7 @@ class ParshaEvent extends Event {
9491
9536
 
9492
9537
  /** @return {string} */
9493
9538
  urlDateSuffix() {
9494
- const isoDateTime = this.getDate().greg().toISOString();
9495
- const isoDate = isoDateTime.substring(0, isoDateTime.indexOf('T'));
9539
+ const isoDate = isoDateString(this.getDate().greg());
9496
9540
  return isoDate.replace(/-/g, '');
9497
9541
  }
9498
9542
  }
@@ -9627,55 +9671,161 @@ const SIGD = 'Sigd';
9627
9671
  const YOM_HAALIYAH = 'Yom HaAliyah';
9628
9672
  const YOM_HAALIYAH_SCHOOL_OBSERVANCE = 'Yom HaAliyah School Observance';
9629
9673
  const HEBREW_LANGUAGE_DAY = 'Hebrew Language Day';
9630
- const holidayDesc$1 = {
9631
- ROSH_HASHANA_II,
9632
- EREV_YOM_KIPPUR,
9633
- YOM_KIPPUR,
9634
- EREV_SUKKOT,
9635
- SUKKOT_I,
9636
- SUKKOT_II,
9637
- SUKKOT_III_CHM,
9638
- SUKKOT_IV_CHM,
9639
- SUKKOT_V_CHM,
9640
- SUKKOT_VI_CHM,
9641
- SHMINI_ATZERET,
9642
- SIMCHAT_TORAH,
9643
- SUKKOT_II_CHM,
9644
- SUKKOT_VII_HOSHANA_RABA,
9674
+
9675
+ /**
9676
+ * Transliterated names of holidays, used by `Event.getDesc()`
9677
+ * @readonly
9678
+ * @enum {string}
9679
+ */
9680
+ const holidayDesc = {
9681
+ /** Asara B'Tevet */
9682
+ ASARA_BTEVET: 'Asara B\'Tevet',
9683
+ /** Birkat Hachamah */
9684
+ BIRKAT_HACHAMAH: 'Birkat Hachamah',
9685
+ /** Chag HaBanot */
9686
+ CHAG_HABANOT: 'Chag HaBanot',
9687
+ /** Chanukah: 8th Day */
9688
+ CHANUKAH_8TH_DAY: 'Chanukah: 8th Day',
9689
+ /** Erev Tish'a B'Av */
9690
+ EREV_TISHA_BAV: 'Erev Tish\'a B\'Av',
9691
+ /** Leil Selichot */
9692
+ LEIL_SELICHOT: 'Leil Selichot',
9693
+ /** Purim Katan */
9694
+ PURIM_KATAN: 'Purim Katan',
9695
+ /** Purim Meshulash */
9696
+ PURIM_MESHULASH: 'Purim Meshulash',
9697
+ /** Shabbat Chazon */
9698
+ SHABBAT_CHAZON: 'Shabbat Chazon',
9699
+ /** Shabbat HaChodesh */
9700
+ SHABBAT_HACHODESH: 'Shabbat HaChodesh',
9701
+ /** Shabbat HaGadol */
9702
+ SHABBAT_HAGADOL: 'Shabbat HaGadol',
9703
+ /** Shabbat Nachamu */
9704
+ SHABBAT_NACHAMU: 'Shabbat Nachamu',
9705
+ /** Shabbat Parah */
9706
+ SHABBAT_PARAH: 'Shabbat Parah',
9707
+ /** Shabbat Shekalim */
9708
+ SHABBAT_SHEKALIM: 'Shabbat Shekalim',
9709
+ /** Shabbat Shirah */
9710
+ SHABBAT_SHIRAH: 'Shabbat Shirah',
9711
+ /** Shabbat Shuva */
9712
+ SHABBAT_SHUVA: 'Shabbat Shuva',
9713
+ /** Shabbat Zachor */
9714
+ SHABBAT_ZACHOR: 'Shabbat Zachor',
9715
+ /** Shushan Purim Katan */
9716
+ SHUSHAN_PURIM_KATAN: 'Shushan Purim Katan',
9717
+ /** Ta'anit Bechorot */
9718
+ TAANIT_BECHOROT: 'Ta\'anit Bechorot',
9719
+ /** Ta'anit Esther */
9720
+ TAANIT_ESTHER: 'Ta\'anit Esther',
9721
+ /** Tish'a B'Av */
9722
+ TISHA_BAV: 'Tish\'a B\'Av',
9723
+ /** Tzom Gedaliah */
9724
+ TZOM_GEDALIAH: 'Tzom Gedaliah',
9725
+ /** Tzom Tammuz */
9726
+ TZOM_TAMMUZ: 'Tzom Tammuz',
9727
+ /** Yom HaAtzma'ut */
9728
+ YOM_HAATZMA_UT: 'Yom HaAtzma\'ut',
9729
+ /** Yom HaShoah */
9730
+ YOM_HASHOAH: 'Yom HaShoah',
9731
+ /** Yom HaZikaron */
9732
+ YOM_HAZIKARON: 'Yom HaZikaron',
9733
+ /** Ben-Gurion Day */
9734
+ BEN_GURION_DAY,
9735
+ /** Chanukah: 1 Candle */
9645
9736
  CHANUKAH_1_CANDLE,
9646
- TU_BISHVAT,
9647
- EREV_PURIM,
9648
- PURIM,
9649
- SHUSHAN_PURIM,
9737
+ /** Erev Pesach */
9650
9738
  EREV_PESACH,
9739
+ /** Erev Purim */
9740
+ EREV_PURIM,
9741
+ /** Erev Rosh Hashana */
9742
+ EREV_ROSH_HASHANA,
9743
+ /** Erev Shavuot */
9744
+ EREV_SHAVUOT,
9745
+ /** Erev Sukkot */
9746
+ EREV_SUKKOT,
9747
+ /** Erev Yom Kippur */
9748
+ EREV_YOM_KIPPUR,
9749
+ /** Family Day */
9750
+ FAMILY_DAY,
9751
+ /** Hebrew Language Day */
9752
+ HEBREW_LANGUAGE_DAY,
9753
+ /** Herzl Day */
9754
+ HERZL_DAY,
9755
+ /** Jabotinsky Day */
9756
+ JABOTINSKY_DAY,
9757
+ /** Lag BaOmer */
9758
+ LAG_BAOMER,
9759
+ /** Pesach I */
9651
9760
  PESACH_I,
9761
+ /** Pesach II */
9652
9762
  PESACH_II,
9653
- PESACH_II_CHM,
9763
+ /** Pesach III (CH''M) */
9654
9764
  PESACH_III_CHM,
9765
+ /** Pesach II (CH''M) */
9766
+ PESACH_II_CHM,
9767
+ /** Pesach IV (CH''M) */
9655
9768
  PESACH_IV_CHM,
9656
- PESACH_V_CHM,
9657
- PESACH_VI_CHM,
9769
+ /** Pesach Sheni */
9770
+ PESACH_SHENI,
9771
+ /** Pesach VII */
9658
9772
  PESACH_VII,
9773
+ /** Pesach VIII */
9659
9774
  PESACH_VIII,
9660
- PESACH_SHENI,
9661
- LAG_BAOMER,
9662
- EREV_SHAVUOT,
9775
+ /** Pesach VI (CH''M) */
9776
+ PESACH_VI_CHM,
9777
+ /** Pesach V (CH''M) */
9778
+ PESACH_V_CHM,
9779
+ /** Purim */
9780
+ PURIM,
9781
+ /** Rosh Hashana II */
9782
+ ROSH_HASHANA_II,
9783
+ /** Rosh Hashana LaBehemot */
9784
+ ROSH_HASHANA_LABEHEMOT,
9785
+ /** Shavuot */
9663
9786
  SHAVUOT,
9787
+ /** Shavuot I */
9664
9788
  SHAVUOT_I,
9789
+ /** Shavuot II */
9665
9790
  SHAVUOT_II,
9791
+ /** Shmini Atzeret */
9792
+ SHMINI_ATZERET,
9793
+ /** Shushan Purim */
9794
+ SHUSHAN_PURIM,
9795
+ /** Sigd */
9796
+ SIGD,
9797
+ /** Simchat Torah */
9798
+ SIMCHAT_TORAH,
9799
+ /** Sukkot I */
9800
+ SUKKOT_I,
9801
+ /** Sukkot II */
9802
+ SUKKOT_II,
9803
+ /** Sukkot III (CH''M) */
9804
+ SUKKOT_III_CHM,
9805
+ /** Sukkot II (CH''M) */
9806
+ SUKKOT_II_CHM,
9807
+ /** Sukkot IV (CH''M) */
9808
+ SUKKOT_IV_CHM,
9809
+ /** Sukkot VII (Hoshana Raba) */
9810
+ SUKKOT_VII_HOSHANA_RABA,
9811
+ /** Sukkot VI (CH''M) */
9812
+ SUKKOT_VI_CHM,
9813
+ /** Sukkot V (CH''M) */
9814
+ SUKKOT_V_CHM,
9815
+ /** Tu B\'Av */
9666
9816
  TU_BAV,
9667
- ROSH_HASHANA_LABEHEMOT,
9668
- EREV_ROSH_HASHANA,
9669
- YOM_YERUSHALAYIM,
9670
- BEN_GURION_DAY,
9671
- FAMILY_DAY,
9817
+ /** Tu BiShvat */
9818
+ TU_BISHVAT,
9819
+ /** Yitzhak Rabin Memorial Day */
9672
9820
  YITZHAK_RABIN_MEMORIAL_DAY,
9673
- HERZL_DAY,
9674
- JABOTINSKY_DAY,
9675
- SIGD,
9821
+ /** Yom HaAliyah */
9676
9822
  YOM_HAALIYAH,
9823
+ /** Yom HaAliyah School Observance */
9677
9824
  YOM_HAALIYAH_SCHOOL_OBSERVANCE,
9678
- HEBREW_LANGUAGE_DAY
9825
+ /** Yom Kippur */
9826
+ YOM_KIPPUR,
9827
+ /** Yom Yerushalayim */
9828
+ YOM_YERUSHALAYIM
9679
9829
  };
9680
9830
  const staticHolidays = [{
9681
9831
  mm: Tishrei,
@@ -10101,67 +10251,6 @@ const MODERN_HOLIDAY$1 = flags.MODERN_HOLIDAY;
10101
10251
  const MAJOR_FAST$1 = flags.MAJOR_FAST;
10102
10252
  const MINOR_HOLIDAY$1 = flags.MINOR_HOLIDAY;
10103
10253
  const EREV$1 = flags.EREV;
10104
- const SHABBAT_SHUVA = 'Shabbat Shuva';
10105
- const CHAG_HABANOT = 'Chag HaBanot';
10106
- const SHABBAT_SHEKALIM = 'Shabbat Shekalim';
10107
- const SHABBAT_ZACHOR = 'Shabbat Zachor';
10108
- const TAANIT_ESTHER = 'Ta\'anit Esther';
10109
- const SHABBAT_PARAH = 'Shabbat Parah';
10110
- const SHABBAT_HACHODESH = 'Shabbat HaChodesh';
10111
- const SHABBAT_HAGADOL = 'Shabbat HaGadol';
10112
- const TAANIT_BECHOROT = 'Ta\'anit Bechorot';
10113
- const LEIL_SELICHOT = 'Leil Selichot';
10114
- const PURIM_MESHULASH = 'Purim Meshulash';
10115
- const PURIM_KATAN = 'Purim Katan';
10116
- const SHUSHAN_PURIM_KATAN = 'Shushan Purim Katan';
10117
- const YOM_HASHOAH = 'Yom HaShoah';
10118
- const YOM_HAZIKARON = 'Yom HaZikaron';
10119
- const YOM_HAATZMA_UT = 'Yom HaAtzma\'ut';
10120
- const TZOM_GEDALIAH = 'Tzom Gedaliah';
10121
- const TZOM_TAMMUZ = 'Tzom Tammuz';
10122
- const SHABBAT_CHAZON = 'Shabbat Chazon';
10123
- const EREV_TISHA_BAV = 'Erev Tish\'a B\'Av';
10124
- const TISHA_BAV = 'Tish\'a B\'Av';
10125
- const SHABBAT_NACHAMU = 'Shabbat Nachamu';
10126
- const SHABBAT_SHIRAH = 'Shabbat Shirah';
10127
- const BIRKAT_HACHAMAH = 'Birkat Hachamah';
10128
- const CHANUKAH_8TH_DAY = 'Chanukah: 8th Day';
10129
- const ASARA_BTEVET = 'Asara B\'Tevet';
10130
-
10131
- /**
10132
- * Transliterated names of holidays, used by `Event.getDesc()`
10133
- * @readonly
10134
- * @enum {string}
10135
- */
10136
- const holidayDesc = {
10137
- ...holidayDesc$1,
10138
- SHABBAT_SHUVA,
10139
- CHAG_HABANOT,
10140
- SHABBAT_SHEKALIM,
10141
- SHABBAT_ZACHOR,
10142
- TAANIT_ESTHER,
10143
- SHABBAT_PARAH,
10144
- SHABBAT_HACHODESH,
10145
- SHABBAT_HAGADOL,
10146
- TAANIT_BECHOROT,
10147
- LEIL_SELICHOT,
10148
- PURIM_MESHULASH,
10149
- PURIM_KATAN,
10150
- SHUSHAN_PURIM_KATAN,
10151
- YOM_HASHOAH,
10152
- YOM_HAZIKARON,
10153
- YOM_HAATZMA_UT,
10154
- TZOM_GEDALIAH,
10155
- TZOM_TAMMUZ,
10156
- SHABBAT_CHAZON,
10157
- EREV_TISHA_BAV,
10158
- TISHA_BAV,
10159
- SHABBAT_NACHAMU,
10160
- SHABBAT_SHIRAH,
10161
- BIRKAT_HACHAMAH,
10162
- CHANUKAH_8TH_DAY,
10163
- ASARA_BTEVET
10164
- };
10165
10254
 
10166
10255
  /** Represents a built-in holiday like Pesach, Purim or Tu BiShvat */
10167
10256
  class HolidayEvent extends Event {
@@ -10202,22 +10291,24 @@ class HolidayEvent extends Event {
10202
10291
  if (cats[0] !== 'unknown') {
10203
10292
  return cats;
10204
10293
  }
10294
+ // Don't depend on flags.MINOR_HOLIDAY always being set. Look for minor holidays.
10205
10295
  const desc = this.getDesc();
10206
- // Don't depend on flags.MINOR_HOLIDAY always being set
10207
- switch (desc) {
10208
- case holidayDesc$1.LAG_BAOMER:
10209
- case LEIL_SELICHOT:
10210
- case holidayDesc$1.PESACH_SHENI:
10211
- case holidayDesc$1.EREV_PURIM:
10212
- case PURIM_KATAN:
10213
- case holidayDesc$1.SHUSHAN_PURIM:
10214
- case holidayDesc$1.TU_BAV:
10215
- case holidayDesc$1.TU_BISHVAT:
10216
- case holidayDesc$1.ROSH_HASHANA_LABEHEMOT:
10217
- return ['holiday', 'minor'];
10218
- default:
10219
- return ['holiday', 'major'];
10220
- }
10296
+ const {
10297
+ LAG_BAOMER,
10298
+ LEIL_SELICHOT,
10299
+ PESACH_SHENI,
10300
+ EREV_PURIM,
10301
+ PURIM_KATAN,
10302
+ SHUSHAN_PURIM,
10303
+ TU_BAV,
10304
+ TU_BISHVAT,
10305
+ ROSH_HASHANA_LABEHEMOT
10306
+ } = holidayDesc;
10307
+ const minorHolidays = [LAG_BAOMER, LEIL_SELICHOT, PESACH_SHENI, EREV_PURIM, PURIM_KATAN, SHUSHAN_PURIM, TU_BAV, TU_BISHVAT, ROSH_HASHANA_LABEHEMOT];
10308
+ if (minorHolidays.includes(desc)) {
10309
+ return ['holiday', 'minor'];
10310
+ }
10311
+ return ['holiday', 'major'];
10221
10312
  }
10222
10313
  /**
10223
10314
  * Returns (translated) description of this event
@@ -10280,8 +10371,7 @@ class RoshChodeshEvent extends HolidayEvent {
10280
10371
  class AsaraBTevetEvent extends HolidayEvent {
10281
10372
  /** @return {string} */
10282
10373
  urlDateSuffix() {
10283
- const isoDateTime = this.getDate().greg().toISOString();
10284
- const isoDate = isoDateTime.substring(0, isoDateTime.indexOf('T'));
10374
+ const isoDate = isoDateString(this.getDate().greg());
10285
10375
  return isoDate.replace(/-/g, '');
10286
10376
  }
10287
10377
  }
@@ -10371,7 +10461,7 @@ class YomKippurKatanEvent extends HolidayEvent {
10371
10461
  * @param {string} nextMonthName name of the upcoming month
10372
10462
  */
10373
10463
  constructor(date, nextMonthName) {
10374
- super(date, `${ykk} ${nextMonthName}`, flags.MINOR_FAST | flags.YOM_KIPPUR_KATAN);
10464
+ super(date, `${ykk} ${nextMonthName}`, MINOR_FAST$1 | flags.YOM_KIPPUR_KATAN);
10375
10465
  this.nextMonthName = nextMonthName;
10376
10466
  this.memo = `Minor Day of Atonement on the day preceeding Rosh Chodesh ${nextMonthName}`;
10377
10467
  }
@@ -10471,11 +10561,11 @@ function getHolidaysForYear_(year) {
10471
10561
  add(new RoshHashanaEvent(RH, year, CHAG | LIGHT_CANDLES_TZEIS$1));
10472
10562
 
10473
10563
  // Variable date holidays
10474
- add(new HolidayEvent(new HDate(3 + (RH.getDay() == THU), TISHREI$1, year), TZOM_GEDALIAH, MINOR_FAST$1));
10564
+ add(new HolidayEvent(new HDate(3 + (RH.getDay() == THU), TISHREI$1, year), holidayDesc.TZOM_GEDALIAH, MINOR_FAST$1));
10475
10565
  // first SAT after RH
10476
- add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, 7 + RH.abs())), SHABBAT_SHUVA, SPECIAL_SHABBAT$1));
10566
+ add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, 7 + RH.abs())), holidayDesc.SHABBAT_SHUVA, SPECIAL_SHABBAT$1));
10477
10567
  const rchTevet = HDate.shortKislev(year) ? new HDate(1, TEVET, year) : new HDate(30, KISLEV, year);
10478
- add(new HolidayEvent(rchTevet, CHAG_HABANOT, MINOR_HOLIDAY$1));
10568
+ add(new HolidayEvent(rchTevet, holidayDesc.CHAG_HABANOT, MINOR_HOLIDAY$1));
10479
10569
  // yes, we know Kislev 30-32 are wrong
10480
10570
  // HDate() corrects the month automatically
10481
10571
  for (let candles = 2; candles <= 8; candles++) {
@@ -10485,37 +10575,38 @@ function getHolidaysForYear_(year) {
10485
10575
  emoji: chanukahEmoji + KEYCAP_DIGITS[candles]
10486
10576
  }));
10487
10577
  }
10488
- add(new HolidayEvent(new HDate(32, KISLEV, year), CHANUKAH_8TH_DAY, MINOR_HOLIDAY$1, {
10578
+ add(new HolidayEvent(new HDate(32, KISLEV, year), holidayDesc.CHANUKAH_8TH_DAY, MINOR_HOLIDAY$1, {
10489
10579
  chanukahDay: 8,
10490
10580
  emoji: chanukahEmoji
10491
10581
  }));
10492
- add(new AsaraBTevetEvent(new HDate(10, TEVET, year), ASARA_BTEVET, MINOR_FAST$1));
10582
+ add(new AsaraBTevetEvent(new HDate(10, TEVET, year), holidayDesc.ASARA_BTEVET, MINOR_FAST$1));
10493
10583
  const pesachAbs = pesach.abs();
10494
- add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 43)), SHABBAT_SHEKALIM, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 30)), SHABBAT_ZACHOR, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(pesachAbs - (pesach.getDay() == TUE ? 33 : 31)), TAANIT_ESTHER, MINOR_FAST$1));
10495
- add(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(
10584
+ add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 43)), holidayDesc.SHABBAT_SHEKALIM, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 30)), holidayDesc.SHABBAT_ZACHOR, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(pesachAbs - (pesach.getDay() == TUE ? 33 : 31)), holidayDesc.TAANIT_ESTHER, MINOR_FAST$1));
10585
+ const haChodeshAbs = HDate.dayOnOrBefore(SAT$1, pesachAbs - 14);
10586
+ add(new HolidayEvent(new HDate(haChodeshAbs - 7), holidayDesc.SHABBAT_PARAH, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(haChodeshAbs), holidayDesc.SHABBAT_HACHODESH, SPECIAL_SHABBAT$1), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, pesachAbs - 1)), holidayDesc.SHABBAT_HAGADOL, SPECIAL_SHABBAT$1), new HolidayEvent(
10496
10587
  // if the fast falls on Shabbat, move to Thursday
10497
- pesach.prev().getDay() == SAT$1 ? pesach.onOrBefore(THU) : new HDate(14, NISAN$1, year), TAANIT_BECHOROT, MINOR_FAST$1));
10498
- add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, new HDate(1, TISHREI$1, year + 1).abs() - 4)), LEIL_SELICHOT, MINOR_HOLIDAY$1, {
10588
+ pesach.prev().getDay() == SAT$1 ? pesach.onOrBefore(THU) : new HDate(14, NISAN$1, year), holidayDesc.TAANIT_BECHOROT, MINOR_FAST$1));
10589
+ add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, new HDate(1, TISHREI$1, year + 1).abs() - 4)), holidayDesc.LEIL_SELICHOT, MINOR_HOLIDAY$1, {
10499
10590
  emoji: '🕍'
10500
10591
  }));
10501
10592
  if (pesach.getDay() == SUN) {
10502
- add(new HolidayEvent(new HDate(16, ADAR_II, year), PURIM_MESHULASH, MINOR_HOLIDAY$1));
10593
+ add(new HolidayEvent(new HDate(16, ADAR_II, year), holidayDesc.PURIM_MESHULASH, MINOR_HOLIDAY$1));
10503
10594
  }
10504
10595
  if (HDate.isLeapYear(year)) {
10505
- add(new HolidayEvent(new HDate(14, ADAR_I, year), PURIM_KATAN, MINOR_HOLIDAY$1, {
10596
+ add(new HolidayEvent(new HDate(14, ADAR_I, year), holidayDesc.PURIM_KATAN, MINOR_HOLIDAY$1, {
10506
10597
  emoji: '🎭️'
10507
10598
  }));
10508
- add(new HolidayEvent(new HDate(15, ADAR_I, year), SHUSHAN_PURIM_KATAN, MINOR_HOLIDAY$1, {
10599
+ add(new HolidayEvent(new HDate(15, ADAR_I, year), holidayDesc.SHUSHAN_PURIM_KATAN, MINOR_HOLIDAY$1, {
10509
10600
  emoji: '🎭️'
10510
10601
  }));
10511
10602
  }
10512
10603
  const nisan27dt = dateYomHaShoah(year);
10513
10604
  if (nisan27dt) {
10514
- add(new HolidayEvent(nisan27dt, YOM_HASHOAH, MODERN_HOLIDAY$1));
10605
+ add(new HolidayEvent(nisan27dt, holidayDesc.YOM_HASHOAH, MODERN_HOLIDAY$1));
10515
10606
  }
10516
10607
  const yomHaZikaronDt = dateYomHaZikaron(year);
10517
10608
  if (yomHaZikaronDt) {
10518
- add(new HolidayEvent(yomHaZikaronDt, YOM_HAZIKARON, MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(yomHaZikaronDt.next(), YOM_HAATZMA_UT, MODERN_HOLIDAY$1, emojiIsraelFlag));
10609
+ add(new HolidayEvent(yomHaZikaronDt, holidayDesc.YOM_HAZIKARON, MODERN_HOLIDAY$1, emojiIsraelFlag), new HolidayEvent(yomHaZikaronDt.next(), holidayDesc.YOM_HAATZMA_UT, MODERN_HOLIDAY$1, emojiIsraelFlag));
10519
10610
  }
10520
10611
  for (const h of staticModernHolidays) {
10521
10612
  if (year >= h.firstYear) {
@@ -10544,9 +10635,9 @@ function getHolidaysForYear_(year) {
10544
10635
  observed: true
10545
10636
  };
10546
10637
  }
10547
- add(new HolidayEvent(tamuz17, TZOM_TAMMUZ, MINOR_FAST$1, tamuz17attrs));
10638
+ add(new HolidayEvent(tamuz17, holidayDesc.TZOM_TAMMUZ, MINOR_FAST$1, tamuz17attrs));
10548
10639
  let av9dt = new HDate(9, AV, year);
10549
- let av9title = TISHA_BAV;
10640
+ let av9title = holidayDesc.TISHA_BAV;
10550
10641
  let av9attrs;
10551
10642
  if (av9dt.getDay() == SAT$1) {
10552
10643
  av9dt = av9dt.next();
@@ -10556,7 +10647,7 @@ function getHolidaysForYear_(year) {
10556
10647
  av9title += ' (observed)';
10557
10648
  }
10558
10649
  const av9abs = av9dt.abs();
10559
- add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, av9abs)), SHABBAT_CHAZON, SPECIAL_SHABBAT$1), new HolidayEvent(av9dt.prev(), EREV_TISHA_BAV, EREV$1 | MAJOR_FAST$1, av9attrs), new HolidayEvent(av9dt, av9title, MAJOR_FAST$1, av9attrs), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, av9abs + 7)), SHABBAT_NACHAMU, SPECIAL_SHABBAT$1));
10650
+ add(new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, av9abs)), holidayDesc.SHABBAT_CHAZON, SPECIAL_SHABBAT$1), new HolidayEvent(av9dt.prev(), holidayDesc.EREV_TISHA_BAV, EREV$1 | MAJOR_FAST$1, av9attrs), new HolidayEvent(av9dt, av9title, MAJOR_FAST$1, av9attrs), new HolidayEvent(new HDate(HDate.dayOnOrBefore(SAT$1, av9abs + 7)), holidayDesc.SHABBAT_NACHAMU, SPECIAL_SHABBAT$1));
10560
10651
  const monthsInYear = HDate.monthsInYear(year);
10561
10652
  for (let month = 1; month <= monthsInYear; month++) {
10562
10653
  const monthName = HDate.getMonthName(month, year);
@@ -10589,13 +10680,13 @@ function getHolidaysForYear_(year) {
10589
10680
  }
10590
10681
  const sedra = getSedra_(year, false);
10591
10682
  const beshalachHd = sedra.find(15);
10592
- add(new HolidayEvent(beshalachHd, SHABBAT_SHIRAH, SPECIAL_SHABBAT$1));
10683
+ add(new HolidayEvent(beshalachHd, holidayDesc.SHABBAT_SHIRAH, SPECIAL_SHABBAT$1));
10593
10684
 
10594
10685
  // Birkat Hachamah appears only once every 28 years
10595
10686
  const birkatHaChama = getBirkatHaChama(year);
10596
10687
  if (birkatHaChama) {
10597
10688
  const hd = new HDate(birkatHaChama);
10598
- add(new HolidayEvent(hd, BIRKAT_HACHAMAH, MINOR_HOLIDAY$1, {
10689
+ add(new HolidayEvent(hd, holidayDesc.BIRKAT_HACHAMAH, MINOR_HOLIDAY$1, {
10599
10690
  emoji: '☀️'
10600
10691
  }));
10601
10692
  }
@@ -10668,7 +10759,7 @@ class DailyLearning {
10668
10759
  }
10669
10760
 
10670
10761
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
10671
- const version = '5.3.9';
10762
+ const version = '5.3.11';
10672
10763
 
10673
10764
  const NONE$1 = 0;
10674
10765
  const HALF = 1;
@@ -11081,7 +11172,8 @@ var poHe = {
11081
11172
  "Tzom Gedaliah (Mincha)": ["צוֹם גְּדַלְיָה מִנחָה"],
11082
11173
  "Tzom Tammuz (Mincha)": ["צוֹם תָּמוּז מִנחָה"],
11083
11174
  "Molad": ["מוֹלָד הָלְּבָנָה"],
11084
- "chalakim": ["חֲלָקִים"]
11175
+ "chalakim": ["חֲלָקִים"],
11176
+ "Pirkei Avot": ["פִּרְקֵי אָבוֹת"]
11085
11177
  }
11086
11178
  }
11087
11179
  };