@hebcal/core 5.8.7 → 5.8.8

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 +28 -28
  2. package/dist/bundle.js.map +1 -1
  3. package/dist/bundle.min.js +4 -4
  4. package/dist/bundle.min.js.map +1 -1
  5. package/dist/candles.d.ts +7 -1
  6. package/dist/esm/DailyLearning.js +1 -1
  7. package/dist/esm/HebrewDateEvent.js +1 -1
  8. package/dist/esm/HolidayEvent.js +3 -7
  9. package/dist/esm/HolidayEvent.js.map +1 -1
  10. package/dist/esm/MevarchimChodeshEvent.js +1 -1
  11. package/dist/esm/ParshaEvent.js +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 +4 -2
  16. package/dist/esm/calendar.js.map +1 -1
  17. package/dist/esm/candles.d.ts +7 -1
  18. package/dist/esm/candles.js +21 -15
  19. package/dist/esm/candles.js.map +1 -1
  20. package/dist/esm/event.js +3 -7
  21. package/dist/esm/event.js.map +1 -1
  22. package/dist/esm/getStartAndEnd.js +1 -1
  23. package/dist/esm/hallel.js +1 -1
  24. package/dist/esm/he.po.js +1 -1
  25. package/dist/esm/hebcal.js +1 -1
  26. package/dist/esm/holidays.js +1 -1
  27. package/dist/esm/index.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 +1 -1
  32. package/dist/esm/omer.js +1 -1
  33. package/dist/esm/parshaName.js +1 -1
  34. package/dist/esm/parshaYear.js +1 -1
  35. package/dist/esm/pkgVersion.d.ts +1 -1
  36. package/dist/esm/pkgVersion.js +2 -2
  37. package/dist/esm/pkgVersion.js.map +1 -1
  38. package/dist/esm/reformatTimeStr.js +1 -1
  39. package/dist/esm/sedra.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/index.cjs +28 -28
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/pkgVersion.d.ts +1 -1
  46. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -1,9 +1,9 @@
1
- /*! @hebcal/core v5.8.7 */
1
+ /*! @hebcal/core v5.8.8 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
5
5
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
6
- const version = '5.8.7';
6
+ const version = '5.8.8';
7
7
 
8
8
  /*! @hebcal/hdate v0.13.2 */
9
9
  /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
@@ -2239,12 +2239,8 @@ class Event {
2239
2239
  */
2240
2240
  clone() {
2241
2241
  const ev = new Event(this.date, this.desc, this.mask);
2242
- for (const property in this) {
2243
- // eslint-disable-next-line no-prototype-builtins
2244
- if (this.hasOwnProperty(property)) {
2245
- Object.defineProperty(ev, property, { value: this[property] });
2246
- }
2247
- }
2242
+ // overwrite all enumerable properties
2243
+ Object.assign(ev, this);
2248
2244
  return ev;
2249
2245
  }
2250
2246
  /**
@@ -11234,12 +11230,8 @@ class HolidayEvent extends Event {
11234
11230
  */
11235
11231
  clone() {
11236
11232
  const ev = new HolidayEvent(this.date, this.desc, this.mask);
11237
- for (const property in this) {
11238
- // eslint-disable-next-line no-prototype-builtins
11239
- if (this.hasOwnProperty(property)) {
11240
- Object.defineProperty(ev, property, { value: this[property] });
11241
- }
11242
- }
11233
+ // overwrite all enumerable properties
11234
+ Object.assign(ev, this);
11243
11235
  return ev;
11244
11236
  }
11245
11237
  }
@@ -11356,23 +11348,29 @@ const FAST_BEGINS = 'Fast begins';
11356
11348
  const FAST_ENDS = 'Fast ends';
11357
11349
  /** A fast day also contains a start and end time */
11358
11350
  class FastDayEvent extends HolidayEvent {
11359
- constructor(date, desc, mask, startEvent, endEvent) {
11360
- super(date, desc, mask);
11351
+ constructor(linkedEvent, startEvent, endEvent) {
11352
+ super(linkedEvent.getDate(), linkedEvent.getDesc(), linkedEvent.getFlags());
11353
+ this.linkedEvent = linkedEvent;
11361
11354
  this.startEvent = startEvent;
11362
11355
  this.endEvent = endEvent;
11363
11356
  }
11357
+ render(locale) {
11358
+ return this.linkedEvent.render(locale);
11359
+ }
11360
+ renderBrief(locale) {
11361
+ return this.linkedEvent.renderBrief(locale);
11362
+ }
11364
11363
  urlDateSuffix() {
11365
- if (this.getDesc() === "Asara B'Tevet") {
11366
- const isoDate = isoDateString(this.getDate().greg());
11367
- return isoDate.replace(/-/g, '');
11368
- }
11369
- return super.urlDateSuffix();
11364
+ return this.linkedEvent.urlDateSuffix();
11370
11365
  }
11371
11366
  url() {
11372
- if (this.getFlags() & flags.YOM_KIPPUR_KATAN) {
11373
- return undefined;
11374
- }
11375
- return super.url();
11367
+ return this.linkedEvent.url();
11368
+ }
11369
+ getEmoji() {
11370
+ return this.linkedEvent.getEmoji();
11371
+ }
11372
+ getCategories() {
11373
+ return this.linkedEvent.getCategories();
11376
11374
  }
11377
11375
  }
11378
11376
  /**
@@ -11382,7 +11380,7 @@ class FastDayEvent extends HolidayEvent {
11382
11380
  function makeFastStartEnd(ev, options) {
11383
11381
  const desc = ev.getDesc();
11384
11382
  if (desc === 'Yom Kippur') {
11385
- return ev;
11383
+ throw new RangeError('YK does not require this function');
11386
11384
  }
11387
11385
  const hd = ev.getDate();
11388
11386
  const dt = hd.greg();
@@ -11417,7 +11415,7 @@ function makeFastStartEnd(ev, options) {
11417
11415
  }
11418
11416
  }
11419
11417
  }
11420
- const ev2 = new FastDayEvent(hd, desc, ev.getFlags(), startEvent, endEvent);
11418
+ const ev2 = new FastDayEvent(ev, startEvent, endEvent);
11421
11419
  // copy properties such as memo or emoji
11422
11420
  Object.assign(ev2, ev);
11423
11421
  return ev2;
@@ -13758,7 +13756,9 @@ function appendHolidayAndRelated(candlesEv, events, ev, options, isFriday, isSat
13758
13756
  const isMajorFast = Boolean(eFlags & MAJOR_FAST);
13759
13757
  const isMinorFast = Boolean(eFlags & MINOR_FAST);
13760
13758
  let fastEv;
13761
- if (options.candlelighting && (isMajorFast || isMinorFast)) {
13759
+ if (options.candlelighting &&
13760
+ (isMajorFast || isMinorFast) &&
13761
+ ev.getDesc() !== 'Yom Kippur') {
13762
13762
  ev = fastEv = makeFastStartEnd(ev, options);
13763
13763
  if (fastEv.startEvent &&
13764
13764
  (isMajorFast || (isMinorFast && !options.noMinorFast))) {