@hebcal/core 5.7.7 → 5.8.0

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 (57) hide show
  1. package/dist/CalOptions.d.ts +12 -0
  2. package/dist/bundle.js +46 -2
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/bundle.min.js +4 -4
  5. package/dist/bundle.min.js.map +1 -1
  6. package/dist/calendar.d.ts +1 -0
  7. package/dist/esm/CalOptions.d.ts +12 -0
  8. package/dist/esm/DailyLearning.js +1 -1
  9. package/dist/esm/HebrewDateEvent.js +1 -1
  10. package/dist/esm/HolidayEvent.js +1 -1
  11. package/dist/esm/MevarchimChodeshEvent.js +1 -1
  12. package/dist/esm/ParshaEvent.js +1 -1
  13. package/dist/esm/TimedEvent.js +1 -1
  14. package/dist/esm/YomKippurKatanEvent.js +1 -1
  15. package/dist/esm/ashkenazi.po.js +1 -1
  16. package/dist/esm/calendar.d.ts +1 -0
  17. package/dist/esm/calendar.js +20 -2
  18. package/dist/esm/calendar.js.map +1 -1
  19. package/dist/esm/candles.js +1 -1
  20. package/dist/esm/event.d.ts +2 -0
  21. package/dist/esm/event.js +3 -1
  22. package/dist/esm/event.js.map +1 -1
  23. package/dist/esm/getStartAndEnd.js +1 -1
  24. package/dist/esm/hallel.js +1 -1
  25. package/dist/esm/he.po.js +1 -1
  26. package/dist/esm/hebcal.d.ts +1 -0
  27. package/dist/esm/hebcal.js +2 -1
  28. package/dist/esm/hebcal.js.map +1 -1
  29. package/dist/esm/holidays.js +1 -1
  30. package/dist/esm/index.d.ts +1 -0
  31. package/dist/esm/index.js +2 -1
  32. package/dist/esm/index.js.map +1 -1
  33. package/dist/esm/locale.js +1 -1
  34. package/dist/esm/location.js +1 -1
  35. package/dist/esm/modern.js +1 -1
  36. package/dist/esm/molad.js +1 -1
  37. package/dist/esm/omer.js +1 -1
  38. package/dist/esm/parshaName.js +1 -1
  39. package/dist/esm/parshaYear.d.ts +9 -0
  40. package/dist/esm/parshaYear.js +29 -0
  41. package/dist/esm/parshaYear.js.map +1 -0
  42. package/dist/esm/pkgVersion.d.ts +1 -1
  43. package/dist/esm/pkgVersion.js +2 -2
  44. package/dist/esm/pkgVersion.js.map +1 -1
  45. package/dist/esm/reformatTimeStr.js +1 -1
  46. package/dist/esm/sedra.js +1 -1
  47. package/dist/esm/staticHolidays.js +1 -1
  48. package/dist/esm/tachanun.js +1 -1
  49. package/dist/esm/zmanim.js +1 -1
  50. package/dist/event.d.ts +2 -0
  51. package/dist/hebcal.d.ts +1 -0
  52. package/dist/index.cjs +46 -2
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.d.ts +1 -0
  55. package/dist/parshaYear.d.ts +9 -0
  56. package/dist/pkgVersion.d.ts +1 -1
  57. package/package.json +1 -1
@@ -111,6 +111,7 @@ export type CalOptions = {
111
111
  molad?: boolean;
112
112
  /**
113
113
  * use Ashkenazi transliterations for event titles (default Sephardi transliterations)
114
+ * @deprecated use `event.render('ashkenazi')` instead
114
115
  */
115
116
  ashkenazi?: boolean;
116
117
  /**
@@ -155,4 +156,15 @@ export type CalOptions = {
155
156
  dailyLearning?: {
156
157
  [x: string]: DailyLearningValue;
157
158
  };
159
+ /**
160
+ * Yizkor (Hebrew: יִזְכּוֹר) is an Ashkenazi Jewish memorial prayer service
161
+ * for the dead. Yizkor is recited in synagogue as part of the service
162
+ * during four holidays each year:
163
+ * 1. Yom Kippur
164
+ * 2. Shmini Atzeret
165
+ * 3. The final day of Passover (8th day Pesach in Diaspora, 7th day
166
+ * Pesach in Israel)
167
+ * 4. Shavuot (2nd day Shavuot in Diaspora)
168
+ */
169
+ yizkor?: boolean;
158
170
  };
package/dist/bundle.js CHANGED
@@ -1,9 +1,9 @@
1
- /*! @hebcal/core v5.7.7 */
1
+ /*! @hebcal/core v5.8.0 */
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.7.7';
6
+ const version = '5.8.0';
7
7
 
8
8
  /*! @hebcal/hdate v0.12.0 */
9
9
  /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
@@ -2081,6 +2081,8 @@ const flags = {
2081
2081
  NACH_YOMI: 0x2000000,
2082
2082
  /** Daily Learning */
2083
2083
  DAILY_LEARNING: 0x4000000,
2084
+ /** Yizkor */
2085
+ YIZKOR: 0x8000000,
2084
2086
  };
2085
2087
  const flagToCategory = [
2086
2088
  [flags.MAJOR_FAST, 'holiday', 'major', 'fast'],
@@ -12454,6 +12456,28 @@ class ParshaEvent extends Event {
12454
12456
  }
12455
12457
  }
12456
12458
 
12459
+ /**
12460
+ * Calculates weekly Torah Reading on Saturdays for entire year
12461
+ * @param year Hebrew year
12462
+ * @param il Israel (false for Diaspora)
12463
+ * @returns an array of `ParshaEvent` occurring on Saturdays that contain a regular
12464
+ * (non-holiday) Parashat HaShavua
12465
+ */
12466
+ function parshaYear(year, il) {
12467
+ const sedra = getSedra(year, il);
12468
+ const startAbs = sedra.getFirstSaturday();
12469
+ const endAbs = HDate.hebrew2abs(year, months.ELUL, 29);
12470
+ const events = [];
12471
+ for (let absDt = startAbs; absDt <= endAbs; absDt += 7) {
12472
+ const parsha = sedra.lookup(absDt);
12473
+ if (!parsha.chag) {
12474
+ const ev = new ParshaEvent(parsha.hdate, parsha.parsha, il, parsha.num);
12475
+ events.push(ev);
12476
+ }
12477
+ }
12478
+ return events;
12479
+ }
12480
+
12457
12481
  const SUN$1 = 0;
12458
12482
  const TUE$1 = 2;
12459
12483
  const FRI$2 = 5;
@@ -13232,6 +13256,7 @@ function startEndHebrew(theMonth, theYear, numYears) {
13232
13256
  * * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
13233
13257
  * * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
13234
13258
  * * Yom Kippur Katan (`options.yomKippurKatan`)
13259
+ * * Yizkor (`options.yizkor`)
13235
13260
  *
13236
13261
  * Daily Study of texts are supported by the
13237
13262
  * {@link https://github.com/hebcal/hebcal-learning @hebcal/learning} package,
@@ -13398,6 +13423,16 @@ function calendar(options = {}) {
13398
13423
  if (candlesEv) {
13399
13424
  evts.push(candlesEv);
13400
13425
  }
13426
+ if (options.yizkor) {
13427
+ const mm = hd.getMonth();
13428
+ const dd = hd.getDate();
13429
+ if ((mm === months.TISHREI && (dd === 10 || dd === 22)) ||
13430
+ (mm === NISAN && dd === (il ? 21 : 22)) ||
13431
+ (mm === SIVAN && dd === (il ? 6 : 7))) {
13432
+ const ev = new Event(hd, 'Yizkor', flags.YIZKOR, { emoji: '🕯️' });
13433
+ evts.push(ev);
13434
+ }
13435
+ }
13401
13436
  if (options.addHebrewDates ||
13402
13437
  (options.addHebrewDatesForEvents && prevEventsLength !== evts.length)) {
13403
13438
  const e2 = new HebrewDateEvent(hd);
@@ -13438,6 +13473,7 @@ const MINOR_HOLIDAY = flags.MINOR_HOLIDAY;
13438
13473
  const EREV = flags.EREV;
13439
13474
  const CHOL_HAMOED = flags.CHOL_HAMOED;
13440
13475
  const YOM_KIPPUR_KATAN = flags.YOM_KIPPUR_KATAN;
13476
+ const YIZKOR = flags.YIZKOR;
13441
13477
  const unrecognizedAlreadyWarned = new Set();
13442
13478
  const RECOGNIZED_OPTIONS = {
13443
13479
  location: 1,
@@ -13471,6 +13507,7 @@ const RECOGNIZED_OPTIONS = {
13471
13507
  hour12: 1,
13472
13508
  dailyLearning: 1,
13473
13509
  useElevation: 1,
13510
+ yizkor: 1,
13474
13511
  };
13475
13512
  /**
13476
13513
  * @private
@@ -13631,6 +13668,9 @@ function getMaskFromOptions(options) {
13631
13668
  if (options.yomKippurKatan) {
13632
13669
  mask |= YOM_KIPPUR_KATAN;
13633
13670
  }
13671
+ if (options.yizkor) {
13672
+ mask |= YIZKOR;
13673
+ }
13634
13674
  if (options.dailyLearning) {
13635
13675
  const dailyLearning = options.dailyLearning;
13636
13676
  if (dailyLearning.dafYomi) {
@@ -13686,6 +13726,8 @@ function setOptionsFromMask(options) {
13686
13726
  options.shabbatMevarchim = true;
13687
13727
  if (m & YOM_KIPPUR_KATAN)
13688
13728
  options.yomKippurKatan = true;
13729
+ if (m & YIZKOR)
13730
+ options.yizkor = true;
13689
13731
  return m;
13690
13732
  }
13691
13733
  /**
@@ -13856,6 +13898,7 @@ class HebrewCalendar {
13856
13898
  * * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
13857
13899
  * * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
13858
13900
  * * Yom Kippur Katan (`options.yomKippurKatan`)
13901
+ * * Yizkor (`options.yizkor`)
13859
13902
  *
13860
13903
  * Daily Study of texts are supported by the
13861
13904
  * {@link https://github.com/hebcal/hebcal-learning @hebcal/learning} package,
@@ -14147,6 +14190,7 @@ exports.getHolidaysOnDate = getHolidaysOnDate;
14147
14190
  exports.getSedra = getSedra;
14148
14191
  exports.holidayDesc = holidayDesc;
14149
14192
  exports.months = months;
14193
+ exports.parshaYear = parshaYear;
14150
14194
  exports.parshiot = parshiot;
14151
14195
  exports.version = version;
14152
14196