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