@hebcal/core 3.41.2 → 3.41.3

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 v3.41.2 */
1
+ /*! @hebcal/core v3.41.3 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -513,10 +513,10 @@ var store$2 = sharedStore;
513
513
  (shared$3.exports = function (key, value) {
514
514
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
515
515
  })('versions', []).push({
516
- version: '3.23.2',
516
+ version: '3.23.3',
517
517
  mode: 'global',
518
518
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
519
- license: 'https://github.com/zloirock/core-js/blob/v3.23.2/LICENSE',
519
+ license: 'https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE',
520
520
  source: 'https://github.com/zloirock/core-js'
521
521
  });
522
522
 
@@ -890,7 +890,8 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
890
890
  if (options && options.getter) name = 'get ' + name;
891
891
  if (options && options.setter) name = 'set ' + name;
892
892
  if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
893
- defineProperty(value, 'name', { value: name, configurable: true });
893
+ if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
894
+ else value.name = name;
894
895
  }
895
896
  if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
896
897
  defineProperty(value, 'length', { value: options.arity });
@@ -927,8 +928,10 @@ var defineBuiltIn$1 = function (O, key, value, options) {
927
928
  if (simple) O[key] = value;
928
929
  else defineGlobalProperty$1(key, value);
929
930
  } else {
930
- if (!options.unsafe) delete O[key];
931
- else if (O[key]) simple = true;
931
+ try {
932
+ if (!options.unsafe) delete O[key];
933
+ else if (O[key]) simple = true;
934
+ } catch (error) { /* empty */ }
932
935
  if (simple) O[key] = value;
933
936
  else definePropertyModule$2.f(O, key, {
934
937
  value: value,
@@ -1432,32 +1435,11 @@ function daysInMonth$1(month, year) {
1432
1435
  function isDate(obj) {
1433
1436
  return _typeof(obj) === 'object' && Date.prototype === obj.__proto__;
1434
1437
  }
1435
- /**
1436
- * Returns number of days since January 1 of that year
1437
- * @private
1438
- * @param {Date} date Gregorian date
1439
- * @return {number}
1440
- */
1441
-
1442
- function dayOfYear(date) {
1443
- if (!isDate(date)) {
1444
- throw new TypeError("Argument not a Date: ".concat(date));
1445
- }
1446
-
1447
- var month = date.getMonth();
1448
- var doy = date.getDate() + 31 * month;
1449
-
1450
- if (month > 1) {
1451
- // FEB
1452
- doy -= Math.floor((4 * (month + 1) + 23) / 10);
1453
-
1454
- if (isLeapYear$1(date.getFullYear())) {
1455
- doy++;
1456
- }
1457
- }
1438
+ /*
1439
+ const ABS_14SEP1752 = 639797;
1440
+ const ABS_2SEP1752 = 639785;
1441
+ */
1458
1442
 
1459
- return doy;
1460
- }
1461
1443
  /**
1462
1444
  * Converts Gregorian date to absolute R.D. (Rata Die) days
1463
1445
  * @private
@@ -1470,12 +1452,14 @@ function greg2abs(date) {
1470
1452
  throw new TypeError("Argument not a Date: ".concat(date));
1471
1453
  }
1472
1454
 
1473
- var year = date.getFullYear() - 1;
1474
- return dayOfYear(date) + // days this year
1475
- 365 * year + ( // + days in prior years
1476
- Math.floor(year / 4) - // + Julian Leap years
1477
- Math.floor(year / 100) + // - century years
1478
- Math.floor(year / 400)); // + Gregorian leap years
1455
+ var abs = toFixed(date.getFullYear(), date.getMonth() + 1, date.getDate());
1456
+ /*
1457
+ if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
1458
+ throw new RangeError(`Invalid Date: ${date}`);
1459
+ }
1460
+ */
1461
+
1462
+ return abs;
1479
1463
  }
1480
1464
  /**
1481
1465
  * @private
@@ -1498,8 +1482,8 @@ function yearFromFixed(abs) {
1498
1482
  /**
1499
1483
  * @private
1500
1484
  * @param {number} year
1501
- * @param {number} month
1502
- * @param {number} day
1485
+ * @param {number} month (1-12)
1486
+ * @param {number} day (1-31)
1503
1487
  * @return {number}
1504
1488
  */
1505
1489
 
@@ -1526,6 +1510,12 @@ function abs2greg(abs) {
1526
1510
  }
1527
1511
 
1528
1512
  abs = Math.trunc(abs);
1513
+ /*
1514
+ if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
1515
+ throw new RangeError(`Invalid Date: ${abs}`);
1516
+ }
1517
+ */
1518
+
1529
1519
  var year = yearFromFixed(abs);
1530
1520
  var priorDays = abs - toFixed(year, 1, 1);
1531
1521
  var correction = abs < toFixed(year, 3, 1) ? 0 : isLeapYear$1(year) ? 1 : 2;
@@ -1591,14 +1581,31 @@ var greg = /*#__PURE__*/function () {
1591
1581
  }
1592
1582
  /**
1593
1583
  * Returns number of days since January 1 of that year
1584
+ * @deprecated
1594
1585
  * @param {Date} date Gregorian date
1595
1586
  * @return {number}
1596
1587
  */
1597
1588
 
1598
1589
  }, {
1599
1590
  key: "dayOfYear",
1600
- value: function dayOfYear$1(date) {
1601
- return dayOfYear(date);
1591
+ value: function dayOfYear(date) {
1592
+ if (!isDate(date)) {
1593
+ throw new TypeError("Argument not a Date: ".concat(date));
1594
+ }
1595
+
1596
+ var month = date.getMonth();
1597
+ var doy = date.getDate() + 31 * month;
1598
+
1599
+ if (month > 1) {
1600
+ // FEB
1601
+ doy -= Math.floor((4 * (month + 1) + 23) / 10);
1602
+
1603
+ if (isLeapYear$1(date.getFullYear())) {
1604
+ doy++;
1605
+ }
1606
+ }
1607
+
1608
+ return doy;
1602
1609
  }
1603
1610
  /**
1604
1611
  * Converts Gregorian date to absolute R.D. (Rata Die) days
@@ -7865,7 +7872,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
7865
7872
  return new HDate(day, month, hyear);
7866
7873
  }
7867
7874
 
7868
- var version="3.41.2";
7875
+ var version="3.41.3";
7869
7876
 
7870
7877
  var headers$1={"plural-forms":"nplurals=2; plural=(n > 1);",language:"en_CA@ashkenazi"};var contexts$1={"":{Berachot:["Berachos"],Shabbat:["Shabbos"],Taanit:["Taanis"],Yevamot:["Yevamos"],Ketubot:["Kesubos"],"Baba Batra":["Baba Basra"],Makkot:["Makkos"],Shevuot:["Shevuos"],Horayot:["Horayos"],Menachot:["Menachos"],Bechorot:["Bechoros"],Keritot:["Kerisos"],Midot:["Midos"],"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"],Tazria:["Sazria"],"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"],Berakhot:["Berakhos"],Sheviit:["Sheviis"],Terumot:["Terumos"],Maasrot:["Maasros"],Eduyot:["Eduyos"],Avot:["Avos"],Bekhorot:["Bekhoros"],Middot:["Middos"],Oholot:["Oholos"],Tahorot:["Tahoros"],Mikvaot:["Mikvaos"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
7871
7878