@hebcal/core 5.4.4 → 5.4.6
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/ParshaEvent.d.ts +3 -3
- package/dist/bundle.js +152 -132
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +156 -139
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +156 -139
- package/dist/pkgVersion.d.ts +1 -1
- package/dist/sedra.d.ts +2 -0
- package/package.json +9 -10
- package/po/ashkenazi.po +0 -192
- package/po/he.po +0 -889
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.4.
|
|
1
|
+
/*! @hebcal/core v5.4.6 */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
|
|
3
3
|
/** @private */
|
|
4
4
|
const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
@@ -8478,9 +8478,17 @@ class HavdalahEvent extends TimedEvent {
|
|
|
8478
8478
|
const shortDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
8479
8479
|
const heDayNames = ['רִאשׁוֹן', 'שֵׁנִי', 'שְׁלִישִׁי', 'רְבִיעִי', 'חֲמִישִׁי', 'שִׁישִּׁי', 'שַׁבָּת'];
|
|
8480
8480
|
const night = 'בַּלַּ֥יְלָה';
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8481
|
+
function getHebrewTimeOfDay(hour) {
|
|
8482
|
+
if (hour < 5)
|
|
8483
|
+
return night;
|
|
8484
|
+
else if (hour < 12)
|
|
8485
|
+
return 'בַּבֹּקֶר';
|
|
8486
|
+
else if (hour < 17)
|
|
8487
|
+
return 'בַּצׇּהֳרַיִים';
|
|
8488
|
+
else if (hour < 21)
|
|
8489
|
+
return 'בָּעֶרֶב';
|
|
8490
|
+
return night;
|
|
8491
|
+
}
|
|
8484
8492
|
/**
|
|
8485
8493
|
* Represents a molad, the moment when the new moon is "born"
|
|
8486
8494
|
*/
|
|
@@ -8541,6 +8549,7 @@ class Molad {
|
|
|
8541
8549
|
* @return {string}
|
|
8542
8550
|
*/
|
|
8543
8551
|
render(locale, options) {
|
|
8552
|
+
var _a;
|
|
8544
8553
|
locale = locale !== null && locale !== void 0 ? locale : Locale.getLocaleName();
|
|
8545
8554
|
if (typeof locale === 'string') {
|
|
8546
8555
|
locale = locale.toLowerCase();
|
|
@@ -8553,11 +8562,10 @@ class Molad {
|
|
|
8553
8562
|
const hour = this.getHour();
|
|
8554
8563
|
const chalakim = this.getChalakim();
|
|
8555
8564
|
const moladStr = Locale.gettext('Molad', locale);
|
|
8556
|
-
const minutesStr = Locale.lookupTranslation('min', locale)
|
|
8565
|
+
const minutesStr = (_a = Locale.lookupTranslation('min', locale)) !== null && _a !== void 0 ? _a : 'minutes';
|
|
8557
8566
|
const chalakimStr = Locale.gettext('chalakim', locale);
|
|
8558
8567
|
if (isHebrewLocale) {
|
|
8559
|
-
const ampm = hour
|
|
8560
|
-
hour < 17 ? afternoon : hour < 21 ? evening : night;
|
|
8568
|
+
const ampm = getHebrewTimeOfDay(hour);
|
|
8561
8569
|
const result = `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` +
|
|
8562
8570
|
`בְּשָׁעָה ${hour} ${ampm}, ` +
|
|
8563
8571
|
`ו-${minutes} ${minutesStr} ` +
|
|
@@ -8682,13 +8690,6 @@ class OmerEvent extends Event {
|
|
|
8682
8690
|
}
|
|
8683
8691
|
|
|
8684
8692
|
class QuickLRU extends Map {
|
|
8685
|
-
#size = 0;
|
|
8686
|
-
#cache = new Map();
|
|
8687
|
-
#oldCache = new Map();
|
|
8688
|
-
#maxSize;
|
|
8689
|
-
#maxAge;
|
|
8690
|
-
#onEviction;
|
|
8691
|
-
|
|
8692
8693
|
constructor(options = {}) {
|
|
8693
8694
|
super();
|
|
8694
8695
|
|
|
@@ -8700,30 +8701,30 @@ class QuickLRU extends Map {
|
|
|
8700
8701
|
throw new TypeError('`maxAge` must be a number greater than 0');
|
|
8701
8702
|
}
|
|
8702
8703
|
|
|
8703
|
-
|
|
8704
|
-
this
|
|
8705
|
-
this
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8710
|
-
return this.#oldCache;
|
|
8704
|
+
// TODO: Use private class fields when ESLint supports them.
|
|
8705
|
+
this.maxSize = options.maxSize;
|
|
8706
|
+
this.maxAge = options.maxAge || Number.POSITIVE_INFINITY;
|
|
8707
|
+
this.onEviction = options.onEviction;
|
|
8708
|
+
this.cache = new Map();
|
|
8709
|
+
this.oldCache = new Map();
|
|
8710
|
+
this._size = 0;
|
|
8711
8711
|
}
|
|
8712
8712
|
|
|
8713
|
-
|
|
8714
|
-
|
|
8713
|
+
// TODO: Use private class methods when targeting Node.js 16.
|
|
8714
|
+
_emitEvictions(cache) {
|
|
8715
|
+
if (typeof this.onEviction !== 'function') {
|
|
8715
8716
|
return;
|
|
8716
8717
|
}
|
|
8717
8718
|
|
|
8718
8719
|
for (const [key, item] of cache) {
|
|
8719
|
-
this
|
|
8720
|
+
this.onEviction(key, item.value);
|
|
8720
8721
|
}
|
|
8721
8722
|
}
|
|
8722
8723
|
|
|
8723
|
-
|
|
8724
|
+
_deleteIfExpired(key, item) {
|
|
8724
8725
|
if (typeof item.expiry === 'number' && item.expiry <= Date.now()) {
|
|
8725
|
-
if (typeof this
|
|
8726
|
-
this
|
|
8726
|
+
if (typeof this.onEviction === 'function') {
|
|
8727
|
+
this.onEviction(key, item.value);
|
|
8727
8728
|
}
|
|
8728
8729
|
|
|
8729
8730
|
return this.delete(key);
|
|
@@ -8732,54 +8733,54 @@ class QuickLRU extends Map {
|
|
|
8732
8733
|
return false;
|
|
8733
8734
|
}
|
|
8734
8735
|
|
|
8735
|
-
|
|
8736
|
-
const deleted = this
|
|
8736
|
+
_getOrDeleteIfExpired(key, item) {
|
|
8737
|
+
const deleted = this._deleteIfExpired(key, item);
|
|
8737
8738
|
if (deleted === false) {
|
|
8738
8739
|
return item.value;
|
|
8739
8740
|
}
|
|
8740
8741
|
}
|
|
8741
8742
|
|
|
8742
|
-
|
|
8743
|
-
return item.expiry ? this
|
|
8743
|
+
_getItemValue(key, item) {
|
|
8744
|
+
return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;
|
|
8744
8745
|
}
|
|
8745
8746
|
|
|
8746
|
-
|
|
8747
|
+
_peek(key, cache) {
|
|
8747
8748
|
const item = cache.get(key);
|
|
8748
8749
|
|
|
8749
|
-
return this
|
|
8750
|
+
return this._getItemValue(key, item);
|
|
8750
8751
|
}
|
|
8751
8752
|
|
|
8752
|
-
|
|
8753
|
-
this
|
|
8754
|
-
this
|
|
8753
|
+
_set(key, value) {
|
|
8754
|
+
this.cache.set(key, value);
|
|
8755
|
+
this._size++;
|
|
8755
8756
|
|
|
8756
|
-
if (this
|
|
8757
|
-
this
|
|
8758
|
-
this
|
|
8759
|
-
this
|
|
8760
|
-
this
|
|
8757
|
+
if (this._size >= this.maxSize) {
|
|
8758
|
+
this._size = 0;
|
|
8759
|
+
this._emitEvictions(this.oldCache);
|
|
8760
|
+
this.oldCache = this.cache;
|
|
8761
|
+
this.cache = new Map();
|
|
8761
8762
|
}
|
|
8762
8763
|
}
|
|
8763
8764
|
|
|
8764
|
-
|
|
8765
|
-
this
|
|
8766
|
-
this
|
|
8765
|
+
_moveToRecent(key, item) {
|
|
8766
|
+
this.oldCache.delete(key);
|
|
8767
|
+
this._set(key, item);
|
|
8767
8768
|
}
|
|
8768
8769
|
|
|
8769
|
-
*
|
|
8770
|
-
for (const item of this
|
|
8770
|
+
* _entriesAscending() {
|
|
8771
|
+
for (const item of this.oldCache) {
|
|
8771
8772
|
const [key, value] = item;
|
|
8772
|
-
if (!this
|
|
8773
|
-
const deleted = this
|
|
8773
|
+
if (!this.cache.has(key)) {
|
|
8774
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
8774
8775
|
if (deleted === false) {
|
|
8775
8776
|
yield item;
|
|
8776
8777
|
}
|
|
8777
8778
|
}
|
|
8778
8779
|
}
|
|
8779
8780
|
|
|
8780
|
-
for (const item of this
|
|
8781
|
+
for (const item of this.cache) {
|
|
8781
8782
|
const [key, value] = item;
|
|
8782
|
-
const deleted = this
|
|
8783
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
8783
8784
|
if (deleted === false) {
|
|
8784
8785
|
yield item;
|
|
8785
8786
|
}
|
|
@@ -8787,72 +8788,73 @@ class QuickLRU extends Map {
|
|
|
8787
8788
|
}
|
|
8788
8789
|
|
|
8789
8790
|
get(key) {
|
|
8790
|
-
if (this
|
|
8791
|
-
const item = this
|
|
8792
|
-
|
|
8791
|
+
if (this.cache.has(key)) {
|
|
8792
|
+
const item = this.cache.get(key);
|
|
8793
|
+
|
|
8794
|
+
return this._getItemValue(key, item);
|
|
8793
8795
|
}
|
|
8794
8796
|
|
|
8795
|
-
if (this
|
|
8796
|
-
const item = this
|
|
8797
|
-
if (this
|
|
8798
|
-
this
|
|
8797
|
+
if (this.oldCache.has(key)) {
|
|
8798
|
+
const item = this.oldCache.get(key);
|
|
8799
|
+
if (this._deleteIfExpired(key, item) === false) {
|
|
8800
|
+
this._moveToRecent(key, item);
|
|
8799
8801
|
return item.value;
|
|
8800
8802
|
}
|
|
8801
8803
|
}
|
|
8802
8804
|
}
|
|
8803
8805
|
|
|
8804
|
-
set(key, value, {maxAge = this
|
|
8805
|
-
const expiry =
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
if (this
|
|
8810
|
-
this
|
|
8806
|
+
set(key, value, {maxAge = this.maxAge} = {}) {
|
|
8807
|
+
const expiry =
|
|
8808
|
+
typeof maxAge === 'number' && maxAge !== Number.POSITIVE_INFINITY ?
|
|
8809
|
+
Date.now() + maxAge :
|
|
8810
|
+
undefined;
|
|
8811
|
+
if (this.cache.has(key)) {
|
|
8812
|
+
this.cache.set(key, {
|
|
8811
8813
|
value,
|
|
8812
|
-
expiry
|
|
8814
|
+
expiry
|
|
8813
8815
|
});
|
|
8814
8816
|
} else {
|
|
8815
|
-
this
|
|
8817
|
+
this._set(key, {value, expiry});
|
|
8816
8818
|
}
|
|
8817
8819
|
|
|
8818
8820
|
return this;
|
|
8819
8821
|
}
|
|
8820
8822
|
|
|
8821
8823
|
has(key) {
|
|
8822
|
-
if (this
|
|
8823
|
-
return !this
|
|
8824
|
+
if (this.cache.has(key)) {
|
|
8825
|
+
return !this._deleteIfExpired(key, this.cache.get(key));
|
|
8824
8826
|
}
|
|
8825
8827
|
|
|
8826
|
-
if (this
|
|
8827
|
-
return !this
|
|
8828
|
+
if (this.oldCache.has(key)) {
|
|
8829
|
+
return !this._deleteIfExpired(key, this.oldCache.get(key));
|
|
8828
8830
|
}
|
|
8829
8831
|
|
|
8830
8832
|
return false;
|
|
8831
8833
|
}
|
|
8832
8834
|
|
|
8833
8835
|
peek(key) {
|
|
8834
|
-
if (this
|
|
8835
|
-
return this
|
|
8836
|
+
if (this.cache.has(key)) {
|
|
8837
|
+
return this._peek(key, this.cache);
|
|
8836
8838
|
}
|
|
8837
8839
|
|
|
8838
|
-
if (this
|
|
8839
|
-
return this
|
|
8840
|
+
if (this.oldCache.has(key)) {
|
|
8841
|
+
return this._peek(key, this.oldCache);
|
|
8840
8842
|
}
|
|
8841
8843
|
}
|
|
8842
8844
|
|
|
8843
8845
|
delete(key) {
|
|
8844
|
-
const deleted = this
|
|
8846
|
+
const deleted = this.cache.delete(key);
|
|
8845
8847
|
if (deleted) {
|
|
8846
|
-
this
|
|
8848
|
+
this._size--;
|
|
8847
8849
|
}
|
|
8848
8850
|
|
|
8849
|
-
return this
|
|
8851
|
+
return this.oldCache.delete(key) || deleted;
|
|
8850
8852
|
}
|
|
8851
8853
|
|
|
8852
8854
|
clear() {
|
|
8853
|
-
this
|
|
8854
|
-
this
|
|
8855
|
-
this
|
|
8855
|
+
this.cache.clear();
|
|
8856
|
+
this.oldCache.clear();
|
|
8857
|
+
this._size = 0;
|
|
8856
8858
|
}
|
|
8857
8859
|
|
|
8858
8860
|
resize(newSize) {
|
|
@@ -8860,23 +8862,23 @@ class QuickLRU extends Map {
|
|
|
8860
8862
|
throw new TypeError('`maxSize` must be a number greater than 0');
|
|
8861
8863
|
}
|
|
8862
8864
|
|
|
8863
|
-
const items = [...this
|
|
8865
|
+
const items = [...this._entriesAscending()];
|
|
8864
8866
|
const removeCount = items.length - newSize;
|
|
8865
8867
|
if (removeCount < 0) {
|
|
8866
|
-
this
|
|
8867
|
-
this
|
|
8868
|
-
this
|
|
8868
|
+
this.cache = new Map(items);
|
|
8869
|
+
this.oldCache = new Map();
|
|
8870
|
+
this._size = items.length;
|
|
8869
8871
|
} else {
|
|
8870
8872
|
if (removeCount > 0) {
|
|
8871
|
-
this
|
|
8873
|
+
this._emitEvictions(items.slice(0, removeCount));
|
|
8872
8874
|
}
|
|
8873
8875
|
|
|
8874
|
-
this
|
|
8875
|
-
this
|
|
8876
|
-
this
|
|
8876
|
+
this.oldCache = new Map(items.slice(removeCount));
|
|
8877
|
+
this.cache = new Map();
|
|
8878
|
+
this._size = 0;
|
|
8877
8879
|
}
|
|
8878
8880
|
|
|
8879
|
-
this
|
|
8881
|
+
this.maxSize = newSize;
|
|
8880
8882
|
}
|
|
8881
8883
|
|
|
8882
8884
|
* keys() {
|
|
@@ -8892,18 +8894,18 @@ class QuickLRU extends Map {
|
|
|
8892
8894
|
}
|
|
8893
8895
|
|
|
8894
8896
|
* [Symbol.iterator]() {
|
|
8895
|
-
for (const item of this
|
|
8897
|
+
for (const item of this.cache) {
|
|
8896
8898
|
const [key, value] = item;
|
|
8897
|
-
const deleted = this
|
|
8899
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
8898
8900
|
if (deleted === false) {
|
|
8899
8901
|
yield [key, value.value];
|
|
8900
8902
|
}
|
|
8901
8903
|
}
|
|
8902
8904
|
|
|
8903
|
-
for (const item of this
|
|
8905
|
+
for (const item of this.oldCache) {
|
|
8904
8906
|
const [key, value] = item;
|
|
8905
|
-
if (!this
|
|
8906
|
-
const deleted = this
|
|
8907
|
+
if (!this.cache.has(key)) {
|
|
8908
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
8907
8909
|
if (deleted === false) {
|
|
8908
8910
|
yield [key, value.value];
|
|
8909
8911
|
}
|
|
@@ -8912,22 +8914,22 @@ class QuickLRU extends Map {
|
|
|
8912
8914
|
}
|
|
8913
8915
|
|
|
8914
8916
|
* entriesDescending() {
|
|
8915
|
-
let items = [...this
|
|
8917
|
+
let items = [...this.cache];
|
|
8916
8918
|
for (let i = items.length - 1; i >= 0; --i) {
|
|
8917
8919
|
const item = items[i];
|
|
8918
8920
|
const [key, value] = item;
|
|
8919
|
-
const deleted = this
|
|
8921
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
8920
8922
|
if (deleted === false) {
|
|
8921
8923
|
yield [key, value.value];
|
|
8922
8924
|
}
|
|
8923
8925
|
}
|
|
8924
8926
|
|
|
8925
|
-
items = [...this
|
|
8927
|
+
items = [...this.oldCache];
|
|
8926
8928
|
for (let i = items.length - 1; i >= 0; --i) {
|
|
8927
8929
|
const item = items[i];
|
|
8928
8930
|
const [key, value] = item;
|
|
8929
|
-
if (!this
|
|
8930
|
-
const deleted = this
|
|
8931
|
+
if (!this.cache.has(key)) {
|
|
8932
|
+
const deleted = this._deleteIfExpired(key, value);
|
|
8931
8933
|
if (deleted === false) {
|
|
8932
8934
|
yield [key, value.value];
|
|
8933
8935
|
}
|
|
@@ -8936,28 +8938,24 @@ class QuickLRU extends Map {
|
|
|
8936
8938
|
}
|
|
8937
8939
|
|
|
8938
8940
|
* entriesAscending() {
|
|
8939
|
-
for (const [key, value] of this
|
|
8941
|
+
for (const [key, value] of this._entriesAscending()) {
|
|
8940
8942
|
yield [key, value.value];
|
|
8941
8943
|
}
|
|
8942
8944
|
}
|
|
8943
8945
|
|
|
8944
8946
|
get size() {
|
|
8945
|
-
if (!this
|
|
8946
|
-
return this
|
|
8947
|
+
if (!this._size) {
|
|
8948
|
+
return this.oldCache.size;
|
|
8947
8949
|
}
|
|
8948
8950
|
|
|
8949
8951
|
let oldCacheSize = 0;
|
|
8950
|
-
for (const key of this
|
|
8951
|
-
if (!this
|
|
8952
|
+
for (const key of this.oldCache.keys()) {
|
|
8953
|
+
if (!this.cache.has(key)) {
|
|
8952
8954
|
oldCacheSize++;
|
|
8953
8955
|
}
|
|
8954
8956
|
}
|
|
8955
8957
|
|
|
8956
|
-
return Math.min(this
|
|
8957
|
-
}
|
|
8958
|
-
|
|
8959
|
-
get maxSize() {
|
|
8960
|
-
return this.#maxSize;
|
|
8958
|
+
return Math.min(this._size + oldCacheSize, this.maxSize);
|
|
8961
8959
|
}
|
|
8962
8960
|
|
|
8963
8961
|
entries() {
|
|
@@ -9009,6 +9007,19 @@ class QuickLRU extends Map {
|
|
|
9009
9007
|
const INCOMPLETE = 0;
|
|
9010
9008
|
const REGULAR = 1;
|
|
9011
9009
|
const COMPLETE = 2;
|
|
9010
|
+
function yearType(hyear) {
|
|
9011
|
+
const longC = HDate.longCheshvan(hyear);
|
|
9012
|
+
const shortK = HDate.shortKislev(hyear);
|
|
9013
|
+
if (longC && !shortK) {
|
|
9014
|
+
return COMPLETE;
|
|
9015
|
+
}
|
|
9016
|
+
else if (!longC && shortK) {
|
|
9017
|
+
return INCOMPLETE;
|
|
9018
|
+
}
|
|
9019
|
+
else {
|
|
9020
|
+
return REGULAR;
|
|
9021
|
+
}
|
|
9022
|
+
}
|
|
9012
9023
|
/**
|
|
9013
9024
|
* Represents Parashah HaShavua for an entire Hebrew year
|
|
9014
9025
|
*/
|
|
@@ -9020,11 +9031,6 @@ class Sedra {
|
|
|
9020
9031
|
*/
|
|
9021
9032
|
constructor(hyear, il) {
|
|
9022
9033
|
hyear = +hyear;
|
|
9023
|
-
const longC = HDate.longCheshvan(hyear);
|
|
9024
|
-
const shortK = HDate.shortKislev(hyear);
|
|
9025
|
-
const type = (longC && !shortK) ? COMPLETE :
|
|
9026
|
-
(!longC && shortK) ? INCOMPLETE :
|
|
9027
|
-
REGULAR;
|
|
9028
9034
|
this.year = hyear;
|
|
9029
9035
|
const rh0 = new HDate(1, months.TISHREI, hyear);
|
|
9030
9036
|
const rh = rh0.abs();
|
|
@@ -9033,6 +9039,7 @@ class Sedra {
|
|
|
9033
9039
|
this.firstSaturday = HDate.dayOnOrBefore(6, rh + 6);
|
|
9034
9040
|
const leap = +HDate.isLeapYear(hyear);
|
|
9035
9041
|
this.il = Boolean(il);
|
|
9042
|
+
const type = yearType(hyear);
|
|
9036
9043
|
let key = `${leap}${rhDay}${type}`;
|
|
9037
9044
|
if (types[key]) {
|
|
9038
9045
|
this.theSedraArray = types[key];
|
|
@@ -9285,7 +9292,6 @@ const YK = 'Yom Kippur'; // 1
|
|
|
9285
9292
|
const SUKKOT = 'Sukkot'; // 0
|
|
9286
9293
|
const CHMSUKOT = 'Sukkot Shabbat Chol ha-Moed'; // 0
|
|
9287
9294
|
const SHMINI = 'Shmini Atzeret'; // 0
|
|
9288
|
-
const EOY = CHMSUKOT; // always Sukkot day 3, 5 or 6
|
|
9289
9295
|
const PESACH = 'Pesach'; // 25
|
|
9290
9296
|
const PESACH1 = 'Pesach I';
|
|
9291
9297
|
const CHMPESACH = 'Pesach Shabbat Chol ha-Moed'; // 25
|
|
@@ -9302,75 +9308,81 @@ const SHAVUOT$1 = 'Shavuot'; // 33
|
|
|
9302
9308
|
function range$1(start, stop) {
|
|
9303
9309
|
return Array.from({ length: stop - start + 1 }, (v, k) => k + start);
|
|
9304
9310
|
}
|
|
9305
|
-
const
|
|
9311
|
+
const yearStartVayeilech = [51, 52, CHMSUKOT];
|
|
9312
|
+
const yearStartHaazinu = [52, YK, CHMSUKOT];
|
|
9313
|
+
const yearStartRH = [RH, 52, SUKKOT, SHMINI];
|
|
9314
|
+
const r020 = range$1(0, 20);
|
|
9315
|
+
const r027 = range$1(0, 27);
|
|
9316
|
+
const r3340 = range$1(33, 40);
|
|
9317
|
+
const r4349 = range$1(43, 49);
|
|
9318
|
+
const r4350 = range$1(43, 50);
|
|
9306
9319
|
/**
|
|
9307
9320
|
* The ordinary year types (keviot)
|
|
9308
9321
|
* names are leap/nonleap - day - incomplete/regular/complete - diaspora/Israel
|
|
9309
9322
|
* @private
|
|
9310
9323
|
* @readonly
|
|
9311
|
-
* @type {Object.<string, NumberOrString[]>}
|
|
9312
9324
|
*/
|
|
9313
9325
|
const types = {
|
|
9314
9326
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
9315
9327
|
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
9316
9328
|
// e.g. 5753
|
|
9317
|
-
'020':
|
|
9329
|
+
'020': yearStartVayeilech.concat(r020, D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), r3340, D(41), r4349, D(50)),
|
|
9318
9330
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
9319
9331
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
9320
9332
|
// e.g. 5756
|
|
9321
|
-
'0220':
|
|
9333
|
+
'0220': yearStartVayeilech.concat(r020, D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), 33, SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
9322
9334
|
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
9323
9335
|
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
9324
9336
|
// e.g. 5701
|
|
9325
|
-
'0510':
|
|
9337
|
+
'0510': yearStartHaazinu.concat(r020, D(21), 23, 24, PESACH1, PESACH8, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
9326
9338
|
/* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
|
|
9327
9339
|
* days and Kislev has 30 days), and has Passover start on Saturday. */
|
|
9328
9340
|
// e.g. 5745
|
|
9329
|
-
'0511':
|
|
9341
|
+
'0511': yearStartHaazinu.concat(r020, D(21), 23, 24, PESACH, 25, D(26), D(28), range$1(30, 40), D(41), r4350),
|
|
9330
9342
|
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
9331
9343
|
* Kislev each have 30 days), and has Passover start on Sunday. */
|
|
9332
9344
|
// e.g. 5754
|
|
9333
|
-
'052':
|
|
9345
|
+
'052': yearStartHaazinu.concat(range$1(0, 24), PESACH7, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
9334
9346
|
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev
|
|
9335
9347
|
* each have 29 days), and has Passover start on Sunday. */
|
|
9336
9348
|
// e.g. 5761
|
|
9337
|
-
'070':
|
|
9349
|
+
'070': yearStartRH.concat(r020, D(21), 23, 24, PESACH7, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
|
|
9338
9350
|
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
9339
9351
|
* Kislev each have 30 days), and has Passover start on Tuesday. */
|
|
9340
9352
|
// e.g. 5716
|
|
9341
|
-
'072':
|
|
9353
|
+
'072': yearStartRH.concat(r020, D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), r3340, D(41), r4349, D(50)),
|
|
9342
9354
|
/* -- The leap year types (keviot) -- */
|
|
9343
9355
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
9344
9356
|
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
9345
9357
|
// e.g. 5746
|
|
9346
|
-
'1200':
|
|
9358
|
+
'1200': yearStartVayeilech.concat(r027, CHMPESACH, range$1(28, 33), SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
9347
9359
|
/* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
|
|
9348
9360
|
* Kislev each have 29 days), and has Passover start on Thursday. */
|
|
9349
9361
|
// e.g. 5746
|
|
9350
|
-
'1201':
|
|
9362
|
+
'1201': yearStartVayeilech.concat(r027, CHMPESACH, range$1(28, 40), D(41), r4349, D(50)),
|
|
9351
9363
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
9352
9364
|
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
9353
9365
|
// e.g.5752
|
|
9354
|
-
'1220':
|
|
9366
|
+
'1220': yearStartVayeilech.concat(r027, PESACH1, PESACH8, range$1(28, 40), D(41), r4350),
|
|
9355
9367
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
9356
9368
|
* Kislev each have 30 days), and has Passover start on Saturday. */
|
|
9357
9369
|
// e.g.5752
|
|
9358
|
-
'1221':
|
|
9370
|
+
'1221': yearStartVayeilech.concat(r027, PESACH, range$1(28, 50)),
|
|
9359
9371
|
/* Hebrew year that starts on Thursday, is `incomplete' (Heshvan and
|
|
9360
9372
|
* Kislev both have 29 days), and has Passover start on Sunday. */
|
|
9361
9373
|
// e.g. 5768
|
|
9362
|
-
'150':
|
|
9374
|
+
'150': yearStartHaazinu.concat(range$1(0, 28), PESACH7, range$1(29, 50)),
|
|
9363
9375
|
/* Hebrew year that starts on Thursday, is `complete' (Heshvan and
|
|
9364
9376
|
* Kislev both have 30 days), and has Passover start on Tuesday. */
|
|
9365
9377
|
// eg. 5771
|
|
9366
|
-
'152':
|
|
9378
|
+
'152': yearStartHaazinu.concat(range$1(0, 28), CHMPESACH, range$1(29, 49), D(50)),
|
|
9367
9379
|
/* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and
|
|
9368
9380
|
* Kislev each have 29 days), and has Passover start on Tuesday. */
|
|
9369
9381
|
// e.g.5757
|
|
9370
|
-
'170':
|
|
9382
|
+
'170': yearStartRH.concat(r027, CHMPESACH, range$1(28, 40), D(41), r4349, D(50)),
|
|
9371
9383
|
/* Hebrew year that starts on Saturday, is `complete' (Heshvan and
|
|
9372
9384
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
9373
|
-
'1720':
|
|
9385
|
+
'1720': yearStartRH.concat(r027, CHMPESACH, range$1(28, 33), SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
|
|
9374
9386
|
};
|
|
9375
9387
|
/* Hebrew year that starts on Monday, is `complete' (Heshvan and
|
|
9376
9388
|
* Kislev each have 30 days), and has Passover start on Thursday. */
|
|
@@ -9394,6 +9406,8 @@ types['1311'] = types['1221'];
|
|
|
9394
9406
|
types['1721'] = types['170'];
|
|
9395
9407
|
const sedraCache = new QuickLRU({ maxSize: 400 });
|
|
9396
9408
|
/**
|
|
9409
|
+
* Convenience function to create an instance of `Sedra` or reuse a previously
|
|
9410
|
+
* created and cached instance.
|
|
9397
9411
|
* @private
|
|
9398
9412
|
* @param {number} hyear
|
|
9399
9413
|
* @param {boolean} il
|
|
@@ -10058,7 +10072,7 @@ class DailyLearning {
|
|
|
10058
10072
|
}
|
|
10059
10073
|
|
|
10060
10074
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
10061
|
-
const version = '5.4.
|
|
10075
|
+
const version = '5.4.6';
|
|
10062
10076
|
|
|
10063
10077
|
/* eslint-disable max-len */
|
|
10064
10078
|
/**
|
|
@@ -10625,15 +10639,16 @@ function tachanunYear(year, il) {
|
|
|
10625
10639
|
if (shushPurim.getDay() === 6) {
|
|
10626
10640
|
shushPurim = shushPurim.next();
|
|
10627
10641
|
}
|
|
10628
|
-
const
|
|
10629
|
-
|
|
10642
|
+
const none = [
|
|
10643
|
+
new HDate(2, months.TISHREI, year), // Rosh Hashana II
|
|
10644
|
+
].concat(
|
|
10630
10645
|
// Rosh Chodesh - 1st of every month. Also includes RH day 1 (1 Tishrei)
|
|
10631
10646
|
range(1, monthsInYear)
|
|
10632
10647
|
.map((month) => new HDate(1, month, year)),
|
|
10633
10648
|
// Rosh Chodesh - 30th of months that have one
|
|
10634
10649
|
range(1, monthsInYear)
|
|
10635
10650
|
.filter((month) => HDate.daysInMonth(month, year) === 30)
|
|
10636
|
-
.map((month) => new HDate(30, month, year)),
|
|
10651
|
+
.map((month) => new HDate(30, month, year)),
|
|
10637
10652
|
// entire month of Nisan
|
|
10638
10653
|
range(1, HDate.daysInMonth(months.NISAN, year))
|
|
10639
10654
|
.map((mday) => new HDate(mday, months.NISAN, year)), new HDate(18, months.IYYAR, year), // Lag BaOmer
|
|
@@ -10650,13 +10665,15 @@ function tachanunYear(year, il) {
|
|
|
10650
10665
|
.map((mday) => new HDate(mday, months.KISLEV, year)), new HDate(15, months.SHVAT, year), // Tu BiShvat
|
|
10651
10666
|
new HDate(14, months.ADAR_II, year), // Purim
|
|
10652
10667
|
shushPurim, leap ? new HDate(14, months.ADAR_I, year) : []);
|
|
10653
|
-
const some =
|
|
10668
|
+
const some = [
|
|
10669
|
+
new HDate(14, months.IYYAR, year), // Pesach Sheini
|
|
10670
|
+
].concat(
|
|
10654
10671
|
// Until 14 Sivan
|
|
10655
10672
|
range(1, 13)
|
|
10656
10673
|
.map((mday) => new HDate(mday, months.SIVAN, year)),
|
|
10657
10674
|
// Until after Rosh Chodesh Cheshvan
|
|
10658
10675
|
range(20, 31)
|
|
10659
|
-
.map((mday) => new HDate(mday, months.TISHREI, year)),
|
|
10676
|
+
.map((mday) => new HDate(mday, months.TISHREI, year)),
|
|
10660
10677
|
// Yom HaAtzma'ut, which changes based on day of week
|
|
10661
10678
|
year >= 5708 ? dateYomHaZikaron(year).next() : [],
|
|
10662
10679
|
// Yom Yerushalayim
|
package/dist/pkgVersion.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
2
|
-
export declare const version = "5.4.
|
|
2
|
+
export declare const version = "5.4.6";
|
package/dist/sedra.d.ts
CHANGED
|
@@ -91,6 +91,8 @@ export declare class Sedra {
|
|
|
91
91
|
export declare const parshiot: string[];
|
|
92
92
|
type NumberOrString = number | string;
|
|
93
93
|
/**
|
|
94
|
+
* Convenience function to create an instance of `Sedra` or reuse a previously
|
|
95
|
+
* created and cached instance.
|
|
94
96
|
* @private
|
|
95
97
|
* @param {number} hyear
|
|
96
98
|
* @param {boolean} il
|