@hebcal/core 5.3.10 → 5.3.12
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 +46 -16
- package/dist/bundle.js +91 -46
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +91 -46
- package/dist/index.mjs +91 -46
- package/hebcal.d.ts +77 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.3.
|
|
1
|
+
/*! @hebcal/core v5.3.12 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
|
|
@@ -7734,14 +7734,6 @@ function pad4(number) {
|
|
|
7734
7734
|
return String(number);
|
|
7735
7735
|
}
|
|
7736
7736
|
|
|
7737
|
-
Object.defineProperties(globalThis, p({
|
|
7738
|
-
Temporal: mr
|
|
7739
|
-
})), Object.defineProperties(Intl, p({
|
|
7740
|
-
DateTimeFormat: Sr
|
|
7741
|
-
})), Object.defineProperties(Date.prototype, p({
|
|
7742
|
-
toTemporalInstant: toTemporalInstant
|
|
7743
|
-
}));
|
|
7744
|
-
|
|
7745
7737
|
/**
|
|
7746
7738
|
* @private
|
|
7747
7739
|
* @param {number} number
|
|
@@ -7754,6 +7746,24 @@ function pad2(number) {
|
|
|
7754
7746
|
return String(number);
|
|
7755
7747
|
}
|
|
7756
7748
|
|
|
7749
|
+
/**
|
|
7750
|
+
* Returns YYYY-MM-DD in the local timezone
|
|
7751
|
+
* @private
|
|
7752
|
+
* @param {Date} dt
|
|
7753
|
+
* @return {string}
|
|
7754
|
+
*/
|
|
7755
|
+
function isoDateString(dt) {
|
|
7756
|
+
return pad4(dt.getFullYear()) + '-' + pad2(dt.getMonth() + 1) + '-' + pad2(dt.getDate());
|
|
7757
|
+
}
|
|
7758
|
+
|
|
7759
|
+
Object.defineProperties(globalThis, p({
|
|
7760
|
+
Temporal: mr
|
|
7761
|
+
})), Object.defineProperties(Intl, p({
|
|
7762
|
+
DateTimeFormat: Sr
|
|
7763
|
+
})), Object.defineProperties(Date.prototype, p({
|
|
7764
|
+
toTemporalInstant: toTemporalInstant
|
|
7765
|
+
}));
|
|
7766
|
+
|
|
7757
7767
|
/**
|
|
7758
7768
|
* @private
|
|
7759
7769
|
* @param {Temporal.ZonedDateTime} zdt
|
|
@@ -7836,6 +7846,7 @@ class Zmanim {
|
|
|
7836
7846
|
/**
|
|
7837
7847
|
* Convenience function to get the time when sun is above or below the horizon
|
|
7838
7848
|
* for a certain angle (in degrees).
|
|
7849
|
+
* This function does not support elevation adjustment.
|
|
7839
7850
|
* @param {number} angle
|
|
7840
7851
|
* @param {boolean} rising
|
|
7841
7852
|
* @return {Date}
|
|
@@ -7847,6 +7858,7 @@ class Zmanim {
|
|
|
7847
7858
|
}
|
|
7848
7859
|
/**
|
|
7849
7860
|
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
|
|
7861
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7850
7862
|
* @return {Date}
|
|
7851
7863
|
*/
|
|
7852
7864
|
sunrise() {
|
|
@@ -7854,7 +7866,8 @@ class Zmanim {
|
|
|
7854
7866
|
return zdtToDate(zdt);
|
|
7855
7867
|
}
|
|
7856
7868
|
/**
|
|
7857
|
-
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
|
|
7869
|
+
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon).
|
|
7870
|
+
* This function does not support elevation adjustment.
|
|
7858
7871
|
* @return {Date}
|
|
7859
7872
|
*/
|
|
7860
7873
|
seaLevelSunrise() {
|
|
@@ -7862,7 +7875,8 @@ class Zmanim {
|
|
|
7862
7875
|
return zdtToDate(zdt);
|
|
7863
7876
|
}
|
|
7864
7877
|
/**
|
|
7865
|
-
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon)
|
|
7878
|
+
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
7879
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7866
7880
|
* @return {Date}
|
|
7867
7881
|
*/
|
|
7868
7882
|
sunset() {
|
|
@@ -7870,7 +7884,8 @@ class Zmanim {
|
|
|
7870
7884
|
return zdtToDate(zdt);
|
|
7871
7885
|
}
|
|
7872
7886
|
/**
|
|
7873
|
-
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon)
|
|
7887
|
+
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
7888
|
+
* This function does not support elevation adjustment.
|
|
7874
7889
|
* @return {Date}
|
|
7875
7890
|
*/
|
|
7876
7891
|
seaLevelSunset() {
|
|
@@ -7878,7 +7893,9 @@ class Zmanim {
|
|
|
7878
7893
|
return zdtToDate(zdt);
|
|
7879
7894
|
}
|
|
7880
7895
|
/**
|
|
7881
|
-
* Civil dawn; Sun is 6° below the horizon in the morning
|
|
7896
|
+
* Civil dawn; Sun is 6° below the horizon in the morning.
|
|
7897
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7898
|
+
* the result is not impacted by elevation.
|
|
7882
7899
|
* @return {Date}
|
|
7883
7900
|
*/
|
|
7884
7901
|
dawn() {
|
|
@@ -7886,14 +7903,20 @@ class Zmanim {
|
|
|
7886
7903
|
return zdtToDate(zdt);
|
|
7887
7904
|
}
|
|
7888
7905
|
/**
|
|
7889
|
-
* Civil dusk; Sun is 6° below the horizon in the evening
|
|
7906
|
+
* Civil dusk; Sun is 6° below the horizon in the evening.
|
|
7907
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7908
|
+
* the result is not impacted by elevation.
|
|
7890
7909
|
* @return {Date}
|
|
7891
7910
|
*/
|
|
7892
7911
|
dusk() {
|
|
7893
7912
|
const zdt = this.noaa.getEndCivilTwilight();
|
|
7894
7913
|
return zdtToDate(zdt);
|
|
7895
7914
|
}
|
|
7896
|
-
/**
|
|
7915
|
+
/**
|
|
7916
|
+
* Returns sunset for the previous day.
|
|
7917
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7918
|
+
* @return {Date}
|
|
7919
|
+
*/
|
|
7897
7920
|
gregEve() {
|
|
7898
7921
|
const prev = new Date(this.date);
|
|
7899
7922
|
prev.setDate(prev.getDate() - 1);
|
|
@@ -7912,32 +7935,41 @@ class Zmanim {
|
|
|
7912
7935
|
* @return {Date}
|
|
7913
7936
|
*/
|
|
7914
7937
|
chatzot() {
|
|
7915
|
-
const
|
|
7938
|
+
const startOfDay = this.noaa.getSeaLevelSunrise();
|
|
7939
|
+
const endOfDay = this.noaa.getSeaLevelSunset();
|
|
7940
|
+
const zdt = this.noaa.getSunTransit(startOfDay, endOfDay);
|
|
7916
7941
|
return zdtToDate(zdt);
|
|
7917
7942
|
}
|
|
7918
7943
|
/**
|
|
7919
|
-
* Midnight – Chatzot; Sunset plus 6 halachic hours
|
|
7944
|
+
* Midnight – Chatzot; Sunset plus 6 halachic hours.
|
|
7945
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7920
7946
|
* @return {Date}
|
|
7921
7947
|
*/
|
|
7922
7948
|
chatzotNight() {
|
|
7923
7949
|
return new Date(this.sunrise().getTime() - this.nightHour() * 6);
|
|
7924
7950
|
}
|
|
7925
7951
|
/**
|
|
7926
|
-
* Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning
|
|
7952
|
+
* Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning.
|
|
7953
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7954
|
+
* the result is not impacted by elevation.
|
|
7927
7955
|
* @return {Date}
|
|
7928
7956
|
*/
|
|
7929
7957
|
alotHaShachar() {
|
|
7930
7958
|
return this.timeAtAngle(16.1, true);
|
|
7931
7959
|
}
|
|
7932
7960
|
/**
|
|
7933
|
-
* Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning
|
|
7961
|
+
* Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning.
|
|
7962
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7963
|
+
* the result is not impacted by elevation.
|
|
7934
7964
|
* @return {Date}
|
|
7935
7965
|
*/
|
|
7936
7966
|
misheyakir() {
|
|
7937
7967
|
return this.timeAtAngle(11.5, true);
|
|
7938
7968
|
}
|
|
7939
7969
|
/**
|
|
7940
|
-
* Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning
|
|
7970
|
+
* Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning.
|
|
7971
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7972
|
+
* the result is not impacted by elevation.
|
|
7941
7973
|
* @return {Date}
|
|
7942
7974
|
*/
|
|
7943
7975
|
misheyakirMachmir() {
|
|
@@ -7958,7 +7990,8 @@ class Zmanim {
|
|
|
7958
7990
|
return zdtToDate(zdt);
|
|
7959
7991
|
}
|
|
7960
7992
|
/**
|
|
7961
|
-
* Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra
|
|
7993
|
+
* Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra.
|
|
7994
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7962
7995
|
* @return {Date}
|
|
7963
7996
|
*/
|
|
7964
7997
|
sofZmanShma() {
|
|
@@ -7966,7 +7999,8 @@ class Zmanim {
|
|
|
7966
7999
|
return this.getShaahZmanisBasedZman(3);
|
|
7967
8000
|
}
|
|
7968
8001
|
/**
|
|
7969
|
-
* Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra
|
|
8002
|
+
* Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra.
|
|
8003
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7970
8004
|
* @return {Date}
|
|
7971
8005
|
*/
|
|
7972
8006
|
sofZmanTfilla() {
|
|
@@ -8066,21 +8100,24 @@ class Zmanim {
|
|
|
8066
8100
|
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8067
8101
|
}
|
|
8068
8102
|
/**
|
|
8069
|
-
* Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours
|
|
8103
|
+
* Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours.
|
|
8104
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
8070
8105
|
* @return {Date}
|
|
8071
8106
|
*/
|
|
8072
8107
|
minchaGedola() {
|
|
8073
8108
|
return this.getShaahZmanisBasedZman(6.5);
|
|
8074
8109
|
}
|
|
8075
8110
|
/**
|
|
8076
|
-
* Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours
|
|
8111
|
+
* Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours.
|
|
8112
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
8077
8113
|
* @return {Date}
|
|
8078
8114
|
*/
|
|
8079
8115
|
minchaKetana() {
|
|
8080
8116
|
return this.getShaahZmanisBasedZman(9.5);
|
|
8081
8117
|
}
|
|
8082
8118
|
/**
|
|
8083
|
-
* Plag haMincha; Sunrise plus 10.75 halachic hours
|
|
8119
|
+
* Plag haMincha; Sunrise plus 10.75 halachic hours.
|
|
8120
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
8084
8121
|
* @return {Date}
|
|
8085
8122
|
*/
|
|
8086
8123
|
plagHaMincha() {
|
|
@@ -8089,6 +8126,8 @@ class Zmanim {
|
|
|
8089
8126
|
/**
|
|
8090
8127
|
* @param {number} [angle=8.5] optional time for solar depression.
|
|
8091
8128
|
* Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars.
|
|
8129
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
8130
|
+
* the result is not impacted by elevation.
|
|
8092
8131
|
* @return {Date}
|
|
8093
8132
|
*/
|
|
8094
8133
|
tzeit(angle = 8.5) {
|
|
@@ -8112,7 +8151,9 @@ class Zmanim {
|
|
|
8112
8151
|
* Rabbeinu Tam holds that bein hashmashos is a specific time
|
|
8113
8152
|
* between sunset and tzeis hakochavim.
|
|
8114
8153
|
* One opinion on how to calculate this time is that
|
|
8115
|
-
* it is 13.5 minutes before tzies 7.083
|
|
8154
|
+
* it is 13.5 minutes before tzies 7.083.
|
|
8155
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
8156
|
+
* the result is not impacted by elevation.
|
|
8116
8157
|
* @return {Date}
|
|
8117
8158
|
*/
|
|
8118
8159
|
beinHaShmashos() {
|
|
@@ -8188,6 +8229,8 @@ class Zmanim {
|
|
|
8188
8229
|
|
|
8189
8230
|
/**
|
|
8190
8231
|
* Returns sunrise + `offset` minutes (either positive or negative).
|
|
8232
|
+
* If elevation is enabled, this function will include elevation in the calculation
|
|
8233
|
+
* unless `forceSeaLevel` is `true`.
|
|
8191
8234
|
* @param {number} offset minutes
|
|
8192
8235
|
* @param {boolean} roundMinute round time to nearest minute (default true)
|
|
8193
8236
|
* @param {boolean} forceSeaLevel use sea-level sunrise (default false)
|
|
@@ -8210,6 +8253,8 @@ class Zmanim {
|
|
|
8210
8253
|
|
|
8211
8254
|
/**
|
|
8212
8255
|
* Returns sunset + `offset` minutes (either positive or negative).
|
|
8256
|
+
* If elevation is enabled, this function will include elevation in the calculation
|
|
8257
|
+
* unless `forceSeaLevel` is `true`.
|
|
8213
8258
|
* @param {number} offset minutes
|
|
8214
8259
|
* @param {boolean} roundMinute round time to nearest minute (default true)
|
|
8215
8260
|
* @param {boolean} forceSeaLevel use sea-level sunset (default false)
|
|
@@ -9493,8 +9538,7 @@ class ParshaEvent extends Event {
|
|
|
9493
9538
|
|
|
9494
9539
|
/** @return {string} */
|
|
9495
9540
|
urlDateSuffix() {
|
|
9496
|
-
const
|
|
9497
|
-
const isoDate = isoDateTime.substring(0, isoDateTime.indexOf('T'));
|
|
9541
|
+
const isoDate = isoDateString(this.getDate().greg());
|
|
9498
9542
|
return isoDate.replace(/-/g, '');
|
|
9499
9543
|
}
|
|
9500
9544
|
}
|
|
@@ -10249,22 +10293,24 @@ class HolidayEvent extends Event {
|
|
|
10249
10293
|
if (cats[0] !== 'unknown') {
|
|
10250
10294
|
return cats;
|
|
10251
10295
|
}
|
|
10296
|
+
// Don't depend on flags.MINOR_HOLIDAY always being set. Look for minor holidays.
|
|
10252
10297
|
const desc = this.getDesc();
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
}
|
|
10298
|
+
const {
|
|
10299
|
+
LAG_BAOMER,
|
|
10300
|
+
LEIL_SELICHOT,
|
|
10301
|
+
PESACH_SHENI,
|
|
10302
|
+
EREV_PURIM,
|
|
10303
|
+
PURIM_KATAN,
|
|
10304
|
+
SHUSHAN_PURIM,
|
|
10305
|
+
TU_BAV,
|
|
10306
|
+
TU_BISHVAT,
|
|
10307
|
+
ROSH_HASHANA_LABEHEMOT
|
|
10308
|
+
} = holidayDesc;
|
|
10309
|
+
const minorHolidays = [LAG_BAOMER, LEIL_SELICHOT, PESACH_SHENI, EREV_PURIM, PURIM_KATAN, SHUSHAN_PURIM, TU_BAV, TU_BISHVAT, ROSH_HASHANA_LABEHEMOT];
|
|
10310
|
+
if (minorHolidays.includes(desc)) {
|
|
10311
|
+
return ['holiday', 'minor'];
|
|
10312
|
+
}
|
|
10313
|
+
return ['holiday', 'major'];
|
|
10268
10314
|
}
|
|
10269
10315
|
/**
|
|
10270
10316
|
* Returns (translated) description of this event
|
|
@@ -10327,8 +10373,7 @@ class RoshChodeshEvent extends HolidayEvent {
|
|
|
10327
10373
|
class AsaraBTevetEvent extends HolidayEvent {
|
|
10328
10374
|
/** @return {string} */
|
|
10329
10375
|
urlDateSuffix() {
|
|
10330
|
-
const
|
|
10331
|
-
const isoDate = isoDateTime.substring(0, isoDateTime.indexOf('T'));
|
|
10376
|
+
const isoDate = isoDateString(this.getDate().greg());
|
|
10332
10377
|
return isoDate.replace(/-/g, '');
|
|
10333
10378
|
}
|
|
10334
10379
|
}
|
|
@@ -10716,7 +10761,7 @@ class DailyLearning {
|
|
|
10716
10761
|
}
|
|
10717
10762
|
|
|
10718
10763
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10719
|
-
const version = '5.3.
|
|
10764
|
+
const version = '5.3.12';
|
|
10720
10765
|
|
|
10721
10766
|
const NONE$1 = 0;
|
|
10722
10767
|
const HALF = 1;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.3.
|
|
1
|
+
/*! @hebcal/core v5.3.12 */
|
|
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];
|
|
@@ -7732,14 +7732,6 @@ function pad4(number) {
|
|
|
7732
7732
|
return String(number);
|
|
7733
7733
|
}
|
|
7734
7734
|
|
|
7735
|
-
Object.defineProperties(globalThis, p({
|
|
7736
|
-
Temporal: mr
|
|
7737
|
-
})), Object.defineProperties(Intl, p({
|
|
7738
|
-
DateTimeFormat: Sr
|
|
7739
|
-
})), Object.defineProperties(Date.prototype, p({
|
|
7740
|
-
toTemporalInstant: toTemporalInstant
|
|
7741
|
-
}));
|
|
7742
|
-
|
|
7743
7735
|
/**
|
|
7744
7736
|
* @private
|
|
7745
7737
|
* @param {number} number
|
|
@@ -7752,6 +7744,24 @@ function pad2(number) {
|
|
|
7752
7744
|
return String(number);
|
|
7753
7745
|
}
|
|
7754
7746
|
|
|
7747
|
+
/**
|
|
7748
|
+
* Returns YYYY-MM-DD in the local timezone
|
|
7749
|
+
* @private
|
|
7750
|
+
* @param {Date} dt
|
|
7751
|
+
* @return {string}
|
|
7752
|
+
*/
|
|
7753
|
+
function isoDateString(dt) {
|
|
7754
|
+
return pad4(dt.getFullYear()) + '-' + pad2(dt.getMonth() + 1) + '-' + pad2(dt.getDate());
|
|
7755
|
+
}
|
|
7756
|
+
|
|
7757
|
+
Object.defineProperties(globalThis, p({
|
|
7758
|
+
Temporal: mr
|
|
7759
|
+
})), Object.defineProperties(Intl, p({
|
|
7760
|
+
DateTimeFormat: Sr
|
|
7761
|
+
})), Object.defineProperties(Date.prototype, p({
|
|
7762
|
+
toTemporalInstant: toTemporalInstant
|
|
7763
|
+
}));
|
|
7764
|
+
|
|
7755
7765
|
/**
|
|
7756
7766
|
* @private
|
|
7757
7767
|
* @param {Temporal.ZonedDateTime} zdt
|
|
@@ -7834,6 +7844,7 @@ class Zmanim {
|
|
|
7834
7844
|
/**
|
|
7835
7845
|
* Convenience function to get the time when sun is above or below the horizon
|
|
7836
7846
|
* for a certain angle (in degrees).
|
|
7847
|
+
* This function does not support elevation adjustment.
|
|
7837
7848
|
* @param {number} angle
|
|
7838
7849
|
* @param {boolean} rising
|
|
7839
7850
|
* @return {Date}
|
|
@@ -7845,6 +7856,7 @@ class Zmanim {
|
|
|
7845
7856
|
}
|
|
7846
7857
|
/**
|
|
7847
7858
|
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
|
|
7859
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7848
7860
|
* @return {Date}
|
|
7849
7861
|
*/
|
|
7850
7862
|
sunrise() {
|
|
@@ -7852,7 +7864,8 @@ class Zmanim {
|
|
|
7852
7864
|
return zdtToDate(zdt);
|
|
7853
7865
|
}
|
|
7854
7866
|
/**
|
|
7855
|
-
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
|
|
7867
|
+
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon).
|
|
7868
|
+
* This function does not support elevation adjustment.
|
|
7856
7869
|
* @return {Date}
|
|
7857
7870
|
*/
|
|
7858
7871
|
seaLevelSunrise() {
|
|
@@ -7860,7 +7873,8 @@ class Zmanim {
|
|
|
7860
7873
|
return zdtToDate(zdt);
|
|
7861
7874
|
}
|
|
7862
7875
|
/**
|
|
7863
|
-
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon)
|
|
7876
|
+
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
7877
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7864
7878
|
* @return {Date}
|
|
7865
7879
|
*/
|
|
7866
7880
|
sunset() {
|
|
@@ -7868,7 +7882,8 @@ class Zmanim {
|
|
|
7868
7882
|
return zdtToDate(zdt);
|
|
7869
7883
|
}
|
|
7870
7884
|
/**
|
|
7871
|
-
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon)
|
|
7885
|
+
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
7886
|
+
* This function does not support elevation adjustment.
|
|
7872
7887
|
* @return {Date}
|
|
7873
7888
|
*/
|
|
7874
7889
|
seaLevelSunset() {
|
|
@@ -7876,7 +7891,9 @@ class Zmanim {
|
|
|
7876
7891
|
return zdtToDate(zdt);
|
|
7877
7892
|
}
|
|
7878
7893
|
/**
|
|
7879
|
-
* Civil dawn; Sun is 6° below the horizon in the morning
|
|
7894
|
+
* Civil dawn; Sun is 6° below the horizon in the morning.
|
|
7895
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7896
|
+
* the result is not impacted by elevation.
|
|
7880
7897
|
* @return {Date}
|
|
7881
7898
|
*/
|
|
7882
7899
|
dawn() {
|
|
@@ -7884,14 +7901,20 @@ class Zmanim {
|
|
|
7884
7901
|
return zdtToDate(zdt);
|
|
7885
7902
|
}
|
|
7886
7903
|
/**
|
|
7887
|
-
* Civil dusk; Sun is 6° below the horizon in the evening
|
|
7904
|
+
* Civil dusk; Sun is 6° below the horizon in the evening.
|
|
7905
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7906
|
+
* the result is not impacted by elevation.
|
|
7888
7907
|
* @return {Date}
|
|
7889
7908
|
*/
|
|
7890
7909
|
dusk() {
|
|
7891
7910
|
const zdt = this.noaa.getEndCivilTwilight();
|
|
7892
7911
|
return zdtToDate(zdt);
|
|
7893
7912
|
}
|
|
7894
|
-
/**
|
|
7913
|
+
/**
|
|
7914
|
+
* Returns sunset for the previous day.
|
|
7915
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7916
|
+
* @return {Date}
|
|
7917
|
+
*/
|
|
7895
7918
|
gregEve() {
|
|
7896
7919
|
const prev = new Date(this.date);
|
|
7897
7920
|
prev.setDate(prev.getDate() - 1);
|
|
@@ -7910,32 +7933,41 @@ class Zmanim {
|
|
|
7910
7933
|
* @return {Date}
|
|
7911
7934
|
*/
|
|
7912
7935
|
chatzot() {
|
|
7913
|
-
const
|
|
7936
|
+
const startOfDay = this.noaa.getSeaLevelSunrise();
|
|
7937
|
+
const endOfDay = this.noaa.getSeaLevelSunset();
|
|
7938
|
+
const zdt = this.noaa.getSunTransit(startOfDay, endOfDay);
|
|
7914
7939
|
return zdtToDate(zdt);
|
|
7915
7940
|
}
|
|
7916
7941
|
/**
|
|
7917
|
-
* Midnight – Chatzot; Sunset plus 6 halachic hours
|
|
7942
|
+
* Midnight – Chatzot; Sunset plus 6 halachic hours.
|
|
7943
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7918
7944
|
* @return {Date}
|
|
7919
7945
|
*/
|
|
7920
7946
|
chatzotNight() {
|
|
7921
7947
|
return new Date(this.sunrise().getTime() - this.nightHour() * 6);
|
|
7922
7948
|
}
|
|
7923
7949
|
/**
|
|
7924
|
-
* Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning
|
|
7950
|
+
* Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning.
|
|
7951
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7952
|
+
* the result is not impacted by elevation.
|
|
7925
7953
|
* @return {Date}
|
|
7926
7954
|
*/
|
|
7927
7955
|
alotHaShachar() {
|
|
7928
7956
|
return this.timeAtAngle(16.1, true);
|
|
7929
7957
|
}
|
|
7930
7958
|
/**
|
|
7931
|
-
* Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning
|
|
7959
|
+
* Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning.
|
|
7960
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7961
|
+
* the result is not impacted by elevation.
|
|
7932
7962
|
* @return {Date}
|
|
7933
7963
|
*/
|
|
7934
7964
|
misheyakir() {
|
|
7935
7965
|
return this.timeAtAngle(11.5, true);
|
|
7936
7966
|
}
|
|
7937
7967
|
/**
|
|
7938
|
-
* Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning
|
|
7968
|
+
* Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning.
|
|
7969
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
7970
|
+
* the result is not impacted by elevation.
|
|
7939
7971
|
* @return {Date}
|
|
7940
7972
|
*/
|
|
7941
7973
|
misheyakirMachmir() {
|
|
@@ -7956,7 +7988,8 @@ class Zmanim {
|
|
|
7956
7988
|
return zdtToDate(zdt);
|
|
7957
7989
|
}
|
|
7958
7990
|
/**
|
|
7959
|
-
* Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra
|
|
7991
|
+
* Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra.
|
|
7992
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7960
7993
|
* @return {Date}
|
|
7961
7994
|
*/
|
|
7962
7995
|
sofZmanShma() {
|
|
@@ -7964,7 +7997,8 @@ class Zmanim {
|
|
|
7964
7997
|
return this.getShaahZmanisBasedZman(3);
|
|
7965
7998
|
}
|
|
7966
7999
|
/**
|
|
7967
|
-
* Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra
|
|
8000
|
+
* Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra.
|
|
8001
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
7968
8002
|
* @return {Date}
|
|
7969
8003
|
*/
|
|
7970
8004
|
sofZmanTfilla() {
|
|
@@ -8064,21 +8098,24 @@ class Zmanim {
|
|
|
8064
8098
|
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8065
8099
|
}
|
|
8066
8100
|
/**
|
|
8067
|
-
* Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours
|
|
8101
|
+
* Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours.
|
|
8102
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
8068
8103
|
* @return {Date}
|
|
8069
8104
|
*/
|
|
8070
8105
|
minchaGedola() {
|
|
8071
8106
|
return this.getShaahZmanisBasedZman(6.5);
|
|
8072
8107
|
}
|
|
8073
8108
|
/**
|
|
8074
|
-
* Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours
|
|
8109
|
+
* Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours.
|
|
8110
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
8075
8111
|
* @return {Date}
|
|
8076
8112
|
*/
|
|
8077
8113
|
minchaKetana() {
|
|
8078
8114
|
return this.getShaahZmanisBasedZman(9.5);
|
|
8079
8115
|
}
|
|
8080
8116
|
/**
|
|
8081
|
-
* Plag haMincha; Sunrise plus 10.75 halachic hours
|
|
8117
|
+
* Plag haMincha; Sunrise plus 10.75 halachic hours.
|
|
8118
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
8082
8119
|
* @return {Date}
|
|
8083
8120
|
*/
|
|
8084
8121
|
plagHaMincha() {
|
|
@@ -8087,6 +8124,8 @@ class Zmanim {
|
|
|
8087
8124
|
/**
|
|
8088
8125
|
* @param {number} [angle=8.5] optional time for solar depression.
|
|
8089
8126
|
* Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars.
|
|
8127
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
8128
|
+
* the result is not impacted by elevation.
|
|
8090
8129
|
* @return {Date}
|
|
8091
8130
|
*/
|
|
8092
8131
|
tzeit(angle = 8.5) {
|
|
@@ -8110,7 +8149,9 @@ class Zmanim {
|
|
|
8110
8149
|
* Rabbeinu Tam holds that bein hashmashos is a specific time
|
|
8111
8150
|
* between sunset and tzeis hakochavim.
|
|
8112
8151
|
* One opinion on how to calculate this time is that
|
|
8113
|
-
* it is 13.5 minutes before tzies 7.083
|
|
8152
|
+
* it is 13.5 minutes before tzies 7.083.
|
|
8153
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
8154
|
+
* the result is not impacted by elevation.
|
|
8114
8155
|
* @return {Date}
|
|
8115
8156
|
*/
|
|
8116
8157
|
beinHaShmashos() {
|
|
@@ -8186,6 +8227,8 @@ class Zmanim {
|
|
|
8186
8227
|
|
|
8187
8228
|
/**
|
|
8188
8229
|
* Returns sunrise + `offset` minutes (either positive or negative).
|
|
8230
|
+
* If elevation is enabled, this function will include elevation in the calculation
|
|
8231
|
+
* unless `forceSeaLevel` is `true`.
|
|
8189
8232
|
* @param {number} offset minutes
|
|
8190
8233
|
* @param {boolean} roundMinute round time to nearest minute (default true)
|
|
8191
8234
|
* @param {boolean} forceSeaLevel use sea-level sunrise (default false)
|
|
@@ -8208,6 +8251,8 @@ class Zmanim {
|
|
|
8208
8251
|
|
|
8209
8252
|
/**
|
|
8210
8253
|
* Returns sunset + `offset` minutes (either positive or negative).
|
|
8254
|
+
* If elevation is enabled, this function will include elevation in the calculation
|
|
8255
|
+
* unless `forceSeaLevel` is `true`.
|
|
8211
8256
|
* @param {number} offset minutes
|
|
8212
8257
|
* @param {boolean} roundMinute round time to nearest minute (default true)
|
|
8213
8258
|
* @param {boolean} forceSeaLevel use sea-level sunset (default false)
|
|
@@ -9491,8 +9536,7 @@ class ParshaEvent extends Event {
|
|
|
9491
9536
|
|
|
9492
9537
|
/** @return {string} */
|
|
9493
9538
|
urlDateSuffix() {
|
|
9494
|
-
const
|
|
9495
|
-
const isoDate = isoDateTime.substring(0, isoDateTime.indexOf('T'));
|
|
9539
|
+
const isoDate = isoDateString(this.getDate().greg());
|
|
9496
9540
|
return isoDate.replace(/-/g, '');
|
|
9497
9541
|
}
|
|
9498
9542
|
}
|
|
@@ -10247,22 +10291,24 @@ class HolidayEvent extends Event {
|
|
|
10247
10291
|
if (cats[0] !== 'unknown') {
|
|
10248
10292
|
return cats;
|
|
10249
10293
|
}
|
|
10294
|
+
// Don't depend on flags.MINOR_HOLIDAY always being set. Look for minor holidays.
|
|
10250
10295
|
const desc = this.getDesc();
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
}
|
|
10296
|
+
const {
|
|
10297
|
+
LAG_BAOMER,
|
|
10298
|
+
LEIL_SELICHOT,
|
|
10299
|
+
PESACH_SHENI,
|
|
10300
|
+
EREV_PURIM,
|
|
10301
|
+
PURIM_KATAN,
|
|
10302
|
+
SHUSHAN_PURIM,
|
|
10303
|
+
TU_BAV,
|
|
10304
|
+
TU_BISHVAT,
|
|
10305
|
+
ROSH_HASHANA_LABEHEMOT
|
|
10306
|
+
} = holidayDesc;
|
|
10307
|
+
const minorHolidays = [LAG_BAOMER, LEIL_SELICHOT, PESACH_SHENI, EREV_PURIM, PURIM_KATAN, SHUSHAN_PURIM, TU_BAV, TU_BISHVAT, ROSH_HASHANA_LABEHEMOT];
|
|
10308
|
+
if (minorHolidays.includes(desc)) {
|
|
10309
|
+
return ['holiday', 'minor'];
|
|
10310
|
+
}
|
|
10311
|
+
return ['holiday', 'major'];
|
|
10266
10312
|
}
|
|
10267
10313
|
/**
|
|
10268
10314
|
* Returns (translated) description of this event
|
|
@@ -10325,8 +10371,7 @@ class RoshChodeshEvent extends HolidayEvent {
|
|
|
10325
10371
|
class AsaraBTevetEvent extends HolidayEvent {
|
|
10326
10372
|
/** @return {string} */
|
|
10327
10373
|
urlDateSuffix() {
|
|
10328
|
-
const
|
|
10329
|
-
const isoDate = isoDateTime.substring(0, isoDateTime.indexOf('T'));
|
|
10374
|
+
const isoDate = isoDateString(this.getDate().greg());
|
|
10330
10375
|
return isoDate.replace(/-/g, '');
|
|
10331
10376
|
}
|
|
10332
10377
|
}
|
|
@@ -10714,7 +10759,7 @@ class DailyLearning {
|
|
|
10714
10759
|
}
|
|
10715
10760
|
|
|
10716
10761
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10717
|
-
const version = '5.3.
|
|
10762
|
+
const version = '5.3.12';
|
|
10718
10763
|
|
|
10719
10764
|
const NONE$1 = 0;
|
|
10720
10765
|
const HALF = 1;
|