@hebcal/core 5.0.0-rc1 → 5.0.0-rc2

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/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.0.0-rc1 */
1
+ /*! @hebcal/core v5.0.0-rc2 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -371,7 +371,7 @@ const ABS_2SEP1752 = 639785;
371
371
  /**
372
372
  * Gregorian date helper functions.
373
373
  */
374
- var greg;
374
+ exports.greg = void 0;
375
375
  (function (greg) {
376
376
  /**
377
377
  * Long names of the Gregorian months (1='January', 12='December')
@@ -483,7 +483,7 @@ var greg;
483
483
  return dt;
484
484
  }
485
485
  greg.abs2greg = abs2greg;
486
- })(greg || (greg = {}));
486
+ })(exports.greg || (exports.greg = {}));
487
487
 
488
488
  /*
489
489
  * More minimal HDate
@@ -761,8 +761,8 @@ function toSimpleHebrewDate(obj) {
761
761
  return obj;
762
762
  } else if (typeof obj === 'number') {
763
763
  return abs2hebrew(obj);
764
- } else if (greg.isDate(obj)) {
765
- const abs = greg.greg2abs(obj);
764
+ } else if (exports.greg.isDate(obj)) {
765
+ const abs = exports.greg.greg2abs(obj);
766
766
  return abs2hebrew(abs);
767
767
  } else {
768
768
  throw new TypeError(`Argument not a Date: ${obj}`);
@@ -806,7 +806,7 @@ function getYahrzeit(hyear, date) {
806
806
  if (typeof hd === 'undefined') {
807
807
  return hd;
808
808
  }
809
- return greg.abs2greg(hebrew2abs(hd.yy, hd.mm, hd.dd));
809
+ return exports.greg.abs2greg(hebrew2abs(hd.yy, hd.mm, hd.dd));
810
810
  }
811
811
  function getYahrzeitHD(hyear, date) {
812
812
  let hDeath = toSimpleHebrewDate(date);
@@ -873,7 +873,7 @@ function getBirthdayOrAnniversary(hyear, date) {
873
873
  if (typeof hd === 'undefined') {
874
874
  return hd;
875
875
  }
876
- return greg.abs2greg(hebrew2abs(hd.yy, hd.mm, hd.dd));
876
+ return exports.greg.abs2greg(hebrew2abs(hd.yy, hd.mm, hd.dd));
877
877
  }
878
878
  function getBirthdayHD(hyear, date) {
879
879
  const orig = toSimpleHebrewDate(date);
@@ -1029,7 +1029,7 @@ class HDate {
1029
1029
  day = new Date();
1030
1030
  }
1031
1031
  // 1 argument
1032
- const abs0 = typeof day === 'number' && !isNaN(day) ? day : greg.isDate(day) ? greg.greg2abs(day) : HDate.isHDate(day) ? {
1032
+ const abs0 = typeof day === 'number' && !isNaN(day) ? day : exports.greg.isDate(day) ? exports.greg.greg2abs(day) : HDate.isHDate(day) ? {
1033
1033
  dd: day.day,
1034
1034
  mm: day.month,
1035
1035
  yy: day.year
@@ -1146,7 +1146,7 @@ class HDate {
1146
1146
  * @return {Date}
1147
1147
  */
1148
1148
  greg() {
1149
- return greg.abs2greg(this.abs());
1149
+ return exports.greg.abs2greg(this.abs());
1150
1150
  }
1151
1151
 
1152
1152
  /**
@@ -6672,7 +6672,7 @@ class Zmanim {
6672
6672
  * hours, minutes, seconds and milliseconds are ignored.
6673
6673
  */
6674
6674
  constructor(gloc, date) {
6675
- const dt = greg.isDate(date) ? date : HDate.isHDate(date) ? date.greg() : throwTypeError(`invalid date: ${date}`);
6675
+ const dt = exports.greg.isDate(date) ? date : HDate.isHDate(date) ? date.greg() : throwTypeError(`invalid date: ${date}`);
6676
6676
  this.date = dt;
6677
6677
  this.gloc = gloc;
6678
6678
  const plainDate = s.PlainDate.from({
@@ -9752,7 +9752,7 @@ class DailyLearning {
9752
9752
  }
9753
9753
  }
9754
9754
 
9755
- const version="5.0.0-rc1";
9755
+ const version="5.0.0-rc2";
9756
9756
 
9757
9757
  const headers$1={"plural-forms":"nplurals=2; plural=(n > 1);"};const contexts$1={"":{Shabbat:["Shabbos"],"Achrei Mot":["Achrei Mos"],Bechukotai:["Bechukosai"],"Beha'alotcha":["Beha'aloscha"],Bereshit:["Bereshis"],Chukat:["Chukas"],"Erev Shavuot":["Erev Shavuos"],"Erev Sukkot":["Erev Sukkos"],"Ki Tavo":["Ki Savo"],"Ki Teitzei":["Ki Seitzei"],"Ki Tisa":["Ki Sisa"],Matot:["Matos"],"Purim Katan":["Purim Koton"],"Shabbat Chazon":["Shabbos Chazon"],"Shabbat HaChodesh":["Shabbos HaChodesh"],"Shabbat HaGadol":["Shabbos HaGadol"],"Shabbat Nachamu":["Shabbos Nachamu"],"Shabbat Parah":["Shabbos Parah"],"Shabbat Shekalim":["Shabbos Shekalim"],"Shabbat Shuva":["Shabbos Shuvah"],"Shabbat Zachor":["Shabbos Zachor"],Shavuot:["Shavuos"],"Shavuot I":["Shavuos I"],"Shavuot II":["Shavuos II"],Shemot:["Shemos"],"Shmini Atzeret":["Shmini Atzeres"],"Simchat Torah":["Simchas Torah"],Sukkot:["Sukkos"],"Sukkot I":["Sukkos I"],"Sukkot II":["Sukkos II"],"Sukkot II (CH''M)":["Sukkos II (CH''M)"],"Sukkot III (CH''M)":["Sukkos III (CH''M)"],"Sukkot IV (CH''M)":["Sukkos IV (CH''M)"],"Sukkot V (CH''M)":["Sukkos V (CH''M)"],"Sukkot VI (CH''M)":["Sukkos VI (CH''M)"],"Sukkot VII (Hoshana Raba)":["Sukkos VII (Hoshana Raba)"],"Ta'anit Bechorot":["Ta'anis Bechoros"],"Ta'anit Esther":["Ta'anis Esther"],Toldot:["Toldos"],Vaetchanan:["Vaeschanan"],Yitro:["Yisro"],"Vezot Haberakhah":["Vezos Haberakhah"],Parashat:["Parshas"],"Leil Selichot":["Leil Selichos"],"Shabbat Mevarchim Chodesh":["Shabbos Mevorchim Chodesh"],"Shabbat Shirah":["Shabbos Shirah"],Tevet:["Teves"],"Asara B'Tevet":["Asara B'Teves"],"Alot HaShachar":["Alos HaShachar"],"Kriat Shema, sof zeman":["Krias Shema, sof zman"],"Tefilah, sof zeman":["Tefilah, sof zman"],"Kriat Shema, sof zeman (MGA)":["Krias Shema, sof zman (MGA)"],"Tefilah, sof zeman (MGA)":["Tefilah, sof zman (MGA)"],"Chatzot HaLailah":["Chatzos HaLailah"],"Chatzot hayom":["Chatzos"],"Tzeit HaKochavim":["Tzeis HaKochavim"],"Birkat Hachamah":["Birkas Hachamah"],"Shushan Purim Katan":["Shushan Purim Koton"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
9758
9758
 
@@ -10729,7 +10729,7 @@ function checkCandleOptions(options) {
10729
10729
  */
10730
10730
  function getAbs(d) {
10731
10731
  if (typeof d == 'number') return d;
10732
- if (greg.isDate(d)) return greg.greg2abs(d);
10732
+ if (exports.greg.isDate(d)) return exports.greg.greg2abs(d);
10733
10733
  if (HDate.isHDate(d)) return d.abs();
10734
10734
  throw new TypeError(`Invalid date type: ${d}`);
10735
10735
  }
@@ -10779,17 +10779,17 @@ function getStartAndEnd(options) {
10779
10779
  if (theYear < 100) {
10780
10780
  startGreg.setFullYear(theYear);
10781
10781
  }
10782
- const startAbs = greg.greg2abs(startGreg);
10782
+ const startAbs = exports.greg.greg2abs(startGreg);
10783
10783
  let endAbs;
10784
10784
  if (options.month) {
10785
- endAbs = startAbs + greg.daysInMonth(theMonth, theYear) - 1;
10785
+ endAbs = startAbs + exports.greg.daysInMonth(theMonth, theYear) - 1;
10786
10786
  } else {
10787
10787
  const endYear = theYear + numYears;
10788
10788
  const endGreg = new Date(endYear, 0, 1);
10789
10789
  if (endYear < 100) {
10790
10790
  endGreg.setFullYear(endYear);
10791
10791
  }
10792
- endAbs = greg.greg2abs(endGreg) - 1;
10792
+ endAbs = exports.greg.greg2abs(endGreg) - 1;
10793
10793
  }
10794
10794
  return [startAbs, endAbs];
10795
10795
  }
@@ -11079,7 +11079,7 @@ class HebrewCalendar {
11079
11079
  warnUnrecognizedOptions(options);
11080
11080
  const startAbs = startAndEnd[0];
11081
11081
  const endAbs = startAndEnd[1];
11082
- const startGreg = greg.abs2greg(startAbs);
11082
+ const startGreg = exports.greg.abs2greg(startAbs);
11083
11083
  if (startGreg.getFullYear() < 100) {
11084
11084
  options.candlelighting = false;
11085
11085
  }