@hebcal/core 6.0.4 → 6.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/bundle.js +16 -10
  2. package/dist/bundle.js.map +1 -1
  3. package/dist/bundle.min.js +3 -3
  4. package/dist/bundle.min.js.map +1 -1
  5. package/dist/esm/DailyLearning.js +1 -1
  6. package/dist/esm/HebrewDateEvent.js +1 -1
  7. package/dist/esm/HolidayEvent.js +2 -2
  8. package/dist/esm/HolidayEvent.js.map +1 -1
  9. package/dist/esm/MevarchimChodeshEvent.js +1 -1
  10. package/dist/esm/ParshaEvent.js +2 -2
  11. package/dist/esm/ParshaEvent.js.map +1 -1
  12. package/dist/esm/TimedEvent.js +1 -1
  13. package/dist/esm/YomKippurKatanEvent.js +1 -1
  14. package/dist/esm/ashkenazi.po.js +1 -1
  15. package/dist/esm/calendar.js +7 -5
  16. package/dist/esm/calendar.js.map +1 -1
  17. package/dist/esm/candles.js +1 -1
  18. package/dist/esm/event.js +1 -1
  19. package/dist/esm/getStartAndEnd.js +1 -1
  20. package/dist/esm/hallel.js +1 -1
  21. package/dist/esm/he-x-NoNikud.po.js +1 -1
  22. package/dist/esm/he.po.js +1 -1
  23. package/dist/esm/hebcal.js +1 -1
  24. package/dist/esm/holidays.js +1 -1
  25. package/dist/esm/holidays.js.map +1 -1
  26. package/dist/esm/index.js +1 -1
  27. package/dist/esm/isAssurBemlacha.js +1 -1
  28. package/dist/esm/locale.js +1 -1
  29. package/dist/esm/location.js +1 -1
  30. package/dist/esm/modern.js +1 -1
  31. package/dist/esm/molad.js +3 -3
  32. package/dist/esm/molad.js.map +1 -1
  33. package/dist/esm/omer.d.ts +1 -1
  34. package/dist/esm/omer.js +6 -2
  35. package/dist/esm/omer.js.map +1 -1
  36. package/dist/esm/parshaName.js +1 -1
  37. package/dist/esm/parshaYear.js +1 -1
  38. package/dist/esm/pkgVersion.d.ts +1 -1
  39. package/dist/esm/pkgVersion.js +2 -2
  40. package/dist/esm/pkgVersion.js.map +1 -1
  41. package/dist/esm/reformatTimeStr.js +1 -1
  42. package/dist/esm/sedra.js +1 -1
  43. package/dist/esm/staticHolidays.js +1 -1
  44. package/dist/esm/tachanun.js +1 -1
  45. package/dist/esm/zmanim.js +1 -1
  46. package/dist/omer.d.ts +1 -1
  47. package/dist/pkgVersion.d.ts +1 -1
  48. package/package.json +6 -6
package/dist/bundle.js CHANGED
@@ -1,9 +1,9 @@
1
- /*! @hebcal/core v6.0.4, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.0.6, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
5
5
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
6
- const version = '6.0.4';
6
+ const version = '6.0.6';
7
7
 
8
8
  /*! @hebcal/hdate v0.21.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
9
9
  /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
@@ -9513,7 +9513,7 @@ class HolidayEvent extends Event {
9513
9513
  }
9514
9514
  url() {
9515
9515
  const year = this.greg().getFullYear();
9516
- if (year < 100) {
9516
+ if (year < 100 || year > 2999) {
9517
9517
  return undefined;
9518
9518
  }
9519
9519
  const url = 'https://www.hebcal.com/holidays/' +
@@ -10486,7 +10486,7 @@ class Molad {
10486
10486
  }
10487
10487
  return result;
10488
10488
  }
10489
- const fmtTime = reformatTimeStr(`${hour}:${minutes}`, 'pm', options);
10489
+ const fmtTime = reformatTimeStr(`${hour}:${pad2(minutes)}`, 'pm', options);
10490
10490
  const month = monthName.replace(/'/g, '’');
10491
10491
  const result = `${moladStr} ${month}: ${dow}, ${fmtTime}`;
10492
10492
  if (chalakim === 0) {
@@ -10810,7 +10810,11 @@ class OmerEvent extends Event {
10810
10810
  return str;
10811
10811
  }
10812
10812
  url() {
10813
- return `https://www.hebcal.com/omer/${this.getDate().getFullYear()}/${this.omer}`;
10813
+ const year = this.getDate().getFullYear();
10814
+ if (year < 3860 || year > 6759) {
10815
+ return undefined;
10816
+ }
10817
+ return `https://www.hebcal.com/omer/${year}/${this.omer}`;
10814
10818
  }
10815
10819
  }
10816
10820
 
@@ -10847,7 +10851,7 @@ class ParshaEvent extends Event {
10847
10851
  }
10848
10852
  url() {
10849
10853
  const year = this.greg().getFullYear();
10850
- if (year < 100) {
10854
+ if (year < 100 || year > 2999) {
10851
10855
  return undefined;
10852
10856
  }
10853
10857
  const dt = this.urlDateSuffix();
@@ -11395,9 +11399,11 @@ function calendar(options = {}) {
11395
11399
  const startAbs = startAndEnd[0];
11396
11400
  const endAbs = startAndEnd[1];
11397
11401
  const startGreg = abs2greg(startAbs);
11398
- if (startGreg.getFullYear() < 100) {
11402
+ const startGregYear = startGreg.getFullYear();
11403
+ if (startGregYear < 100 || startGregYear > 9999) {
11399
11404
  options.candlelighting = false;
11400
11405
  options.sedrot = false;
11406
+ options.dailyLearning = {};
11401
11407
  }
11402
11408
  for (let abs = startAbs; abs <= endAbs; abs++) {
11403
11409
  const hd = new HDate(abs);
@@ -11445,7 +11451,7 @@ function calendar(options = {}) {
11445
11451
  }
11446
11452
  const dailyLearning = options.dailyLearning;
11447
11453
  let numDailyLearning = 0;
11448
- if (typeof dailyLearning === 'object') {
11454
+ if (typeof dailyLearning === 'object' && dailyLearning !== null) {
11449
11455
  const events = makeDailyLearning(hd, dailyLearning, il);
11450
11456
  numDailyLearning = events.length;
11451
11457
  if (numDailyLearning) {
@@ -11730,8 +11736,8 @@ function getMaskFromOptions(options) {
11730
11736
  if (options.yizkor) {
11731
11737
  mask |= YIZKOR;
11732
11738
  }
11733
- if (options.dailyLearning) {
11734
- const dailyLearning = options.dailyLearning;
11739
+ const dailyLearning = options.dailyLearning;
11740
+ if (typeof dailyLearning === 'object' && dailyLearning !== null) {
11735
11741
  if (dailyLearning.dafYomi) {
11736
11742
  mask |= DAF_YOMI;
11737
11743
  }