@hebcal/core 5.3.5 → 5.3.7
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 +103 -21
- package/dist/bundle.js +47 -13
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +49 -13
- package/dist/index.mjs +49 -13
- package/hebcal.d.ts +21 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.3.
|
|
1
|
+
/*! @hebcal/core v5.3.7 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
|
|
@@ -893,12 +893,19 @@ const shneiYamim = shnei + ' ' + yamim;
|
|
|
893
893
|
const shavuot = 'שָׁבוּעוֹת';
|
|
894
894
|
const yom = 'יוֹם';
|
|
895
895
|
const yomEchad = yom + ' ' + ones[1];
|
|
896
|
+
const asar = 'עָשָׂר';
|
|
896
897
|
function omerTodayIsHe(omerDay) {
|
|
897
898
|
const ten = Math.floor(omerDay / 10);
|
|
898
899
|
const one = omerDay % 10;
|
|
899
900
|
let str = 'הַיּוֹם ';
|
|
900
|
-
if (
|
|
901
|
-
str +=
|
|
901
|
+
if (omerDay === 11) {
|
|
902
|
+
str += 'אַחַד ' + asar;
|
|
903
|
+
}
|
|
904
|
+
else if (omerDay === 12) {
|
|
905
|
+
str += 'שְׁנֵים ' + asar;
|
|
906
|
+
}
|
|
907
|
+
else if (12 < omerDay && omerDay < 20) {
|
|
908
|
+
str += ones[one] + ' ' + asar;
|
|
902
909
|
}
|
|
903
910
|
else if (omerDay > 9) {
|
|
904
911
|
str += ones[one];
|
|
@@ -7923,8 +7930,8 @@ class Zmanim {
|
|
|
7923
7930
|
* @return {Date}
|
|
7924
7931
|
*/
|
|
7925
7932
|
getShaahZmanisBasedZman(hours) {
|
|
7926
|
-
const startOfDay = this.noaa.getSunrise();
|
|
7927
|
-
const endOfDay = this.noaa.getSunset();
|
|
7933
|
+
const startOfDay = this.useElevation ? this.noaa.getSunrise() : this.noaa.getSeaLevelSunrise();
|
|
7934
|
+
const endOfDay = this.useElevation ? this.noaa.getSunset() : this.noaa.getSeaLevelSunset();
|
|
7928
7935
|
const temporalHour = this.noaa.getTemporalHour(startOfDay, endOfDay);
|
|
7929
7936
|
const offset = Math.round(temporalHour * hours);
|
|
7930
7937
|
const zdt = NOAACalculator.getTimeOffset(startOfDay, offset);
|
|
@@ -7960,13 +7967,14 @@ class Zmanim {
|
|
|
7960
7967
|
/**
|
|
7961
7968
|
* Returns an array with alot (Date) and ms in hour (number)
|
|
7962
7969
|
* @private
|
|
7970
|
+
* @param {number} angle
|
|
7963
7971
|
* @return {any[]}
|
|
7964
7972
|
*/
|
|
7965
|
-
|
|
7966
|
-
const
|
|
7967
|
-
const
|
|
7968
|
-
const temporalHour = (
|
|
7969
|
-
return [
|
|
7973
|
+
getTemporalHourByDeg(angle) {
|
|
7974
|
+
const alot = this.timeAtAngle(angle, true);
|
|
7975
|
+
const tzeit = this.timeAtAngle(angle, false);
|
|
7976
|
+
const temporalHour = (tzeit - alot) / 12;
|
|
7977
|
+
return [alot, temporalHour];
|
|
7970
7978
|
}
|
|
7971
7979
|
/**
|
|
7972
7980
|
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
@@ -7987,7 +7995,21 @@ class Zmanim {
|
|
|
7987
7995
|
* @return {Date}
|
|
7988
7996
|
*/
|
|
7989
7997
|
sofZmanShmaMGA16Point1() {
|
|
7990
|
-
const [alot, temporalHour] = this.
|
|
7998
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
7999
|
+
return new Date(alot.getTime() + 3 * temporalHour);
|
|
8000
|
+
}
|
|
8001
|
+
/**
|
|
8002
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
8003
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
8004
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
8005
|
+
*
|
|
8006
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
8007
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
8008
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
8009
|
+
* @return {Date}
|
|
8010
|
+
*/
|
|
8011
|
+
sofZmanShmaMGA19Point8() {
|
|
8012
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
7991
8013
|
return new Date(alot.getTime() + 3 * temporalHour);
|
|
7992
8014
|
}
|
|
7993
8015
|
/**
|
|
@@ -8006,7 +8028,21 @@ class Zmanim {
|
|
|
8006
8028
|
* @return {Date}
|
|
8007
8029
|
*/
|
|
8008
8030
|
sofZmanTfillaMGA16Point1() {
|
|
8009
|
-
const [alot, temporalHour] = this.
|
|
8031
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
8032
|
+
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8033
|
+
}
|
|
8034
|
+
/**
|
|
8035
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
8036
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
8037
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
8038
|
+
*
|
|
8039
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
8040
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
8041
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
8042
|
+
* @return {Date}
|
|
8043
|
+
*/
|
|
8044
|
+
sofZmanTfillaMGA19Point8() {
|
|
8045
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
8010
8046
|
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8011
8047
|
}
|
|
8012
8048
|
/**
|
|
@@ -10451,7 +10487,7 @@ class DailyLearning {
|
|
|
10451
10487
|
}
|
|
10452
10488
|
|
|
10453
10489
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10454
|
-
const version = '5.3.
|
|
10490
|
+
const version = '5.3.7';
|
|
10455
10491
|
|
|
10456
10492
|
const NONE$1 = 0;
|
|
10457
10493
|
const HALF = 1;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.3.
|
|
1
|
+
/*! @hebcal/core v5.3.7 */
|
|
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];
|
|
@@ -891,12 +891,19 @@ const shneiYamim = shnei + ' ' + yamim;
|
|
|
891
891
|
const shavuot = 'שָׁבוּעוֹת';
|
|
892
892
|
const yom = 'יוֹם';
|
|
893
893
|
const yomEchad = yom + ' ' + ones[1];
|
|
894
|
+
const asar = 'עָשָׂר';
|
|
894
895
|
function omerTodayIsHe(omerDay) {
|
|
895
896
|
const ten = Math.floor(omerDay / 10);
|
|
896
897
|
const one = omerDay % 10;
|
|
897
898
|
let str = 'הַיּוֹם ';
|
|
898
|
-
if (
|
|
899
|
-
str +=
|
|
899
|
+
if (omerDay === 11) {
|
|
900
|
+
str += 'אַחַד ' + asar;
|
|
901
|
+
}
|
|
902
|
+
else if (omerDay === 12) {
|
|
903
|
+
str += 'שְׁנֵים ' + asar;
|
|
904
|
+
}
|
|
905
|
+
else if (12 < omerDay && omerDay < 20) {
|
|
906
|
+
str += ones[one] + ' ' + asar;
|
|
900
907
|
}
|
|
901
908
|
else if (omerDay > 9) {
|
|
902
909
|
str += ones[one];
|
|
@@ -7921,8 +7928,8 @@ class Zmanim {
|
|
|
7921
7928
|
* @return {Date}
|
|
7922
7929
|
*/
|
|
7923
7930
|
getShaahZmanisBasedZman(hours) {
|
|
7924
|
-
const startOfDay = this.noaa.getSunrise();
|
|
7925
|
-
const endOfDay = this.noaa.getSunset();
|
|
7931
|
+
const startOfDay = this.useElevation ? this.noaa.getSunrise() : this.noaa.getSeaLevelSunrise();
|
|
7932
|
+
const endOfDay = this.useElevation ? this.noaa.getSunset() : this.noaa.getSeaLevelSunset();
|
|
7926
7933
|
const temporalHour = this.noaa.getTemporalHour(startOfDay, endOfDay);
|
|
7927
7934
|
const offset = Math.round(temporalHour * hours);
|
|
7928
7935
|
const zdt = NOAACalculator.getTimeOffset(startOfDay, offset);
|
|
@@ -7958,13 +7965,14 @@ class Zmanim {
|
|
|
7958
7965
|
/**
|
|
7959
7966
|
* Returns an array with alot (Date) and ms in hour (number)
|
|
7960
7967
|
* @private
|
|
7968
|
+
* @param {number} angle
|
|
7961
7969
|
* @return {any[]}
|
|
7962
7970
|
*/
|
|
7963
|
-
|
|
7964
|
-
const
|
|
7965
|
-
const
|
|
7966
|
-
const temporalHour = (
|
|
7967
|
-
return [
|
|
7971
|
+
getTemporalHourByDeg(angle) {
|
|
7972
|
+
const alot = this.timeAtAngle(angle, true);
|
|
7973
|
+
const tzeit = this.timeAtAngle(angle, false);
|
|
7974
|
+
const temporalHour = (tzeit - alot) / 12;
|
|
7975
|
+
return [alot, temporalHour];
|
|
7968
7976
|
}
|
|
7969
7977
|
/**
|
|
7970
7978
|
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
@@ -7985,7 +7993,21 @@ class Zmanim {
|
|
|
7985
7993
|
* @return {Date}
|
|
7986
7994
|
*/
|
|
7987
7995
|
sofZmanShmaMGA16Point1() {
|
|
7988
|
-
const [alot, temporalHour] = this.
|
|
7996
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
7997
|
+
return new Date(alot.getTime() + 3 * temporalHour);
|
|
7998
|
+
}
|
|
7999
|
+
/**
|
|
8000
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
8001
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
8002
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
8003
|
+
*
|
|
8004
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
8005
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
8006
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
8007
|
+
* @return {Date}
|
|
8008
|
+
*/
|
|
8009
|
+
sofZmanShmaMGA19Point8() {
|
|
8010
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
7989
8011
|
return new Date(alot.getTime() + 3 * temporalHour);
|
|
7990
8012
|
}
|
|
7991
8013
|
/**
|
|
@@ -8004,7 +8026,21 @@ class Zmanim {
|
|
|
8004
8026
|
* @return {Date}
|
|
8005
8027
|
*/
|
|
8006
8028
|
sofZmanTfillaMGA16Point1() {
|
|
8007
|
-
const [alot, temporalHour] = this.
|
|
8029
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(16.1);
|
|
8030
|
+
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8031
|
+
}
|
|
8032
|
+
/**
|
|
8033
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
8034
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
8035
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
8036
|
+
*
|
|
8037
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
8038
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
8039
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
8040
|
+
* @return {Date}
|
|
8041
|
+
*/
|
|
8042
|
+
sofZmanTfillaMGA19Point8() {
|
|
8043
|
+
const [alot, temporalHour] = this.getTemporalHourByDeg(19.8);
|
|
8008
8044
|
return new Date(alot.getTime() + 4 * temporalHour);
|
|
8009
8045
|
}
|
|
8010
8046
|
/**
|
|
@@ -10449,7 +10485,7 @@ class DailyLearning {
|
|
|
10449
10485
|
}
|
|
10450
10486
|
|
|
10451
10487
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10452
|
-
const version = '5.3.
|
|
10488
|
+
const version = '5.3.7';
|
|
10453
10489
|
|
|
10454
10490
|
const NONE$1 = 0;
|
|
10455
10491
|
const HALF = 1;
|
package/hebcal.d.ts
CHANGED
|
@@ -484,15 +484,35 @@ declare module '@hebcal/core' {
|
|
|
484
484
|
* dawn to nightfall with both being 16.1° below the horizon.
|
|
485
485
|
*/
|
|
486
486
|
sofZmanShmaMGA16Point1(): Date;
|
|
487
|
+
/**
|
|
488
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
489
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
490
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
491
|
+
*
|
|
492
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
493
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
494
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
495
|
+
*/
|
|
496
|
+
sofZmanShmaMGA19Point8(): Date;
|
|
487
497
|
/** Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham */
|
|
488
498
|
sofZmanTfillaMGA(): Date;
|
|
489
|
-
/** Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours */
|
|
490
499
|
/**
|
|
491
500
|
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
492
501
|
* Based on the opinion of the MGA that the day is calculated from
|
|
493
502
|
* dawn to nightfall with both being 16.1° below the horizon.
|
|
494
503
|
*/
|
|
495
504
|
sofZmanTfillaMGA16Point1(): Date;
|
|
505
|
+
/**
|
|
506
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
507
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
508
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
509
|
+
*
|
|
510
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
511
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
512
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
513
|
+
*/
|
|
514
|
+
sofZmanTfillaMGA19Point8(): Date;
|
|
515
|
+
/** Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours */
|
|
496
516
|
minchaGedola(): Date;
|
|
497
517
|
/** Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours */
|
|
498
518
|
minchaKetana(): Date;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/core",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.7",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Eyal Schachter (https://github.com/Scimonster)",
|
|
@@ -74,18 +74,18 @@
|
|
|
74
74
|
"@babel/core": "^7.24.5",
|
|
75
75
|
"@babel/preset-env": "^7.24.5",
|
|
76
76
|
"@babel/register": "^7.23.7",
|
|
77
|
-
"@hebcal/hdate": "^0.9.
|
|
77
|
+
"@hebcal/hdate": "^0.9.3",
|
|
78
78
|
"@hebcal/noaa": "^0.8.14",
|
|
79
79
|
"@rollup/plugin-babel": "^6.0.4",
|
|
80
80
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
81
81
|
"@rollup/plugin-json": "^6.1.0",
|
|
82
82
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
83
83
|
"@rollup/plugin-terser": "^0.4.4",
|
|
84
|
-
"ava": "^6.1.
|
|
84
|
+
"ava": "^6.1.3",
|
|
85
85
|
"core-js": "^3.37.0",
|
|
86
86
|
"eslint": "^8.57.0",
|
|
87
87
|
"eslint-config-google": "^0.14.0",
|
|
88
|
-
"jsdoc": "^4.0.
|
|
88
|
+
"jsdoc": "^4.0.3",
|
|
89
89
|
"jsdoc-to-markdown": "^8.0.1",
|
|
90
90
|
"nyc": "^15.1.0",
|
|
91
91
|
"quick-lru": "^7.0.0",
|