@hebcal/core 5.3.12 → 5.3.13

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.12 */
1
+ /*! @hebcal/core v5.3.13 */
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];
@@ -10747,19 +10747,20 @@ class DailyLearning {
10747
10747
  * is no learning from this calendar on this date.
10748
10748
  * @param {string} name
10749
10749
  * @param {HDate} hd
10750
- * @return {Event}
10750
+ * @param {boolean} il
10751
+ * @return {Event | null}
10751
10752
  */
10752
- static lookup(name, hd) {
10753
+ static lookup(name, hd, il) {
10753
10754
  const fn = cals.get(name);
10754
10755
  if (typeof fn === 'function') {
10755
- return fn(hd);
10756
+ return fn(hd, il);
10756
10757
  }
10757
10758
  return null;
10758
10759
  }
10759
10760
  }
10760
10761
 
10761
10762
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
10762
- const version = '5.3.12';
10763
+ const version = '5.3.13';
10763
10764
 
10764
10765
  const NONE$1 = 0;
10765
10766
  const HALF = 1;
@@ -11346,6 +11347,7 @@ function tachanunYear(year, il) {
11346
11347
  You should have received a copy of the GNU General Public License
11347
11348
  along with this program. If not, see <http://www.gnu.org/licenses/>.
11348
11349
  */
11350
+
11349
11351
  const FRI = 5;
11350
11352
  const SAT = 6;
11351
11353
  const NISAN = months.NISAN;
@@ -11505,59 +11507,59 @@ function checkCandleOptions(options) {
11505
11507
  /**
11506
11508
  * Options to configure which events are returned
11507
11509
  * @typedef {Object} CalOptions
11508
- * @property {Location} location - latitude/longitude/tzid used for candle-lighting
11509
- * @property {number} year - Gregorian or Hebrew year
11510
- * @property {boolean} isHebrewYear - to interpret year as Hebrew year
11511
- * @property {number} month - Gregorian or Hebrew month (to filter results to a single month)
11512
- * @property {number} numYears - generate calendar for multiple years (default 1)
11513
- * @property {Date|HDate|number} start - use specific start date (requires end date)
11514
- * @property {Date|HDate|number} end - use specific end date (requires start date)
11515
- * @property {boolean} candlelighting - calculate candle-lighting and havdalah times
11516
- * @property {number} candleLightingMins - minutes before sundown to light candles (default 18)
11517
- * @property {number} havdalahMins - minutes after sundown for Havdalah (typical values are 42, 50, or 72).
11510
+ * @property {Location} [location] - latitude/longitude/tzid used for candle-lighting
11511
+ * @property {number} [year] - Gregorian or Hebrew year
11512
+ * @property {boolean} [isHebrewYear] - to interpret year as Hebrew year
11513
+ * @property {number} [month] - Gregorian or Hebrew month (to filter results to a single month)
11514
+ * @property {number} [numYears] - generate calendar for multiple years (default 1)
11515
+ * @property {Date|HDate|number} [start] - use specific start date (requires end date)
11516
+ * @property {Date|HDate|number} [end] - use specific end date (requires start date)
11517
+ * @property {boolean} [candlelighting] - calculate candle-lighting and havdalah times
11518
+ * @property {number} [candleLightingMins] - minutes before sundown to light candles (default 18)
11519
+ * @property {number} [havdalahMins] - minutes after sundown for Havdalah (typical values are 42, 50, or 72).
11518
11520
  * If `undefined` (the default), calculate Havdalah according to Tzeit Hakochavim -
11519
11521
  * Nightfall (the point when 3 small stars are observable in the night time sky with
11520
11522
  * the naked eye). If `0`, Havdalah times are suppressed.
11521
- * @property {number} havdalahDeg - degrees for solar depression for Havdalah.
11523
+ * @property {number} [havdalahDeg] - degrees for solar depression for Havdalah.
11522
11524
  * Default is 8.5 degrees for 3 small stars. use 7.083 degrees for 3 medium-sized stars
11523
11525
  * (observed by Dr. Baruch (Berthold) Cohn in his luach published in France in 1899).
11524
11526
  * If `0`, Havdalah times are suppressed.
11525
- * @property {number} fastEndDeg - degrees for solar depression for end of fast days.
11527
+ * @property {number} [fastEndDeg] - degrees for solar depression for end of fast days.
11526
11528
  * Default is 7.083 degrees for 3 medium-sized stars. Other commonly-used values include
11527
11529
  * 6.45 degrees, as calculated by Rabbi Yechiel Michel Tucazinsky.
11528
- * @property {boolean} useElevation - use elevation for calculations (default `false`).
11530
+ * @property {boolean} [useElevation] - use elevation for calculations (default `false`).
11529
11531
  * If `true`, use elevation to affect the calculation of all sunrise/sunset based zmanim.
11530
11532
  * Note: there are some zmanim such as degree-based zmanim that are driven by the amount
11531
11533
  * of light in the sky and are not impacted by elevation.
11532
11534
  * These zmanim intentionally do not support elevation adjustment.
11533
- * @property {boolean} sedrot - calculate parashah hashavua on Saturdays
11534
- * @property {boolean} il - Israeli holiday and sedra schedule
11535
- * @property {boolean} noMinorFast - suppress minor fasts
11536
- * @property {boolean} noModern - suppress modern holidays
11537
- * @property {boolean} noRoshChodesh - suppress Rosh Chodesh
11538
- * @property {boolean} shabbatMevarchim - add Shabbat Mevarchim
11539
- * @property {boolean} noSpecialShabbat - suppress Special Shabbat
11540
- * @property {boolean} noHolidays - suppress regular holidays
11541
- * @property {boolean} omer - include Days of the Omer
11542
- * @property {boolean} molad - include event announcing the molad
11543
- * @property {boolean} ashkenazi - use Ashkenazi transliterations for event titles (default Sephardi transliterations)
11544
- * @property {string} locale - translate event titles according to a locale
11535
+ * @property {boolean} [sedrot] - calculate parashah hashavua on Saturdays
11536
+ * @property {boolean} [il] - Israeli holiday and sedra schedule
11537
+ * @property {boolean} [noMinorFast] - suppress minor fasts
11538
+ * @property {boolean} [noModern] - suppress modern holidays
11539
+ * @property {boolean} [noRoshChodesh] - suppress Rosh Chodesh
11540
+ * @property {boolean} [shabbatMevarchim] - add Shabbat Mevarchim
11541
+ * @property {boolean} [noSpecialShabbat] - suppress Special Shabbat
11542
+ * @property {boolean} [noHolidays] - suppress regular holidays
11543
+ * @property {boolean} [omer] - include Days of the Omer
11544
+ * @property {boolean} [molad] - include event announcing the molad
11545
+ * @property {boolean} [ashkenazi] - use Ashkenazi transliterations for event titles (default Sephardi transliterations)
11546
+ * @property {string} [locale] - translate event titles according to a locale
11545
11547
  * Default value is `en`, also built-in are `he` and `ashkenazi`.
11546
11548
  * Additional locales (such as `ru` or `fr`) are provided by the
11547
11549
  * {@link https://github.com/hebcal/hebcal-locales @hebcal/locales} package
11548
- * @property {boolean} addHebrewDates - print the Hebrew date for the entire date range
11549
- * @property {boolean} addHebrewDatesForEvents - print the Hebrew date for dates with some events
11550
- * @property {number} mask - use bitmask from `flags` to filter events
11551
- * @property {boolean} yomKippurKatan - include Yom Kippur Katan (default `false`).
11550
+ * @property {boolean} [addHebrewDates] - print the Hebrew date for the entire date range
11551
+ * @property {boolean} [addHebrewDatesForEvents] - print the Hebrew date for dates with some events
11552
+ * @property {number} [mask] - use bitmask from `flags` to filter events
11553
+ * @property {boolean} [yomKippurKatan] - include Yom Kippur Katan (default `false`).
11552
11554
  * יוֹם כִּפּוּר קָטָן is a minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh.
11553
11555
  * Yom Kippur Katan is omitted in Elul (on the day before Rosh Hashanah),
11554
11556
  * Tishrei (Yom Kippur has just passed), Kislev (due to Chanukah)
11555
11557
  * and Nisan (fasting not permitted during Nisan).
11556
11558
  * When Rosh Chodesh occurs on Shabbat or Sunday, Yom Kippur Katan is observed on the preceding Thursday.
11557
11559
  * See {@link https://en.wikipedia.org/wiki/Yom_Kippur_Katan#Practices Wikipedia Yom Kippur Katan practices}
11558
- * @property {boolean} hour12 - Whether to use 12-hour time (as opposed to 24-hour time).
11560
+ * @property {boolean} [hour12] - Whether to use 12-hour time (as opposed to 24-hour time).
11559
11561
  * Possible values are `true` and `false`; the default is locale dependent.
11560
- * @property {Object<string,any>} dailyLearning - map of options to enable daily study calendars
11562
+ * @property {Object<string,any>} [dailyLearning] - map of options to enable daily study calendars
11561
11563
  * such as `dafYomi`, `mishnaYomi`, `nachYomi` with value `true`. For `yerushalmi`
11562
11564
  * the value should be a `number` for edition (`1` for Vilna, `2` for Schottenstein).
11563
11565
  */
@@ -11950,7 +11952,7 @@ class HebrewCalendar {
11950
11952
  for (const [key, val] of Object.entries(dailyLearning)) {
11951
11953
  if (val) {
11952
11954
  const name = key === 'yerushalmi' ? val === 2 ? 'yerushalmi-schottenstein' : 'yerushalmi-vilna' : key;
11953
- const learningEv = DailyLearning.lookup(name, hd);
11955
+ const learningEv = DailyLearning.lookup(name, hd, il);
11954
11956
  if (learningEv) {
11955
11957
  evts.push(learningEv);
11956
11958
  }
@@ -12277,4 +12279,291 @@ function appendHolidayAndRelated(candlesEv, events, ev, options, isFriday, isSat
12277
12279
  return candlesEv;
12278
12280
  }
12279
12281
 
12280
- export { AsaraBTevetEvent, CandleLightingEvent, DailyLearning, Event, GeoLocation, HDate, HavdalahEvent, HebrewCalendar, HebrewDateEvent, HolidayEvent, Locale, Location, MevarchimChodeshEvent, Molad, MoladEvent, NOAACalculator, OmerEvent, ParshaEvent, RoshChodeshEvent, RoshHashanaEvent, Sedra, TimedEvent, Zmanim, flags, gematriya, gematriyaStrToNum, greg, holidayDesc, months, parshiot, version };
12282
+ // const Nisan = months.NISAN;
12283
+ // const Iyyar = months.IYYAR;
12284
+ // const Sivan = months.SIVAN;
12285
+ // const Tamuz = months.TAMUZ;
12286
+ // const Av = months.AV;
12287
+ // const Elul = months.ELUL;
12288
+ // const Tishrei = months.TISHREI;
12289
+ // const Cheshvan = months.CHESHVAN;
12290
+ // const Kislev = months.KISLEV;
12291
+ // const Shvat = months.SHVAT;
12292
+ // const Adar2 = months.ADAR_II;
12293
+ // const CHAG = flags.CHAG;
12294
+ // const LIGHT_CANDLES = flags.LIGHT_CANDLES;
12295
+ // const YOM_TOV_ENDS = flags.YOM_TOV_ENDS;
12296
+ // const CHUL_ONLY = flags.CHUL_ONLY;
12297
+ // const IL_ONLY = flags.IL_ONLY;
12298
+ // const LIGHT_CANDLES_TZEIS = flags.LIGHT_CANDLES_TZEIS;
12299
+ // const CHANUKAH_CANDLES = flags.CHANUKAH_CANDLES;
12300
+ // const MAJOR_FAST = flags.MAJOR_FAST;
12301
+ // const MINOR_HOLIDAY = flags.MINOR_HOLIDAY;
12302
+ // const EREV = flags.EREV;
12303
+ // const CHOL_HAMOED = flags.CHOL_HAMOED;
12304
+ // const emojiPesach = '🫓';
12305
+ // const emojiSukkot = '🌿🍋';
12306
+ /**
12307
+ * Transliterated names of holidays, used by `Event.getDesc()`
12308
+ * @readonly
12309
+ * @enum {string}
12310
+ */
12311
+ var HolidayDesc;
12312
+ (function (HolidayDesc) {
12313
+ /** Asara B'Tevet */
12314
+ HolidayDesc["ASARA_BTEVET"] = "Asara B'Tevet";
12315
+ /** Birkat Hachamah */
12316
+ HolidayDesc["BIRKAT_HACHAMAH"] = "Birkat Hachamah";
12317
+ /** Chag HaBanot */
12318
+ HolidayDesc["CHAG_HABANOT"] = "Chag HaBanot";
12319
+ /** Chanukah: 8th Day */
12320
+ HolidayDesc["CHANUKAH_8TH_DAY"] = "Chanukah: 8th Day";
12321
+ /** Erev Tish'a B'Av */
12322
+ HolidayDesc["EREV_TISHA_BAV"] = "Erev Tish'a B'Av";
12323
+ /** Leil Selichot */
12324
+ HolidayDesc["LEIL_SELICHOT"] = "Leil Selichot";
12325
+ /** Purim Katan */
12326
+ HolidayDesc["PURIM_KATAN"] = "Purim Katan";
12327
+ /** Purim Meshulash */
12328
+ HolidayDesc["PURIM_MESHULASH"] = "Purim Meshulash";
12329
+ /** Shabbat Chazon */
12330
+ HolidayDesc["SHABBAT_CHAZON"] = "Shabbat Chazon";
12331
+ /** Shabbat HaChodesh */
12332
+ HolidayDesc["SHABBAT_HACHODESH"] = "Shabbat HaChodesh";
12333
+ /** Shabbat HaGadol */
12334
+ HolidayDesc["SHABBAT_HAGADOL"] = "Shabbat HaGadol";
12335
+ /** Shabbat Nachamu */
12336
+ HolidayDesc["SHABBAT_NACHAMU"] = "Shabbat Nachamu";
12337
+ /** Shabbat Parah */
12338
+ HolidayDesc["SHABBAT_PARAH"] = "Shabbat Parah";
12339
+ /** Shabbat Shekalim */
12340
+ HolidayDesc["SHABBAT_SHEKALIM"] = "Shabbat Shekalim";
12341
+ /** Shabbat Shirah */
12342
+ HolidayDesc["SHABBAT_SHIRAH"] = "Shabbat Shirah";
12343
+ /** Shabbat Shuva */
12344
+ HolidayDesc["SHABBAT_SHUVA"] = "Shabbat Shuva";
12345
+ /** Shabbat Zachor */
12346
+ HolidayDesc["SHABBAT_ZACHOR"] = "Shabbat Zachor";
12347
+ /** Shushan Purim Katan */
12348
+ HolidayDesc["SHUSHAN_PURIM_KATAN"] = "Shushan Purim Katan";
12349
+ /** Ta'anit Bechorot */
12350
+ HolidayDesc["TAANIT_BECHOROT"] = "Ta'anit Bechorot";
12351
+ /** Ta'anit Esther */
12352
+ HolidayDesc["TAANIT_ESTHER"] = "Ta'anit Esther";
12353
+ /** Tish'a B'Av */
12354
+ HolidayDesc["TISHA_BAV"] = "Tish'a B'Av";
12355
+ /** Tzom Gedaliah */
12356
+ HolidayDesc["TZOM_GEDALIAH"] = "Tzom Gedaliah";
12357
+ /** Tzom Tammuz */
12358
+ HolidayDesc["TZOM_TAMMUZ"] = "Tzom Tammuz";
12359
+ /** Yom HaAtzma'ut */
12360
+ HolidayDesc["YOM_HAATZMA_UT"] = "Yom HaAtzma'ut";
12361
+ /** Yom HaShoah */
12362
+ HolidayDesc["YOM_HASHOAH"] = "Yom HaShoah";
12363
+ /** Yom HaZikaron */
12364
+ HolidayDesc["YOM_HAZIKARON"] = "Yom HaZikaron";
12365
+ /** Ben-Gurion Day */
12366
+ HolidayDesc["BEN_GURION_DAY"] = "Ben-Gurion Day";
12367
+ /** Chanukah: 1 Candle */
12368
+ HolidayDesc["CHANUKAH_1_CANDLE"] = "Chanukah: 1 Candle";
12369
+ /** Erev Pesach */
12370
+ HolidayDesc["EREV_PESACH"] = "Erev Pesach";
12371
+ /** Erev Purim */
12372
+ HolidayDesc["EREV_PURIM"] = "Erev Purim";
12373
+ /** Erev Rosh Hashana */
12374
+ HolidayDesc["EREV_ROSH_HASHANA"] = "Erev Rosh Hashana";
12375
+ /** Erev Shavuot */
12376
+ HolidayDesc["EREV_SHAVUOT"] = "Erev Shavuot";
12377
+ /** Erev Sukkot */
12378
+ HolidayDesc["EREV_SUKKOT"] = "Erev Sukkot";
12379
+ /** Erev Yom Kippur */
12380
+ HolidayDesc["EREV_YOM_KIPPUR"] = "Erev Yom Kippur";
12381
+ /** Family Day */
12382
+ HolidayDesc["FAMILY_DAY"] = "Family Day";
12383
+ /** Hebrew Language Day */
12384
+ HolidayDesc["HEBREW_LANGUAGE_DAY"] = "Hebrew Language Day";
12385
+ /** Herzl Day */
12386
+ HolidayDesc["HERZL_DAY"] = "Herzl Day";
12387
+ /** Jabotinsky Day */
12388
+ HolidayDesc["JABOTINSKY_DAY"] = "Jabotinsky Day";
12389
+ /** Lag BaOmer */
12390
+ HolidayDesc["LAG_BAOMER"] = "Lag BaOmer";
12391
+ /** Pesach I */
12392
+ HolidayDesc["PESACH_I"] = "Pesach I";
12393
+ /** Pesach II */
12394
+ HolidayDesc["PESACH_II"] = "Pesach II";
12395
+ /** Pesach III (CH''M) */
12396
+ HolidayDesc["PESACH_III_CHM"] = "Pesach III (CH''M)";
12397
+ /** Pesach II (CH''M) */
12398
+ HolidayDesc["PESACH_II_CHM"] = "Pesach II (CH''M)";
12399
+ /** Pesach IV (CH''M) */
12400
+ HolidayDesc["PESACH_IV_CHM"] = "Pesach IV (CH''M)";
12401
+ /** Pesach Sheni */
12402
+ HolidayDesc["PESACH_SHENI"] = "Pesach Sheni";
12403
+ /** Pesach VII */
12404
+ HolidayDesc["PESACH_VII"] = "Pesach VII";
12405
+ /** Pesach VIII */
12406
+ HolidayDesc["PESACH_VIII"] = "Pesach VIII";
12407
+ /** Pesach VI (CH''M) */
12408
+ HolidayDesc["PESACH_VI_CHM"] = "Pesach VI (CH''M)";
12409
+ /** Pesach V (CH''M) */
12410
+ HolidayDesc["PESACH_V_CHM"] = "Pesach V (CH''M)";
12411
+ /** Purim */
12412
+ HolidayDesc["PURIM"] = "Purim";
12413
+ /** Rosh Hashana II */
12414
+ HolidayDesc["ROSH_HASHANA_II"] = "Rosh Hashana II";
12415
+ /** Rosh Hashana LaBehemot */
12416
+ HolidayDesc["ROSH_HASHANA_LABEHEMOT"] = "Rosh Hashana LaBehemot";
12417
+ /** Shavuot */
12418
+ HolidayDesc["SHAVUOT"] = "Shavuot";
12419
+ /** Shavuot I */
12420
+ HolidayDesc["SHAVUOT_I"] = "Shavuot I";
12421
+ /** Shavuot II */
12422
+ HolidayDesc["SHAVUOT_II"] = "Shavuot II";
12423
+ /** Shmini Atzeret */
12424
+ HolidayDesc["SHMINI_ATZERET"] = "Shmini Atzeret";
12425
+ /** Shushan Purim */
12426
+ HolidayDesc["SHUSHAN_PURIM"] = "Shushan Purim";
12427
+ /** Sigd */
12428
+ HolidayDesc["SIGD"] = "Sigd";
12429
+ /** Simchat Torah */
12430
+ HolidayDesc["SIMCHAT_TORAH"] = "Simchat Torah";
12431
+ /** Sukkot I */
12432
+ HolidayDesc["SUKKOT_I"] = "Sukkot I";
12433
+ /** Sukkot II */
12434
+ HolidayDesc["SUKKOT_II"] = "Sukkot II";
12435
+ /** Sukkot III (CH''M) */
12436
+ HolidayDesc["SUKKOT_III_CHM"] = "Sukkot III (CH''M)";
12437
+ /** Sukkot II (CH''M) */
12438
+ HolidayDesc["SUKKOT_II_CHM"] = "Sukkot II (CH''M)";
12439
+ /** Sukkot IV (CH''M) */
12440
+ HolidayDesc["SUKKOT_IV_CHM"] = "Sukkot IV (CH''M)";
12441
+ /** Sukkot VII (Hoshana Raba) */
12442
+ HolidayDesc["SUKKOT_VII_HOSHANA_RABA"] = "Sukkot VII (Hoshana Raba)";
12443
+ /** Sukkot VI (CH''M) */
12444
+ HolidayDesc["SUKKOT_VI_CHM"] = "Sukkot VI (CH''M)";
12445
+ /** Sukkot V (CH''M) */
12446
+ HolidayDesc["SUKKOT_V_CHM"] = "Sukkot V (CH''M)";
12447
+ /** Tu B\'Av */
12448
+ HolidayDesc["TU_BAV"] = "Tu B'Av";
12449
+ /** Tu BiShvat */
12450
+ HolidayDesc["TU_BISHVAT"] = "Tu BiShvat";
12451
+ /** Yitzhak Rabin Memorial Day */
12452
+ HolidayDesc["YITZHAK_RABIN_MEMORIAL_DAY"] = "Yitzhak Rabin Memorial Day";
12453
+ /** Yom HaAliyah */
12454
+ HolidayDesc["YOM_HAALIYAH"] = "Yom HaAliyah";
12455
+ /** Yom HaAliyah School Observance */
12456
+ HolidayDesc["YOM_HAALIYAH_SCHOOL_OBSERVANCE"] = "Yom HaAliyah School Observance";
12457
+ /** Yom Kippur */
12458
+ HolidayDesc["YOM_KIPPUR"] = "Yom Kippur";
12459
+ /** Yom Yerushalayim */
12460
+ HolidayDesc["YOM_YERUSHALAYIM"] = "Yom Yerushalayim";
12461
+ })(HolidayDesc || (HolidayDesc = {}));
12462
+ // export const staticHolidays: Holiday[] = [
12463
+ // {mm: Tishrei, dd: 2, desc: HolidayDesc.ROSH_HASHANA_II, flags: CHAG | YOM_TOV_ENDS, emoji: '🍏🍯'},
12464
+ // {mm: Tishrei, dd: 9, desc: HolidayDesc.EREV_YOM_KIPPUR, flags: EREV | LIGHT_CANDLES},
12465
+ // {mm: Tishrei, dd: 10, desc: HolidayDesc.YOM_KIPPUR, flags: CHAG | MAJOR_FAST | YOM_TOV_ENDS},
12466
+ // {mm: Tishrei, dd: 14, desc: HolidayDesc.EREV_SUKKOT, flags: CHUL_ONLY | EREV | LIGHT_CANDLES, emoji: emojiSukkot},
12467
+ // {mm: Tishrei, dd: 15, desc: HolidayDesc.SUKKOT_I, flags: CHUL_ONLY | CHAG | LIGHT_CANDLES_TZEIS, emoji: emojiSukkot},
12468
+ // {mm: Tishrei, dd: 16, desc: HolidayDesc.SUKKOT_II, flags: CHUL_ONLY | CHAG | YOM_TOV_ENDS, emoji: emojiSukkot},
12469
+ // {mm: Tishrei, dd: 17, desc: HolidayDesc.SUKKOT_III_CHM, flags: CHUL_ONLY | CHOL_HAMOED, chmDay: 1, emoji: emojiSukkot},
12470
+ // {mm: Tishrei, dd: 18, desc: HolidayDesc.SUKKOT_IV_CHM, flags: CHUL_ONLY | CHOL_HAMOED, chmDay: 2, emoji: emojiSukkot},
12471
+ // {mm: Tishrei, dd: 19, desc: HolidayDesc.SUKKOT_V_CHM, flags: CHUL_ONLY | CHOL_HAMOED, chmDay: 3, emoji: emojiSukkot},
12472
+ // {mm: Tishrei, dd: 20, desc: HolidayDesc.SUKKOT_VI_CHM, flags: CHUL_ONLY | CHOL_HAMOED, chmDay: 4, emoji: emojiSukkot},
12473
+ // {mm: Tishrei, dd: 22, desc: HolidayDesc.SHMINI_ATZERET,
12474
+ // flags: CHUL_ONLY | CHAG | LIGHT_CANDLES_TZEIS},
12475
+ // {mm: Tishrei, dd: 23, desc: HolidayDesc.SIMCHAT_TORAH,
12476
+ // flags: CHUL_ONLY | CHAG | YOM_TOV_ENDS},
12477
+ // {mm: Tishrei, dd: 14, desc: HolidayDesc.EREV_SUKKOT, flags: IL_ONLY | EREV | LIGHT_CANDLES, emoji: emojiSukkot},
12478
+ // {mm: Tishrei, dd: 15, desc: HolidayDesc.SUKKOT_I, flags: IL_ONLY | CHAG | YOM_TOV_ENDS, emoji: emojiSukkot},
12479
+ // {mm: Tishrei, dd: 16, desc: HolidayDesc.SUKKOT_II_CHM, flags: IL_ONLY | CHOL_HAMOED, chmDay: 1, emoji: emojiSukkot},
12480
+ // {mm: Tishrei, dd: 17, desc: HolidayDesc.SUKKOT_III_CHM, flags: IL_ONLY | CHOL_HAMOED, chmDay: 2, emoji: emojiSukkot},
12481
+ // {mm: Tishrei, dd: 18, desc: HolidayDesc.SUKKOT_IV_CHM, flags: IL_ONLY | CHOL_HAMOED, chmDay: 3, emoji: emojiSukkot},
12482
+ // {mm: Tishrei, dd: 19, desc: HolidayDesc.SUKKOT_V_CHM, flags: IL_ONLY | CHOL_HAMOED, chmDay: 4, emoji: emojiSukkot},
12483
+ // {mm: Tishrei, dd: 20, desc: HolidayDesc.SUKKOT_VI_CHM, flags: IL_ONLY | CHOL_HAMOED, chmDay: 5, emoji: emojiSukkot},
12484
+ // {mm: Tishrei, dd: 22, desc: HolidayDesc.SHMINI_ATZERET,
12485
+ // flags: IL_ONLY | CHAG | YOM_TOV_ENDS},
12486
+ // {mm: Tishrei, dd: 21, desc: HolidayDesc.SUKKOT_VII_HOSHANA_RABA,
12487
+ // flags: LIGHT_CANDLES | CHOL_HAMOED, chmDay: -1, emoji: emojiSukkot},
12488
+ // {mm: Kislev, dd: 24, desc: HolidayDesc.CHANUKAH_1_CANDLE,
12489
+ // flags: EREV | MINOR_HOLIDAY | CHANUKAH_CANDLES, emoji: '🕎1️⃣'},
12490
+ // {mm: Shvat, dd: 15, desc: HolidayDesc.TU_BISHVAT, flags: MINOR_HOLIDAY, emoji: '🌳'},
12491
+ // {mm: Adar2, dd: 13, desc: HolidayDesc.EREV_PURIM, flags: EREV | MINOR_HOLIDAY, emoji: '🎭️📜'},
12492
+ // {mm: Adar2, dd: 14, desc: HolidayDesc.PURIM, flags: MINOR_HOLIDAY, emoji: '🎭️📜'},
12493
+ // {mm: Adar2, dd: 15, desc: HolidayDesc.SHUSHAN_PURIM, flags: MINOR_HOLIDAY, emoji: '🎭️📜'},
12494
+ // // Pesach Israel
12495
+ // {mm: Nisan, dd: 14, desc: HolidayDesc.EREV_PESACH,
12496
+ // flags: IL_ONLY | EREV | LIGHT_CANDLES, emoji: '🫓🍷'},
12497
+ // {mm: Nisan, dd: 15, desc: HolidayDesc.PESACH_I,
12498
+ // flags: IL_ONLY | CHAG | YOM_TOV_ENDS, emoji: emojiPesach},
12499
+ // {mm: Nisan, dd: 16, desc: HolidayDesc.PESACH_II_CHM,
12500
+ // flags: IL_ONLY | CHOL_HAMOED, chmDay: 1, emoji: emojiPesach},
12501
+ // {mm: Nisan, dd: 17, desc: HolidayDesc.PESACH_III_CHM,
12502
+ // flags: IL_ONLY | CHOL_HAMOED, chmDay: 2, emoji: emojiPesach},
12503
+ // {mm: Nisan, dd: 18, desc: HolidayDesc.PESACH_IV_CHM,
12504
+ // flags: IL_ONLY | CHOL_HAMOED, chmDay: 3, emoji: emojiPesach},
12505
+ // {mm: Nisan, dd: 19, desc: HolidayDesc.PESACH_V_CHM,
12506
+ // flags: IL_ONLY | CHOL_HAMOED, chmDay: 4, emoji: emojiPesach},
12507
+ // {mm: Nisan, dd: 20, desc: HolidayDesc.PESACH_VI_CHM,
12508
+ // flags: IL_ONLY | CHOL_HAMOED | LIGHT_CANDLES, chmDay: 5, emoji: emojiPesach},
12509
+ // {mm: Nisan, dd: 21, desc: HolidayDesc.PESACH_VII,
12510
+ // flags: IL_ONLY | CHAG | YOM_TOV_ENDS, emoji: emojiPesach},
12511
+ // // Pesach chutz l'aretz
12512
+ // {mm: Nisan, dd: 14, desc: HolidayDesc.EREV_PESACH,
12513
+ // flags: CHUL_ONLY | EREV | LIGHT_CANDLES, emoji: '🫓🍷'},
12514
+ // {mm: Nisan, dd: 15, desc: HolidayDesc.PESACH_I,
12515
+ // flags: CHUL_ONLY | CHAG | LIGHT_CANDLES_TZEIS, emoji: '🫓🍷'},
12516
+ // {mm: Nisan, dd: 16, desc: HolidayDesc.PESACH_II,
12517
+ // flags: CHUL_ONLY | CHAG | YOM_TOV_ENDS, emoji: emojiPesach},
12518
+ // {mm: Nisan, dd: 17, desc: HolidayDesc.PESACH_III_CHM,
12519
+ // flags: CHUL_ONLY | CHOL_HAMOED, chmDay: 1, emoji: emojiPesach},
12520
+ // {mm: Nisan, dd: 18, desc: HolidayDesc.PESACH_IV_CHM,
12521
+ // flags: CHUL_ONLY | CHOL_HAMOED, chmDay: 2, emoji: emojiPesach},
12522
+ // {mm: Nisan, dd: 19, desc: HolidayDesc.PESACH_V_CHM,
12523
+ // flags: CHUL_ONLY | CHOL_HAMOED, chmDay: 3, emoji: emojiPesach},
12524
+ // {mm: Nisan, dd: 20, desc: HolidayDesc.PESACH_VI_CHM,
12525
+ // flags: CHUL_ONLY | CHOL_HAMOED | LIGHT_CANDLES, chmDay: 4, emoji: emojiPesach},
12526
+ // {mm: Nisan, dd: 21, desc: HolidayDesc.PESACH_VII,
12527
+ // flags: CHUL_ONLY | CHAG | LIGHT_CANDLES_TZEIS, emoji: emojiPesach},
12528
+ // {mm: Nisan, dd: 22, desc: HolidayDesc.PESACH_VIII,
12529
+ // flags: CHUL_ONLY | CHAG | YOM_TOV_ENDS, emoji: emojiPesach},
12530
+ // {mm: Iyyar, dd: 14, desc: HolidayDesc.PESACH_SHENI, flags: MINOR_HOLIDAY},
12531
+ // {mm: Iyyar, dd: 18, desc: HolidayDesc.LAG_BAOMER, flags: MINOR_HOLIDAY, emoji: '🔥'},
12532
+ // {mm: Sivan, dd: 5, desc: HolidayDesc.EREV_SHAVUOT,
12533
+ // flags: EREV | LIGHT_CANDLES, emoji: '⛰️🌸'},
12534
+ // {mm: Sivan, dd: 6, desc: HolidayDesc.SHAVUOT,
12535
+ // flags: IL_ONLY | CHAG | YOM_TOV_ENDS, emoji: '⛰️🌸'},
12536
+ // {mm: Sivan, dd: 6, desc: HolidayDesc.SHAVUOT_I,
12537
+ // flags: CHUL_ONLY | CHAG | LIGHT_CANDLES_TZEIS, emoji: '⛰️🌸'},
12538
+ // {mm: Sivan, dd: 7, desc: HolidayDesc.SHAVUOT_II,
12539
+ // flags: CHUL_ONLY | CHAG | YOM_TOV_ENDS, emoji: '⛰️🌸'},
12540
+ // {mm: Av, dd: 15, desc: HolidayDesc.TU_BAV,
12541
+ // flags: MINOR_HOLIDAY, emoji: '❤️'},
12542
+ // {mm: Elul, dd: 1, desc: HolidayDesc.ROSH_HASHANA_LABEHEMOT,
12543
+ // flags: MINOR_HOLIDAY, emoji: '🐑'},
12544
+ // {mm: Elul, dd: 29, desc: HolidayDesc.EREV_ROSH_HASHANA,
12545
+ // flags: EREV | LIGHT_CANDLES, emoji: '🍏🍯'},
12546
+ // ];
12547
+ // export const staticModernHolidays: ModernHoliday[] = [
12548
+ // {firstYear: 5727, mm: Iyyar, dd: 28, desc: HolidayDesc.YOM_YERUSHALAYIM,
12549
+ // chul: true},
12550
+ // {firstYear: 5737, mm: Kislev, dd: 6, desc: HolidayDesc.BEN_GURION_DAY,
12551
+ // satPostponeToSun: true, friPostponeToSun: true},
12552
+ // {firstYear: 5750, mm: Shvat, dd: 30, desc: HolidayDesc.FAMILY_DAY},
12553
+ // {firstYear: 5758, mm: Cheshvan, dd: 12, desc: HolidayDesc.YITZHAK_RABIN_MEMORIAL_DAY,
12554
+ // friSatMovetoThu: true},
12555
+ // {firstYear: 5764, mm: Iyyar, dd: 10, desc: HolidayDesc.HERZL_DAY,
12556
+ // satPostponeToSun: true},
12557
+ // {firstYear: 5765, mm: Tamuz, dd: 29, desc: HolidayDesc.JABOTINSKY_DAY,
12558
+ // satPostponeToSun: true},
12559
+ // {firstYear: 5769, mm: Cheshvan, dd: 29, desc: HolidayDesc.SIGD,
12560
+ // chul: true, suppressEmoji: true},
12561
+ // {firstYear: 5777, mm: Nisan, dd: 10, desc: HolidayDesc.YOM_HAALIYAH,
12562
+ // chul: true},
12563
+ // {firstYear: 5777, mm: Cheshvan, dd: 7, desc: HolidayDesc.YOM_HAALIYAH_SCHOOL_OBSERVANCE},
12564
+ // // https://www.gov.il/he/departments/policies/2012_des5234
12565
+ // {firstYear: 5773, mm: months.TEVET, dd: 21, desc: HolidayDesc.HEBREW_LANGUAGE_DAY,
12566
+ // friSatMovetoThu: true},
12567
+ // ];
12568
+
12569
+ export { AsaraBTevetEvent, CandleLightingEvent, DailyLearning, Event, GeoLocation, HDate, HavdalahEvent, HebrewCalendar, HebrewDateEvent, HolidayDesc, HolidayEvent, Locale, Location, MevarchimChodeshEvent, Molad, MoladEvent, NOAACalculator, OmerEvent, ParshaEvent, RoshChodeshEvent, RoshHashanaEvent, Sedra, TimedEvent, Zmanim, flags, gematriya, gematriyaStrToNum, greg, holidayDesc, months, parshiot, version };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,80 @@
1
+ /**
2
+ * A locale in Hebcal is used for translations/transliterations of
3
+ * holidays. `@hebcal/core` supports four locales by default
4
+ * * `en` - default, Sephardic transliterations (e.g. "Shabbat")
5
+ * * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
6
+ * * `he` - Hebrew (e.g. "שַׁבָּת")
7
+ * * `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
8
+ */
9
+ export class Locale {
10
+ /**
11
+ * Returns translation only if `locale` offers a non-empty translation for `id`.
12
+ * Otherwise, returns `undefined`.
13
+ * @param {string} id Message ID to translate
14
+ * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
15
+ * @return {string}
16
+ */
17
+ static lookupTranslation(id: string, locale?: string | undefined): string;
18
+ /**
19
+ * By default, if no translation was found, returns `id`.
20
+ * @param {string} id Message ID to translate
21
+ * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
22
+ * @return {string}
23
+ */
24
+ static gettext(id: string, locale?: string | undefined): string;
25
+ /**
26
+ * Register locale translations.
27
+ * @param {string} locale Locale name (i.e.: `'he'`, `'fr'`)
28
+ * @param {LocaleData} data parsed data from a `.po` file.
29
+ */
30
+ static addLocale(locale: string, data: LocaleData): void;
31
+ /**
32
+ * Adds a translation to `locale`, replacing any previous translation.
33
+ * @param {string} locale Locale name (i.e: `'he'`, `'fr'`).
34
+ * @param {string} id Message ID to translate
35
+ * @param {string} translation Translation text
36
+ */
37
+ static addTranslation(locale: string, id: string, translation: string): void;
38
+ /**
39
+ * Adds multiple translations to `locale`, replacing any previous translations.
40
+ * @param {string} locale Locale name (i.e: `'he'`, `'fr'`).
41
+ * @param {LocaleData} data parsed data from a `.po` file.
42
+ */
43
+ static addTranslations(locale: string, data: LocaleData): void;
44
+ /**
45
+ * Activates a locale. Throws an error if the locale has not been previously added.
46
+ * After setting the locale to be used, all strings marked for translations
47
+ * will be represented by the corresponding translation in the specified locale.
48
+ * @param {string} locale Locale name (i.e: `'he'`, `'fr'`)
49
+ * @return {LocaleData}
50
+ */
51
+ static useLocale(locale: string): LocaleData;
52
+ /**
53
+ * Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
54
+ * @return {string}
55
+ */
56
+ static getLocaleName(): string;
57
+ /**
58
+ * Returns the names of registered locales
59
+ * @return {string[]}
60
+ */
61
+ static getLocaleNames(): string[];
62
+ /**
63
+ * @param {number} n
64
+ * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
65
+ * @return {string}
66
+ */
67
+ static ordinal(n: number, locale?: string | undefined): string;
68
+ /**
69
+ * @private
70
+ * @param {number} n
71
+ * @return {string}
72
+ */
73
+ private static getEnOrdinal;
74
+ /**
75
+ * Removes nekudot from Hebrew string
76
+ * @param {string} str
77
+ * @return {string}
78
+ */
79
+ static hebrewStripNikkud(str: string): string;
80
+ }
@@ -0,0 +1,85 @@
1
+ /** Class representing Location */
2
+ export class Location extends GeoLocation {
3
+ /**
4
+ * Creates a location object from one of 60 "classic" Hebcal city names.
5
+ * The following city names are supported:
6
+ * 'Ashdod', 'Atlanta', 'Austin', 'Baghdad', 'Beer Sheva',
7
+ * 'Berlin', 'Baltimore', 'Bogota', 'Boston', 'Budapest',
8
+ * 'Buenos Aires', 'Buffalo', 'Chicago', 'Cincinnati', 'Cleveland',
9
+ * 'Dallas', 'Denver', 'Detroit', 'Eilat', 'Gibraltar', 'Haifa',
10
+ * 'Hawaii', 'Helsinki', 'Houston', 'Jerusalem', 'Johannesburg',
11
+ * 'Kiev', 'La Paz', 'Livingston', 'Las Vegas', 'London', 'Los Angeles',
12
+ * 'Marseilles', 'Miami', 'Minneapolis', 'Melbourne', 'Mexico City',
13
+ * 'Montreal', 'Moscow', 'New York', 'Omaha', 'Ottawa', 'Panama City',
14
+ * 'Paris', 'Pawtucket', 'Petach Tikvah', 'Philadelphia', 'Phoenix',
15
+ * 'Pittsburgh', 'Providence', 'Portland', 'Saint Louis', 'Saint Petersburg',
16
+ * 'San Diego', 'San Francisco', 'Sao Paulo', 'Seattle', 'Sydney',
17
+ * 'Tel Aviv', 'Tiberias', 'Toronto', 'Vancouver', 'White Plains',
18
+ * 'Washington DC', 'Worcester'
19
+ * @param {string} name
20
+ * @return {Location}
21
+ */
22
+ static lookup(name: string): Location;
23
+ /**
24
+ * Converts legacy Hebcal timezone to a standard Olson tzid.
25
+ * @param {number} tz integer, GMT offset in hours
26
+ * @param {string} dst 'none', 'eu', 'usa', or 'israel'
27
+ * @return {string}
28
+ */
29
+ static legacyTzToTzid(tz: number, dst: string): string;
30
+ /**
31
+ * Converts timezone info from Zip-Codes.com to a standard Olson tzid.
32
+ * @example
33
+ * Location.getUsaTzid('AZ', 7, 'Y') // 'America/Denver'
34
+ * @param {string} state two-letter all-caps US state abbreviation like 'CA'
35
+ * @param {number} tz positive number, 5=America/New_York, 8=America/Los_Angeles
36
+ * @param {string} dst single char 'Y' or 'N'
37
+ * @return {string}
38
+ */
39
+ static getUsaTzid(state: string, tz: number, dst: string): string;
40
+ /**
41
+ * Adds a location name for `Location.lookup()` only if the name isn't
42
+ * already being used. Returns `false` if the name is already taken
43
+ * and `true` if successfully added.
44
+ * @param {string} cityName
45
+ * @param {Location} location
46
+ * @return {boolean}
47
+ */
48
+ static addLocation(cityName: string, location: Location): boolean;
49
+ /**
50
+ * Initialize a Location instance
51
+ * @param {number} latitude - Latitude as a decimal, valid range -90 thru +90 (e.g. 41.85003)
52
+ * @param {number} longitude - Longitude as a decimal, valid range -180 thru +180 (e.g. -87.65005)
53
+ * @param {boolean} il - in Israel (true) or Diaspora (false)
54
+ * @param {string} tzid - Olson timezone ID, e.g. "America/Chicago"
55
+ * @param {string} cityName - optional descriptive city name
56
+ * @param {string} countryCode - ISO 3166 alpha-2 country code (e.g. "FR")
57
+ * @param {string} [geoid] - optional string or numeric geographic ID
58
+ * @param {number} [elevation] - in meters (default `0`)
59
+ */
60
+ constructor(latitude: number, longitude: number, il: boolean, tzid: string, cityName: string, countryCode: string, geoid?: string | undefined, elevation?: number | undefined);
61
+ il: boolean;
62
+ cc: string;
63
+ geoid: string | undefined;
64
+ /** @return {boolean} */
65
+ getIsrael(): boolean;
66
+ /** @return {string} */
67
+ getName(): string;
68
+ /**
69
+ * Returns the location name, up to the first comma
70
+ * @return {string}
71
+ */
72
+ getShortName(): string;
73
+ /** @return {string} */
74
+ getCountryCode(): string;
75
+ /** @return {string} */
76
+ getTzid(): string;
77
+ /**
78
+ * Gets a 24-hour time formatter (e.g. 07:41 or 20:03) for this location
79
+ * @return {Intl.DateTimeFormat}
80
+ */
81
+ getTimeFormatter(): Intl.DateTimeFormat;
82
+ /** @return {string} */
83
+ getGeoId(): string;
84
+ }
85
+ import { GeoLocation } from '@hebcal/noaa';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Yom HaShoah first observed in 1951.
3
+ * When the actual date of Yom Hashoah falls on a Friday, the
4
+ * state of Israel observes Yom Hashoah on the preceding
5
+ * Thursday. When it falls on a Sunday, Yom Hashoah is observed
6
+ * on the following Monday.
7
+ * http://www.ushmm.org/remembrance/dor/calendar/
8
+ * @private
9
+ * @param {number} year
10
+ * @return {HDate|null}
11
+ */
12
+ export function dateYomHaShoah(year: number): HDate | null;
13
+ /**
14
+ * Yom HaAtzma'ut only celebrated after 1948
15
+ * @private
16
+ * @param {number} year
17
+ * @return {HDate|null}
18
+ */
19
+ export function dateYomHaZikaron(year: number): HDate | null;
20
+ import { HDate } from './hdate.js';