@hebcal/core 5.3.6 → 5.3.8
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 +123 -21
- package/dist/bundle.js +55 -11
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +55 -11
- package/dist/index.mjs +55 -11
- package/hebcal.d.ts +30 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.3.
|
|
1
|
+
/*! @hebcal/core v5.3.8 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
|
|
@@ -7813,6 +7813,21 @@ class Zmanim {
|
|
|
7813
7813
|
this.noaa = new NOAACalculator(gloc, plainDate);
|
|
7814
7814
|
this.useElevation = Boolean(useElevation);
|
|
7815
7815
|
}
|
|
7816
|
+
/**
|
|
7817
|
+
* Returns `true` if elevation adjustment is enabled
|
|
7818
|
+
* for zmanim support elevation adjustment
|
|
7819
|
+
* @return {boolean}
|
|
7820
|
+
*/
|
|
7821
|
+
getUseElevation() {
|
|
7822
|
+
return this.useElevation;
|
|
7823
|
+
}
|
|
7824
|
+
/**
|
|
7825
|
+
* Enables or disables elevation adjustment for zmanim support elevation adjustment
|
|
7826
|
+
* @param {boolean} useElevation
|
|
7827
|
+
*/
|
|
7828
|
+
setUseElevation(useElevation) {
|
|
7829
|
+
this.useElevation = useElevation;
|
|
7830
|
+
}
|
|
7816
7831
|
/**
|
|
7817
7832
|
* Convenience function to get the time when sun is above or below the horizon
|
|
7818
7833
|
* for a certain angle (in degrees).
|
|
@@ -7930,8 +7945,8 @@ class Zmanim {
|
|
|
7930
7945
|
* @return {Date}
|
|
7931
7946
|
*/
|
|
7932
7947
|
getShaahZmanisBasedZman(hours) {
|
|
7933
|
-
const startOfDay = this.noaa.getSunrise();
|
|
7934
|
-
const endOfDay = this.noaa.getSunset();
|
|
7948
|
+
const startOfDay = this.useElevation ? this.noaa.getSunrise() : this.noaa.getSeaLevelSunrise();
|
|
7949
|
+
const endOfDay = this.useElevation ? this.noaa.getSunset() : this.noaa.getSeaLevelSunset();
|
|
7935
7950
|
const temporalHour = this.noaa.getTemporalHour(startOfDay, endOfDay);
|
|
7936
7951
|
const offset = Math.round(temporalHour * hours);
|
|
7937
7952
|
const zdt = NOAACalculator.getTimeOffset(startOfDay, offset);
|
|
@@ -7967,13 +7982,14 @@ class Zmanim {
|
|
|
7967
7982
|
/**
|
|
7968
7983
|
* Returns an array with alot (Date) and ms in hour (number)
|
|
7969
7984
|
* @private
|
|
7985
|
+
* @param {number} angle
|
|
7970
7986
|
* @return {any[]}
|
|
7971
7987
|
*/
|
|
7972
|
-
|
|
7973
|
-
const
|
|
7974
|
-
const
|
|
7975
|
-
const temporalHour = (
|
|
7976
|
-
return [
|
|
7988
|
+
getTemporalHourByDeg(angle) {
|
|
7989
|
+
const alot = this.timeAtAngle(angle, true);
|
|
7990
|
+
const tzeit = this.timeAtAngle(angle, false);
|
|
7991
|
+
const temporalHour = (tzeit - alot) / 12;
|
|
7992
|
+
return [alot, temporalHour];
|
|
7977
7993
|
}
|
|
7978
7994
|
/**
|
|
7979
7995
|
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
@@ -7994,7 +8010,21 @@ class Zmanim {
|
|
|
7994
8010
|
* @return {Date}
|
|
7995
8011
|
*/
|
|
7996
8012
|
sofZmanShmaMGA16Point1() {
|
|
7997
|
-
const [alot, temporalHour] = this.
|
|
8013
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
8014
|
+
return new Date(alot.getTime() + 3 * temporalHour);
|
|
8015
|
+
}
|
|
8016
|
+
/**
|
|
8017
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
8018
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
8019
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
8020
|
+
*
|
|
8021
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
8022
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
8023
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
8024
|
+
* @return {Date}
|
|
8025
|
+
*/
|
|
8026
|
+
sofZmanShmaMGA19Point8() {
|
|
8027
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
7998
8028
|
return new Date(alot.getTime() + 3 * temporalHour);
|
|
7999
8029
|
}
|
|
8000
8030
|
/**
|
|
@@ -8013,7 +8043,21 @@ class Zmanim {
|
|
|
8013
8043
|
* @return {Date}
|
|
8014
8044
|
*/
|
|
8015
8045
|
sofZmanTfillaMGA16Point1() {
|
|
8016
|
-
const [alot, temporalHour] = this.
|
|
8046
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
8047
|
+
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8048
|
+
}
|
|
8049
|
+
/**
|
|
8050
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
8051
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
8052
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
8053
|
+
*
|
|
8054
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
8055
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
8056
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
8057
|
+
* @return {Date}
|
|
8058
|
+
*/
|
|
8059
|
+
sofZmanTfillaMGA19Point8() {
|
|
8060
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
8017
8061
|
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8018
8062
|
}
|
|
8019
8063
|
/**
|
|
@@ -10458,7 +10502,7 @@ class DailyLearning {
|
|
|
10458
10502
|
}
|
|
10459
10503
|
|
|
10460
10504
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10461
|
-
const version = '5.3.
|
|
10505
|
+
const version = '5.3.8';
|
|
10462
10506
|
|
|
10463
10507
|
const NONE$1 = 0;
|
|
10464
10508
|
const HALF = 1;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.3.
|
|
1
|
+
/*! @hebcal/core v5.3.8 */
|
|
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];
|
|
@@ -7811,6 +7811,21 @@ class Zmanim {
|
|
|
7811
7811
|
this.noaa = new NOAACalculator(gloc, plainDate);
|
|
7812
7812
|
this.useElevation = Boolean(useElevation);
|
|
7813
7813
|
}
|
|
7814
|
+
/**
|
|
7815
|
+
* Returns `true` if elevation adjustment is enabled
|
|
7816
|
+
* for zmanim support elevation adjustment
|
|
7817
|
+
* @return {boolean}
|
|
7818
|
+
*/
|
|
7819
|
+
getUseElevation() {
|
|
7820
|
+
return this.useElevation;
|
|
7821
|
+
}
|
|
7822
|
+
/**
|
|
7823
|
+
* Enables or disables elevation adjustment for zmanim support elevation adjustment
|
|
7824
|
+
* @param {boolean} useElevation
|
|
7825
|
+
*/
|
|
7826
|
+
setUseElevation(useElevation) {
|
|
7827
|
+
this.useElevation = useElevation;
|
|
7828
|
+
}
|
|
7814
7829
|
/**
|
|
7815
7830
|
* Convenience function to get the time when sun is above or below the horizon
|
|
7816
7831
|
* for a certain angle (in degrees).
|
|
@@ -7928,8 +7943,8 @@ class Zmanim {
|
|
|
7928
7943
|
* @return {Date}
|
|
7929
7944
|
*/
|
|
7930
7945
|
getShaahZmanisBasedZman(hours) {
|
|
7931
|
-
const startOfDay = this.noaa.getSunrise();
|
|
7932
|
-
const endOfDay = this.noaa.getSunset();
|
|
7946
|
+
const startOfDay = this.useElevation ? this.noaa.getSunrise() : this.noaa.getSeaLevelSunrise();
|
|
7947
|
+
const endOfDay = this.useElevation ? this.noaa.getSunset() : this.noaa.getSeaLevelSunset();
|
|
7933
7948
|
const temporalHour = this.noaa.getTemporalHour(startOfDay, endOfDay);
|
|
7934
7949
|
const offset = Math.round(temporalHour * hours);
|
|
7935
7950
|
const zdt = NOAACalculator.getTimeOffset(startOfDay, offset);
|
|
@@ -7965,13 +7980,14 @@ class Zmanim {
|
|
|
7965
7980
|
/**
|
|
7966
7981
|
* Returns an array with alot (Date) and ms in hour (number)
|
|
7967
7982
|
* @private
|
|
7983
|
+
* @param {number} angle
|
|
7968
7984
|
* @return {any[]}
|
|
7969
7985
|
*/
|
|
7970
|
-
|
|
7971
|
-
const
|
|
7972
|
-
const
|
|
7973
|
-
const temporalHour = (
|
|
7974
|
-
return [
|
|
7986
|
+
getTemporalHourByDeg(angle) {
|
|
7987
|
+
const alot = this.timeAtAngle(angle, true);
|
|
7988
|
+
const tzeit = this.timeAtAngle(angle, false);
|
|
7989
|
+
const temporalHour = (tzeit - alot) / 12;
|
|
7990
|
+
return [alot, temporalHour];
|
|
7975
7991
|
}
|
|
7976
7992
|
/**
|
|
7977
7993
|
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
@@ -7992,7 +8008,21 @@ class Zmanim {
|
|
|
7992
8008
|
* @return {Date}
|
|
7993
8009
|
*/
|
|
7994
8010
|
sofZmanShmaMGA16Point1() {
|
|
7995
|
-
const [alot, temporalHour] = this.
|
|
8011
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
8012
|
+
return new Date(alot.getTime() + 3 * temporalHour);
|
|
8013
|
+
}
|
|
8014
|
+
/**
|
|
8015
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
8016
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
8017
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
8018
|
+
*
|
|
8019
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
8020
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
8021
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
8022
|
+
* @return {Date}
|
|
8023
|
+
*/
|
|
8024
|
+
sofZmanShmaMGA19Point8() {
|
|
8025
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
7996
8026
|
return new Date(alot.getTime() + 3 * temporalHour);
|
|
7997
8027
|
}
|
|
7998
8028
|
/**
|
|
@@ -8011,7 +8041,21 @@ class Zmanim {
|
|
|
8011
8041
|
* @return {Date}
|
|
8012
8042
|
*/
|
|
8013
8043
|
sofZmanTfillaMGA16Point1() {
|
|
8014
|
-
const [alot, temporalHour] = this.
|
|
8044
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
8045
|
+
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8046
|
+
}
|
|
8047
|
+
/**
|
|
8048
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
8049
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
8050
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
8051
|
+
*
|
|
8052
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
8053
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
8054
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
8055
|
+
* @return {Date}
|
|
8056
|
+
*/
|
|
8057
|
+
sofZmanTfillaMGA19Point8() {
|
|
8058
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
8015
8059
|
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8016
8060
|
}
|
|
8017
8061
|
/**
|
|
@@ -10456,7 +10500,7 @@ class DailyLearning {
|
|
|
10456
10500
|
}
|
|
10457
10501
|
|
|
10458
10502
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10459
|
-
const version = '5.3.
|
|
10503
|
+
const version = '5.3.8';
|
|
10460
10504
|
|
|
10461
10505
|
const NONE$1 = 0;
|
|
10462
10506
|
const HALF = 1;
|
package/hebcal.d.ts
CHANGED
|
@@ -420,6 +420,15 @@ declare module '@hebcal/core' {
|
|
|
420
420
|
* These zmanim intentionally do not support elevation adjustment.
|
|
421
421
|
*/
|
|
422
422
|
constructor(gloc: GeoLocation, date: Date | HDate, useElevation?: boolean);
|
|
423
|
+
/**
|
|
424
|
+
* Returns `true` if elevation adjustment is enabled
|
|
425
|
+
* for zmanim support elevation adjustment
|
|
426
|
+
*/
|
|
427
|
+
getUseElevation(): boolean;
|
|
428
|
+
/**
|
|
429
|
+
* Enables or disables elevation adjustment for zmanim support elevation adjustment
|
|
430
|
+
*/
|
|
431
|
+
setUseElevation(useElevation: boolean): void;
|
|
423
432
|
|
|
424
433
|
/**
|
|
425
434
|
* Returns a string like "2022-04-01T13:06:00-11:00"
|
|
@@ -484,15 +493,35 @@ declare module '@hebcal/core' {
|
|
|
484
493
|
* dawn to nightfall with both being 16.1° below the horizon.
|
|
485
494
|
*/
|
|
486
495
|
sofZmanShmaMGA16Point1(): Date;
|
|
496
|
+
/**
|
|
497
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
498
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
499
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
500
|
+
*
|
|
501
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
502
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
503
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
504
|
+
*/
|
|
505
|
+
sofZmanShmaMGA19Point8(): Date;
|
|
487
506
|
/** Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham */
|
|
488
507
|
sofZmanTfillaMGA(): Date;
|
|
489
|
-
/** Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours */
|
|
490
508
|
/**
|
|
491
509
|
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
492
510
|
* Based on the opinion of the MGA that the day is calculated from
|
|
493
511
|
* dawn to nightfall with both being 16.1° below the horizon.
|
|
494
512
|
*/
|
|
495
513
|
sofZmanTfillaMGA16Point1(): Date;
|
|
514
|
+
/**
|
|
515
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
516
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
517
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
518
|
+
*
|
|
519
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
520
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
521
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
522
|
+
*/
|
|
523
|
+
sofZmanTfillaMGA19Point8(): Date;
|
|
524
|
+
/** Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours */
|
|
496
525
|
minchaGedola(): Date;
|
|
497
526
|
/** Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours */
|
|
498
527
|
minchaKetana(): Date;
|