@hebcal/core 3.39.2 → 3.40.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.
- package/README.md +4 -2
- package/dist/bundle.js +21 -12
- package/dist/bundle.min.js +2 -2
- package/dist/greg0.mjs +7 -7
- package/dist/hdate-bundle.js +7 -6
- package/dist/hdate-bundle.min.js +2 -2
- package/dist/hdate.js +7 -6
- package/dist/hdate.mjs +260 -444
- package/dist/hdate0-bundle.js +6 -5
- package/dist/hdate0-bundle.min.js +2 -2
- package/dist/hdate0.mjs +7 -7
- package/dist/index.js +19 -10
- package/dist/index.mjs +19 -10
- package/hebcal.d.ts +8 -0
- package/package.json +3 -3
- package/dist/hdate-bundle.mjs +0 -1781
- package/dist/hdate0-bundle.mjs +0 -457
package/README.md
CHANGED
|
@@ -2101,7 +2101,7 @@ Represents one of 54 weekly Torah portions, always on a Saturday
|
|
|
2101
2101
|
**Kind**: global class
|
|
2102
2102
|
|
|
2103
2103
|
* [ParshaEvent](#ParshaEvent)
|
|
2104
|
-
* [new ParshaEvent(date, parsha, il)](#new_ParshaEvent_new)
|
|
2104
|
+
* [new ParshaEvent(date, parsha, il, num)](#new_ParshaEvent_new)
|
|
2105
2105
|
* [.render([locale])](#ParshaEvent+render) ⇒ <code>string</code>
|
|
2106
2106
|
* [.basename()](#ParshaEvent+basename) ⇒ <code>string</code>
|
|
2107
2107
|
* [.url()](#ParshaEvent+url) ⇒ <code>string</code>
|
|
@@ -2109,13 +2109,14 @@ Represents one of 54 weekly Torah portions, always on a Saturday
|
|
|
2109
2109
|
|
|
2110
2110
|
<a name="new_ParshaEvent_new"></a>
|
|
2111
2111
|
|
|
2112
|
-
### new ParshaEvent(date, parsha, il)
|
|
2112
|
+
### new ParshaEvent(date, parsha, il, num)
|
|
2113
2113
|
|
|
2114
2114
|
| Param | Type | Description |
|
|
2115
2115
|
| --- | --- | --- |
|
|
2116
2116
|
| date | [<code>HDate</code>](#HDate) | |
|
|
2117
2117
|
| parsha | <code>Array.<string></code> | untranslated name of single or double parsha, such as ['Bereshit'] or ['Achrei Mot', 'Kedoshim'] |
|
|
2118
2118
|
| il | <code>boolean</code> | |
|
|
2119
|
+
| num | <code>number</code> \| <code>Array.<number></code> | |
|
|
2119
2120
|
|
|
2120
2121
|
<a name="ParshaEvent+render"></a>
|
|
2121
2122
|
|
|
@@ -2760,6 +2761,7 @@ Result of Sedra.lookup
|
|
|
2760
2761
|
| --- | --- | --- |
|
|
2761
2762
|
| parsha | <code>Array.<string></code> | Name of the parsha (or parshiyot) read on Hebrew date, e.g. `['Noach']` or `['Matot', 'Masei']` |
|
|
2762
2763
|
| chag | <code>boolean</code> | True if this is a regular parasha HaShavua Torah reading, false if it's a special holiday reading |
|
|
2764
|
+
| num | <code>number</code> \| <code>Array.<number></code> | the parsha number (or numbers) using 1-indexing. A `number` for a regular (single) parsha, and a `number[]` for a doubled parsha. For Parashat *Bereshit*, `num` would be equal to `1`, and for *Matot-Masei* it would be `[42, 43]` |
|
|
2763
2765
|
|
|
2764
2766
|
<a name="MishnaYomi"></a>
|
|
2765
2767
|
|
package/dist/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v3.
|
|
1
|
+
/*! @hebcal/core v3.40.0 */
|
|
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.
|
|
516
|
+
version: '3.23.2',
|
|
517
517
|
mode: 'global',
|
|
518
518
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
519
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.23.
|
|
519
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.23.2/LICENSE',
|
|
520
520
|
source: 'https://github.com/zloirock/core-js'
|
|
521
521
|
});
|
|
522
522
|
|
|
@@ -1444,11 +1444,12 @@ function dayOfYear(date) {
|
|
|
1444
1444
|
throw new TypeError("Argument not a Date: ".concat(date));
|
|
1445
1445
|
}
|
|
1446
1446
|
|
|
1447
|
-
var
|
|
1447
|
+
var month = date.getMonth();
|
|
1448
|
+
var doy = date.getDate() + 31 * month;
|
|
1448
1449
|
|
|
1449
|
-
if (
|
|
1450
|
+
if (month > 1) {
|
|
1450
1451
|
// FEB
|
|
1451
|
-
doy -= Math.floor((4 * (
|
|
1452
|
+
doy -= Math.floor((4 * (month + 1) + 23) / 10);
|
|
1452
1453
|
|
|
1453
1454
|
if (isLeapYear$1(date.getFullYear())) {
|
|
1454
1455
|
doy++;
|
|
@@ -1505,7 +1506,7 @@ function yearFromFixed(abs) {
|
|
|
1505
1506
|
|
|
1506
1507
|
function toFixed(year, month, day) {
|
|
1507
1508
|
var py = year - 1;
|
|
1508
|
-
return
|
|
1509
|
+
return 365 * py + quotient(py, 4) - quotient(py, 100) + quotient(py, 400) + quotient(367 * month - 362, 12) + (month <= 2 ? 0 : isLeapYear$1(year) ? -1 : -2) + day;
|
|
1509
1510
|
}
|
|
1510
1511
|
/**
|
|
1511
1512
|
* Converts from Rata Die (R.D. number) to Gregorian date.
|
|
@@ -6318,6 +6319,10 @@ function throwError(errorMessage) {
|
|
|
6318
6319
|
* Hebrew date, e.g. `['Noach']` or `['Matot', 'Masei']`
|
|
6319
6320
|
* @property {boolean} chag True if this is a regular parasha HaShavua
|
|
6320
6321
|
* Torah reading, false if it's a special holiday reading
|
|
6322
|
+
* @property {number|number[]} num the parsha number (or numbers) using 1-indexing.
|
|
6323
|
+
* A `number` for a regular (single) parsha, and a `number[]` for a doubled parsha.
|
|
6324
|
+
* For Parashat *Bereshit*, `num` would be equal to `1`, and for
|
|
6325
|
+
* *Matot-Masei* it would be `[42, 43]`
|
|
6321
6326
|
*/
|
|
6322
6327
|
|
|
6323
6328
|
/**
|
|
@@ -6520,7 +6525,8 @@ var Sedra = /*#__PURE__*/function () {
|
|
|
6520
6525
|
if (index >= 0) {
|
|
6521
6526
|
return {
|
|
6522
6527
|
parsha: [parshiot[index]],
|
|
6523
|
-
chag: false
|
|
6528
|
+
chag: false,
|
|
6529
|
+
num: index + 1
|
|
6524
6530
|
};
|
|
6525
6531
|
}
|
|
6526
6532
|
|
|
@@ -6528,7 +6534,8 @@ var Sedra = /*#__PURE__*/function () {
|
|
|
6528
6534
|
|
|
6529
6535
|
return {
|
|
6530
6536
|
parsha: [parshiot[p1], parshiot[p1 + 1]],
|
|
6531
|
-
chag: false
|
|
6537
|
+
chag: false,
|
|
6538
|
+
num: [p1 + 1, p1 + 2]
|
|
6532
6539
|
};
|
|
6533
6540
|
}
|
|
6534
6541
|
}]);
|
|
@@ -6753,8 +6760,9 @@ var ParshaEvent = /*#__PURE__*/function (_Event) {
|
|
|
6753
6760
|
* @param {string[]} parsha - untranslated name of single or double parsha,
|
|
6754
6761
|
* such as ['Bereshit'] or ['Achrei Mot', 'Kedoshim']
|
|
6755
6762
|
* @param {boolean} il
|
|
6763
|
+
* @param {number|number[]} num
|
|
6756
6764
|
*/
|
|
6757
|
-
function ParshaEvent(date, parsha, il) {
|
|
6765
|
+
function ParshaEvent(date, parsha, il, num) {
|
|
6758
6766
|
var _this;
|
|
6759
6767
|
|
|
6760
6768
|
_classCallCheck(this, ParshaEvent);
|
|
@@ -6767,6 +6775,7 @@ var ParshaEvent = /*#__PURE__*/function (_Event) {
|
|
|
6767
6775
|
_this = _super.call(this, date, desc, flags.PARSHA_HASHAVUA);
|
|
6768
6776
|
_this.parsha = parsha;
|
|
6769
6777
|
_this.il = Boolean(il);
|
|
6778
|
+
_this.num = num || -1;
|
|
6770
6779
|
return _this;
|
|
6771
6780
|
}
|
|
6772
6781
|
/**
|
|
@@ -7762,7 +7771,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
|
|
|
7762
7771
|
return new HDate(day, month, hyear);
|
|
7763
7772
|
}
|
|
7764
7773
|
|
|
7765
|
-
var version="3.
|
|
7774
|
+
var version="3.40.0";
|
|
7766
7775
|
|
|
7767
7776
|
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};
|
|
7768
7777
|
|
|
@@ -8352,7 +8361,7 @@ var HebrewCalendar = /*#__PURE__*/function () {
|
|
|
8352
8361
|
var parsha0 = sedra.lookup(abs);
|
|
8353
8362
|
|
|
8354
8363
|
if (!parsha0.chag) {
|
|
8355
|
-
evts.push(new ParshaEvent(hd, parsha0.parsha, il));
|
|
8364
|
+
evts.push(new ParshaEvent(hd, parsha0.parsha, il, parsha0.num));
|
|
8356
8365
|
}
|
|
8357
8366
|
}
|
|
8358
8367
|
|