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