@hebcal/core 6.3.1 → 6.3.2

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 (46) hide show
  1. package/dist/bundle.js +37 -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 +1 -1
  8. package/dist/esm/MevarchimChodeshEvent.js +1 -1
  9. package/dist/esm/ParshaEvent.js +1 -1
  10. package/dist/esm/TimedEvent.js +1 -1
  11. package/dist/esm/YomKippurKatanEvent.js +1 -1
  12. package/dist/esm/ashkenazi.po.js +1 -1
  13. package/dist/esm/calendar.js +36 -9
  14. package/dist/esm/calendar.js.map +1 -1
  15. package/dist/esm/candles.js +1 -1
  16. package/dist/esm/event.js +1 -1
  17. package/dist/esm/getStartAndEnd.js +1 -1
  18. package/dist/esm/hallel.js +1 -1
  19. package/dist/esm/he-x-NoNikud.po.js +1 -1
  20. package/dist/esm/he.po.js +1 -1
  21. package/dist/esm/hebcal.js +1 -1
  22. package/dist/esm/holidays.js +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/isAssurBemlacha.js +1 -1
  25. package/dist/esm/locale.js +1 -1
  26. package/dist/esm/location.js +1 -1
  27. package/dist/esm/modern.js +1 -1
  28. package/dist/esm/molad.js +1 -1
  29. package/dist/esm/moladBase.js +1 -1
  30. package/dist/esm/moladDate.js +1 -1
  31. package/dist/esm/omer.js +1 -1
  32. package/dist/esm/parshaName.js +1 -1
  33. package/dist/esm/parshaYear.js +1 -1
  34. package/dist/esm/pkgVersion.d.ts +1 -1
  35. package/dist/esm/pkgVersion.js +2 -2
  36. package/dist/esm/pkgVersion.js.map +1 -1
  37. package/dist/esm/reformatTimeStr.js +1 -1
  38. package/dist/esm/sedra.js +1 -1
  39. package/dist/esm/sefira.json.js +1 -1
  40. package/dist/esm/staticHolidays.js +1 -1
  41. package/dist/esm/tachanun.js +1 -1
  42. package/dist/esm/zmanim.js +1 -1
  43. package/dist/src/calendar.js +35 -8
  44. package/dist/src/pkgVersion.d.ts +1 -1
  45. package/dist/src/pkgVersion.js +1 -1
  46. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -1,9 +1,9 @@
1
- /*! @hebcal/core v6.3.1, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
1
+ /*! @hebcal/core v6.3.2, 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.3.1';
6
+ const version = '6.3.2';
7
7
 
8
8
  /*! @hebcal/hdate v0.22.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
9
9
  /** @private */
@@ -12259,6 +12259,18 @@ function calendar(options = {}) {
12259
12259
  for (const ev of holidays) {
12260
12260
  candlesEv = appendHolidayAndRelated(candlesEv, evts, ev, options, isFriday, isSaturday, hasUserMask);
12261
12261
  }
12262
+ const mm = hd.getMonth();
12263
+ const dd = hd.getDate();
12264
+ // When Erev Pesach falls on Shabbat, burning chametz is moved to Friday.
12265
+ if (isFriday &&
12266
+ options.candlelighting &&
12267
+ mm === months.NISAN &&
12268
+ dd === 13) {
12269
+ const biurEv = makeBiurChametzEvent(hd, options);
12270
+ if (biurEv) {
12271
+ evts.push(biurEv);
12272
+ }
12273
+ }
12262
12274
  if (options.sedrot && isSaturday) {
12263
12275
  const parsha0 = sedra.lookup(abs);
12264
12276
  if (!parsha0.chag) {
@@ -12266,8 +12278,6 @@ function calendar(options = {}) {
12266
12278
  }
12267
12279
  }
12268
12280
  if (options.yizkor) {
12269
- const mm = hd.getMonth();
12270
- const dd = hd.getDate();
12271
12281
  if ((mm === months.TISHREI && (dd === 10 || dd === 22)) ||
12272
12282
  (mm === NISAN && dd === (il ? 21 : 22)) ||
12273
12283
  (mm === SIVAN && dd === (il ? 6 : 7))) {
@@ -12640,7 +12650,7 @@ function appendHolidayAndRelated(candlesEv, events, ev, options, isFriday, isSat
12640
12650
  (options.noModern && eFlags & MODERN_HOLIDAY)) {
12641
12651
  return candlesEv; // bail out early
12642
12652
  }
12643
- if (options.candlelighting && ev.getDesc() === 'Erev Pesach') {
12653
+ if (options.candlelighting && ev.getDesc() === holidayDesc.EREV_PESACH) {
12644
12654
  const evts = makeErevPesachChametzEvents(ev, options);
12645
12655
  if (evts.length) {
12646
12656
  events.push(...evts);
@@ -12651,7 +12661,7 @@ function appendHolidayAndRelated(candlesEv, events, ev, options, isFriday, isSat
12651
12661
  let fastEv;
12652
12662
  if (options.candlelighting &&
12653
12663
  (isMajorFast || isMinorFast) &&
12654
- ev.getDesc() !== 'Yom Kippur') {
12664
+ ev.getDesc() !== holidayDesc.YOM_KIPPUR) {
12655
12665
  ev = fastEv = makeFastStartEnd(ev, options);
12656
12666
  if (fastEv.startEvent &&
12657
12667
  (isMajorFast || (isMinorFast && !options.noMinorFast))) {
@@ -12744,17 +12754,34 @@ function makeErevPesachChametzEvents(erevPesachEv, options) {
12744
12754
  const hd = erevPesachEv.getDate();
12745
12755
  const zmanim = new Zmanim(location, hd, useElevation);
12746
12756
  const zmanAchilas = zmanim.sofZmanTfilla(); // Gra
12747
- const time = zmanim.sofZmanBiurChametzGRA();
12748
- if (isNaN(zmanAchilas.getTime()) || isNaN(time.getTime())) {
12757
+ if (isNaN(zmanAchilas.getTime())) {
12749
12758
  return [];
12750
12759
  }
12751
12760
  const zmanAchilasEv = new TimedEvent(hd, holidayDesc.SOF_ZMAN_ACHILAT_CHAMETZ, 0, zmanAchilas, location, undefined, options);
12752
12761
  zmanAchilasEv.emoji = '🍞';
12753
12762
  evts.push(zmanAchilasEv);
12763
+ // When Erev Pesach falls on Shabbat, chametz cannot be burned on Shabbat,
12764
+ // so Biur Chametz is emitted on the Friday before (see makeBiurChametzEvent
12765
+ // called from the main calendar loop). Skip it here in that case.
12766
+ if (hd.getDay() !== SAT) {
12767
+ const biurEv = makeBiurChametzEvent(hd, options);
12768
+ if (biurEv) {
12769
+ evts.push(biurEv);
12770
+ }
12771
+ }
12772
+ return evts;
12773
+ }
12774
+ function makeBiurChametzEvent(hd, options) {
12775
+ const location = options.location;
12776
+ const useElevation = Boolean(options.useElevation);
12777
+ const zmanim = new Zmanim(location, hd, useElevation);
12778
+ const time = zmanim.sofZmanBiurChametzGRA();
12779
+ if (isNaN(time.getTime())) {
12780
+ return undefined;
12781
+ }
12754
12782
  const biurChametzEv = new TimedEvent(hd, holidayDesc.BIUR_CHAMETZ, 0, time, location, undefined, options);
12755
12783
  biurChametzEv.emoji = '🔥';
12756
- evts.push(biurChametzEv);
12757
- return evts;
12784
+ return biurChametzEv;
12758
12785
  }
12759
12786
 
12760
12787
  /*