@hebcal/core 5.3.12 → 5.4.0
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 +251 -173
- package/dist/DailyLearning.d.ts +22 -0
- package/dist/HebrewDateEvent.d.ts +14 -0
- package/dist/ParshaEvent.d.ts +19 -0
- package/dist/ashkenazi.po.d.ts +68 -0
- package/dist/bundle.js +11621 -11437
- package/dist/bundle.min.js +2 -2
- package/dist/candles.d.ts +74 -0
- package/dist/dateFormat.d.ts +33 -0
- package/dist/event.d.ts +144 -0
- package/dist/hallel.d.ts +7 -0
- package/dist/hdate.d.ts +395 -0
- package/dist/he.po.d.ts +306 -0
- package/dist/hebcal.d.ts +451 -0
- package/dist/holidays.d.ts +65 -0
- package/dist/index.cjs +1837 -1947
- package/dist/index.d.ts +18 -0
- package/dist/index.mjs +1838 -1948
- package/dist/locale-ashkenazi.d.ts +1 -0
- package/dist/locale-he.d.ts +1 -0
- package/dist/locale.d.ts +80 -0
- package/dist/location.d.ts +85 -0
- package/dist/modern.d.ts +20 -0
- package/dist/molad.d.ts +65 -0
- package/dist/omer.d.ts +26 -0
- package/dist/pkgVersion.d.ts +1 -0
- package/dist/reformatTimeStr.d.ts +8 -0
- package/dist/sedra.d.ts +8 -0
- package/dist/staticHolidays.d.ts +212 -0
- package/dist/staticHols.d.ts +175 -0
- package/dist/tachanun.d.ts +8 -0
- package/dist/throwTypeError.d.ts +5 -0
- package/dist/zmanim.d.ts +321 -0
- package/package.json +17 -14
- package/hebcal.d.ts +0 -1361
- package/po/ashkenazi.po +0 -195
- package/po/he.min.po +0 -50
- package/po/he.po +0 -931
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { flags } from './event.js';
|
|
2
|
+
export interface Holiday {
|
|
3
|
+
mm: number;
|
|
4
|
+
dd: number;
|
|
5
|
+
desc: HolidayDesc;
|
|
6
|
+
flags: flags;
|
|
7
|
+
chmDay?: number;
|
|
8
|
+
emoji?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ModernHoliday {
|
|
11
|
+
firstYear: number;
|
|
12
|
+
mm: number;
|
|
13
|
+
dd: number;
|
|
14
|
+
desc: HolidayDesc;
|
|
15
|
+
chul?: boolean;
|
|
16
|
+
suppressEmoji?: boolean;
|
|
17
|
+
satPostponeToSun?: boolean;
|
|
18
|
+
friPostponeToSun?: boolean;
|
|
19
|
+
friSatMovetoThu?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Transliterated names of holidays, used by `Event.getDesc()`
|
|
23
|
+
* @readonly
|
|
24
|
+
* @enum {string}
|
|
25
|
+
*/
|
|
26
|
+
export declare enum HolidayDesc {
|
|
27
|
+
/** Asara B'Tevet */
|
|
28
|
+
ASARA_BTEVET = "Asara B'Tevet",
|
|
29
|
+
/** Birkat Hachamah */
|
|
30
|
+
BIRKAT_HACHAMAH = "Birkat Hachamah",
|
|
31
|
+
/** Chag HaBanot */
|
|
32
|
+
CHAG_HABANOT = "Chag HaBanot",
|
|
33
|
+
/** Chanukah: 8th Day */
|
|
34
|
+
CHANUKAH_8TH_DAY = "Chanukah: 8th Day",
|
|
35
|
+
/** Erev Tish'a B'Av */
|
|
36
|
+
EREV_TISHA_BAV = "Erev Tish'a B'Av",
|
|
37
|
+
/** Leil Selichot */
|
|
38
|
+
LEIL_SELICHOT = "Leil Selichot",
|
|
39
|
+
/** Purim Katan */
|
|
40
|
+
PURIM_KATAN = "Purim Katan",
|
|
41
|
+
/** Purim Meshulash */
|
|
42
|
+
PURIM_MESHULASH = "Purim Meshulash",
|
|
43
|
+
/** Shabbat Chazon */
|
|
44
|
+
SHABBAT_CHAZON = "Shabbat Chazon",
|
|
45
|
+
/** Shabbat HaChodesh */
|
|
46
|
+
SHABBAT_HACHODESH = "Shabbat HaChodesh",
|
|
47
|
+
/** Shabbat HaGadol */
|
|
48
|
+
SHABBAT_HAGADOL = "Shabbat HaGadol",
|
|
49
|
+
/** Shabbat Nachamu */
|
|
50
|
+
SHABBAT_NACHAMU = "Shabbat Nachamu",
|
|
51
|
+
/** Shabbat Parah */
|
|
52
|
+
SHABBAT_PARAH = "Shabbat Parah",
|
|
53
|
+
/** Shabbat Shekalim */
|
|
54
|
+
SHABBAT_SHEKALIM = "Shabbat Shekalim",
|
|
55
|
+
/** Shabbat Shirah */
|
|
56
|
+
SHABBAT_SHIRAH = "Shabbat Shirah",
|
|
57
|
+
/** Shabbat Shuva */
|
|
58
|
+
SHABBAT_SHUVA = "Shabbat Shuva",
|
|
59
|
+
/** Shabbat Zachor */
|
|
60
|
+
SHABBAT_ZACHOR = "Shabbat Zachor",
|
|
61
|
+
/** Shushan Purim Katan */
|
|
62
|
+
SHUSHAN_PURIM_KATAN = "Shushan Purim Katan",
|
|
63
|
+
/** Ta'anit Bechorot */
|
|
64
|
+
TAANIT_BECHOROT = "Ta'anit Bechorot",
|
|
65
|
+
/** Ta'anit Esther */
|
|
66
|
+
TAANIT_ESTHER = "Ta'anit Esther",
|
|
67
|
+
/** Tish'a B'Av */
|
|
68
|
+
TISHA_BAV = "Tish'a B'Av",
|
|
69
|
+
/** Tzom Gedaliah */
|
|
70
|
+
TZOM_GEDALIAH = "Tzom Gedaliah",
|
|
71
|
+
/** Tzom Tammuz */
|
|
72
|
+
TZOM_TAMMUZ = "Tzom Tammuz",
|
|
73
|
+
/** Yom HaAtzma'ut */
|
|
74
|
+
YOM_HAATZMA_UT = "Yom HaAtzma'ut",
|
|
75
|
+
/** Yom HaShoah */
|
|
76
|
+
YOM_HASHOAH = "Yom HaShoah",
|
|
77
|
+
/** Yom HaZikaron */
|
|
78
|
+
YOM_HAZIKARON = "Yom HaZikaron",
|
|
79
|
+
/** Ben-Gurion Day */
|
|
80
|
+
BEN_GURION_DAY = "Ben-Gurion Day",
|
|
81
|
+
/** Chanukah: 1 Candle */
|
|
82
|
+
CHANUKAH_1_CANDLE = "Chanukah: 1 Candle",
|
|
83
|
+
/** Erev Pesach */
|
|
84
|
+
EREV_PESACH = "Erev Pesach",
|
|
85
|
+
/** Erev Purim */
|
|
86
|
+
EREV_PURIM = "Erev Purim",
|
|
87
|
+
/** Erev Rosh Hashana */
|
|
88
|
+
EREV_ROSH_HASHANA = "Erev Rosh Hashana",
|
|
89
|
+
/** Erev Shavuot */
|
|
90
|
+
EREV_SHAVUOT = "Erev Shavuot",
|
|
91
|
+
/** Erev Sukkot */
|
|
92
|
+
EREV_SUKKOT = "Erev Sukkot",
|
|
93
|
+
/** Erev Yom Kippur */
|
|
94
|
+
EREV_YOM_KIPPUR = "Erev Yom Kippur",
|
|
95
|
+
/** Family Day */
|
|
96
|
+
FAMILY_DAY = "Family Day",
|
|
97
|
+
/** Hebrew Language Day */
|
|
98
|
+
HEBREW_LANGUAGE_DAY = "Hebrew Language Day",
|
|
99
|
+
/** Herzl Day */
|
|
100
|
+
HERZL_DAY = "Herzl Day",
|
|
101
|
+
/** Jabotinsky Day */
|
|
102
|
+
JABOTINSKY_DAY = "Jabotinsky Day",
|
|
103
|
+
/** Lag BaOmer */
|
|
104
|
+
LAG_BAOMER = "Lag BaOmer",
|
|
105
|
+
/** Pesach I */
|
|
106
|
+
PESACH_I = "Pesach I",
|
|
107
|
+
/** Pesach II */
|
|
108
|
+
PESACH_II = "Pesach II",
|
|
109
|
+
/** Pesach III (CH''M) */
|
|
110
|
+
PESACH_III_CHM = "Pesach III (CH''M)",
|
|
111
|
+
/** Pesach II (CH''M) */
|
|
112
|
+
PESACH_II_CHM = "Pesach II (CH''M)",
|
|
113
|
+
/** Pesach IV (CH''M) */
|
|
114
|
+
PESACH_IV_CHM = "Pesach IV (CH''M)",
|
|
115
|
+
/** Pesach Sheni */
|
|
116
|
+
PESACH_SHENI = "Pesach Sheni",
|
|
117
|
+
/** Pesach VII */
|
|
118
|
+
PESACH_VII = "Pesach VII",
|
|
119
|
+
/** Pesach VIII */
|
|
120
|
+
PESACH_VIII = "Pesach VIII",
|
|
121
|
+
/** Pesach VI (CH''M) */
|
|
122
|
+
PESACH_VI_CHM = "Pesach VI (CH''M)",
|
|
123
|
+
/** Pesach V (CH''M) */
|
|
124
|
+
PESACH_V_CHM = "Pesach V (CH''M)",
|
|
125
|
+
/** Purim */
|
|
126
|
+
PURIM = "Purim",
|
|
127
|
+
/** Rosh Hashana II */
|
|
128
|
+
ROSH_HASHANA_II = "Rosh Hashana II",
|
|
129
|
+
/** Rosh Hashana LaBehemot */
|
|
130
|
+
ROSH_HASHANA_LABEHEMOT = "Rosh Hashana LaBehemot",
|
|
131
|
+
/** Shavuot */
|
|
132
|
+
SHAVUOT = "Shavuot",
|
|
133
|
+
/** Shavuot I */
|
|
134
|
+
SHAVUOT_I = "Shavuot I",
|
|
135
|
+
/** Shavuot II */
|
|
136
|
+
SHAVUOT_II = "Shavuot II",
|
|
137
|
+
/** Shmini Atzeret */
|
|
138
|
+
SHMINI_ATZERET = "Shmini Atzeret",
|
|
139
|
+
/** Shushan Purim */
|
|
140
|
+
SHUSHAN_PURIM = "Shushan Purim",
|
|
141
|
+
/** Sigd */
|
|
142
|
+
SIGD = "Sigd",
|
|
143
|
+
/** Simchat Torah */
|
|
144
|
+
SIMCHAT_TORAH = "Simchat Torah",
|
|
145
|
+
/** Sukkot I */
|
|
146
|
+
SUKKOT_I = "Sukkot I",
|
|
147
|
+
/** Sukkot II */
|
|
148
|
+
SUKKOT_II = "Sukkot II",
|
|
149
|
+
/** Sukkot III (CH''M) */
|
|
150
|
+
SUKKOT_III_CHM = "Sukkot III (CH''M)",
|
|
151
|
+
/** Sukkot II (CH''M) */
|
|
152
|
+
SUKKOT_II_CHM = "Sukkot II (CH''M)",
|
|
153
|
+
/** Sukkot IV (CH''M) */
|
|
154
|
+
SUKKOT_IV_CHM = "Sukkot IV (CH''M)",
|
|
155
|
+
/** Sukkot VII (Hoshana Raba) */
|
|
156
|
+
SUKKOT_VII_HOSHANA_RABA = "Sukkot VII (Hoshana Raba)",
|
|
157
|
+
/** Sukkot VI (CH''M) */
|
|
158
|
+
SUKKOT_VI_CHM = "Sukkot VI (CH''M)",
|
|
159
|
+
/** Sukkot V (CH''M) */
|
|
160
|
+
SUKKOT_V_CHM = "Sukkot V (CH''M)",
|
|
161
|
+
/** Tu B\'Av */
|
|
162
|
+
TU_BAV = "Tu B'Av",
|
|
163
|
+
/** Tu BiShvat */
|
|
164
|
+
TU_BISHVAT = "Tu BiShvat",
|
|
165
|
+
/** Yitzhak Rabin Memorial Day */
|
|
166
|
+
YITZHAK_RABIN_MEMORIAL_DAY = "Yitzhak Rabin Memorial Day",
|
|
167
|
+
/** Yom HaAliyah */
|
|
168
|
+
YOM_HAALIYAH = "Yom HaAliyah",
|
|
169
|
+
/** Yom HaAliyah School Observance */
|
|
170
|
+
YOM_HAALIYAH_SCHOOL_OBSERVANCE = "Yom HaAliyah School Observance",
|
|
171
|
+
/** Yom Kippur */
|
|
172
|
+
YOM_KIPPUR = "Yom Kippur",
|
|
173
|
+
/** Yom Yerushalayim */
|
|
174
|
+
YOM_YERUSHALAYIM = "Yom Yerushalayim"
|
|
175
|
+
}
|
package/dist/zmanim.d.ts
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculate halachic times (zmanim / זְמַנִּים) for a given day and location.
|
|
3
|
+
* Calculations are available for tzeit / tzais (nightfall),
|
|
4
|
+
* shkiah (sunset) and more.
|
|
5
|
+
*
|
|
6
|
+
* Zmanim are estimated using an algorithm published by the US National Oceanic
|
|
7
|
+
* and Atmospheric Administration. The NOAA solar calculator is based on equations
|
|
8
|
+
* from _Astronomical Algorithms_ by Jean Meeus.
|
|
9
|
+
*
|
|
10
|
+
* The sunrise and sunset results are theoretically accurate to within a minute for
|
|
11
|
+
* locations between +/- 72° latitude, and within 10 minutes outside of those latitudes.
|
|
12
|
+
* However, due to variations in atmospheric composition, temperature, pressure and
|
|
13
|
+
* conditions, observed values may vary from calculations.
|
|
14
|
+
* https://gml.noaa.gov/grad/solcalc/calcdetails.html
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const {GeoLocation, Zmanim} = require('@hebcal/core');
|
|
18
|
+
* const latitude = 41.822232;
|
|
19
|
+
* const longitude = -71.448292;
|
|
20
|
+
* const tzid = 'America/New_York';
|
|
21
|
+
* const friday = new Date(2023, 8, 8);
|
|
22
|
+
* const gloc = new GeoLocation(null, latitude, longitude, 0, tzid);
|
|
23
|
+
* const zmanim = new Zmanim(gloc, friday, false);
|
|
24
|
+
* const candleLighting = zmanim.sunsetOffset(-18, true);
|
|
25
|
+
* const timeStr = Zmanim.formatISOWithTimeZone(tzid, candleLighting);
|
|
26
|
+
*/
|
|
27
|
+
export class Zmanim {
|
|
28
|
+
/**
|
|
29
|
+
* Uses timeFormat to return a date like '20:34'
|
|
30
|
+
* @param {Date} dt
|
|
31
|
+
* @param {Intl.DateTimeFormat} timeFormat
|
|
32
|
+
* @return {string}
|
|
33
|
+
*/
|
|
34
|
+
static formatTime(dt: Date, timeFormat: Intl.DateTimeFormat): string;
|
|
35
|
+
/**
|
|
36
|
+
* Discards seconds, rounding to nearest minute.
|
|
37
|
+
* @param {Date} dt
|
|
38
|
+
* @return {Date}
|
|
39
|
+
*/
|
|
40
|
+
static roundTime(dt: Date): Date;
|
|
41
|
+
/**
|
|
42
|
+
* Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
|
|
43
|
+
* @param {string} tzid
|
|
44
|
+
* @param {Date} date
|
|
45
|
+
* @return {string}
|
|
46
|
+
*/
|
|
47
|
+
static timeZoneOffset(tzid: string, date: Date): string;
|
|
48
|
+
/**
|
|
49
|
+
* Returns a string like "2022-04-01T13:06:00-11:00"
|
|
50
|
+
* @param {string} tzid
|
|
51
|
+
* @param {Date} date
|
|
52
|
+
* @return {string}
|
|
53
|
+
*/
|
|
54
|
+
static formatISOWithTimeZone(tzid: string, date: Date): string;
|
|
55
|
+
/**
|
|
56
|
+
* Initialize a Zmanim instance.
|
|
57
|
+
* @param {GeoLocation} gloc GeoLocation including latitude, longitude, and timezone
|
|
58
|
+
* @param {Date|HDate} date Regular or Hebrew Date. If `date` is a regular `Date`,
|
|
59
|
+
* hours, minutes, seconds and milliseconds are ignored.
|
|
60
|
+
* @param {boolean} useElevation use elevation for calculations (default `false`).
|
|
61
|
+
* If `true`, use elevation to affect the calculation of all sunrise/sunset based
|
|
62
|
+
* zmanim. Note: there are some zmanim such as degree-based zmanim that are driven
|
|
63
|
+
* by the amount of light in the sky and are not impacted by elevation.
|
|
64
|
+
* These zmanim intentionally do not support elevation adjustment.
|
|
65
|
+
*/
|
|
66
|
+
constructor(gloc: GeoLocation, date: Date | HDate, useElevation: boolean);
|
|
67
|
+
date: any;
|
|
68
|
+
gloc: GeoLocation;
|
|
69
|
+
noaa: NOAACalculator;
|
|
70
|
+
useElevation: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Returns `true` if elevation adjustment is enabled
|
|
73
|
+
* for zmanim support elevation adjustment
|
|
74
|
+
* @return {boolean}
|
|
75
|
+
*/
|
|
76
|
+
getUseElevation(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Enables or disables elevation adjustment for zmanim support elevation adjustment
|
|
79
|
+
* @param {boolean} useElevation
|
|
80
|
+
*/
|
|
81
|
+
setUseElevation(useElevation: boolean): void;
|
|
82
|
+
/**
|
|
83
|
+
* Convenience function to get the time when sun is above or below the horizon
|
|
84
|
+
* for a certain angle (in degrees).
|
|
85
|
+
* This function does not support elevation adjustment.
|
|
86
|
+
* @param {number} angle
|
|
87
|
+
* @param {boolean} rising
|
|
88
|
+
* @return {Date}
|
|
89
|
+
*/
|
|
90
|
+
timeAtAngle(angle: number, rising: boolean): Date;
|
|
91
|
+
/**
|
|
92
|
+
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
|
|
93
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
94
|
+
* @return {Date}
|
|
95
|
+
*/
|
|
96
|
+
sunrise(): Date;
|
|
97
|
+
/**
|
|
98
|
+
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon).
|
|
99
|
+
* This function does not support elevation adjustment.
|
|
100
|
+
* @return {Date}
|
|
101
|
+
*/
|
|
102
|
+
seaLevelSunrise(): Date;
|
|
103
|
+
/**
|
|
104
|
+
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
105
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
106
|
+
* @return {Date}
|
|
107
|
+
*/
|
|
108
|
+
sunset(): Date;
|
|
109
|
+
/**
|
|
110
|
+
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
111
|
+
* This function does not support elevation adjustment.
|
|
112
|
+
* @return {Date}
|
|
113
|
+
*/
|
|
114
|
+
seaLevelSunset(): Date;
|
|
115
|
+
/**
|
|
116
|
+
* Civil dawn; Sun is 6° below the horizon in the morning.
|
|
117
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
118
|
+
* the result is not impacted by elevation.
|
|
119
|
+
* @return {Date}
|
|
120
|
+
*/
|
|
121
|
+
dawn(): Date;
|
|
122
|
+
/**
|
|
123
|
+
* Civil dusk; Sun is 6° below the horizon in the evening.
|
|
124
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
125
|
+
* the result is not impacted by elevation.
|
|
126
|
+
* @return {Date}
|
|
127
|
+
*/
|
|
128
|
+
dusk(): Date;
|
|
129
|
+
/**
|
|
130
|
+
* Returns sunset for the previous day.
|
|
131
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
132
|
+
* @return {Date}
|
|
133
|
+
*/
|
|
134
|
+
gregEve(): Date;
|
|
135
|
+
/**
|
|
136
|
+
* @private
|
|
137
|
+
* @return {number}
|
|
138
|
+
*/
|
|
139
|
+
private nightHour;
|
|
140
|
+
/**
|
|
141
|
+
* Midday – Chatzot; Sunrise plus 6 halachic hours
|
|
142
|
+
* @return {Date}
|
|
143
|
+
*/
|
|
144
|
+
chatzot(): Date;
|
|
145
|
+
/**
|
|
146
|
+
* Midnight – Chatzot; Sunset plus 6 halachic hours.
|
|
147
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
148
|
+
* @return {Date}
|
|
149
|
+
*/
|
|
150
|
+
chatzotNight(): Date;
|
|
151
|
+
/**
|
|
152
|
+
* Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning.
|
|
153
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
154
|
+
* the result is not impacted by elevation.
|
|
155
|
+
* @return {Date}
|
|
156
|
+
*/
|
|
157
|
+
alotHaShachar(): Date;
|
|
158
|
+
/**
|
|
159
|
+
* Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning.
|
|
160
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
161
|
+
* the result is not impacted by elevation.
|
|
162
|
+
* @return {Date}
|
|
163
|
+
*/
|
|
164
|
+
misheyakir(): Date;
|
|
165
|
+
/**
|
|
166
|
+
* Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning.
|
|
167
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
168
|
+
* the result is not impacted by elevation.
|
|
169
|
+
* @return {Date}
|
|
170
|
+
*/
|
|
171
|
+
misheyakirMachmir(): Date;
|
|
172
|
+
/**
|
|
173
|
+
* Utility method for using elevation-aware sunrise/sunset
|
|
174
|
+
* @private
|
|
175
|
+
* @param {number} hours
|
|
176
|
+
* @return {Date}
|
|
177
|
+
*/
|
|
178
|
+
private getShaahZmanisBasedZman;
|
|
179
|
+
/**
|
|
180
|
+
* Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra.
|
|
181
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
182
|
+
* @return {Date}
|
|
183
|
+
*/
|
|
184
|
+
sofZmanShma(): Date;
|
|
185
|
+
/**
|
|
186
|
+
* Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra.
|
|
187
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
188
|
+
* @return {Date}
|
|
189
|
+
*/
|
|
190
|
+
sofZmanTfilla(): Date;
|
|
191
|
+
/**
|
|
192
|
+
* Returns an array with alot (Date) and ms in hour (number)
|
|
193
|
+
* @private
|
|
194
|
+
* @return {any[]}
|
|
195
|
+
*/
|
|
196
|
+
private getTemporalHour72;
|
|
197
|
+
/**
|
|
198
|
+
* Returns an array with alot (Date) and ms in hour (number)
|
|
199
|
+
* @private
|
|
200
|
+
* @param {number} angle
|
|
201
|
+
* @return {any[]}
|
|
202
|
+
*/
|
|
203
|
+
private getTemporalHourByDeg;
|
|
204
|
+
/**
|
|
205
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
206
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
207
|
+
* dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed
|
|
208
|
+
* 72 minutes after sea-level sunset.
|
|
209
|
+
* @return {Date}
|
|
210
|
+
*/
|
|
211
|
+
sofZmanShmaMGA(): Date;
|
|
212
|
+
/**
|
|
213
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
214
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
215
|
+
* dawn to nightfall with both being 16.1° below the horizon.
|
|
216
|
+
* @return {Date}
|
|
217
|
+
*/
|
|
218
|
+
sofZmanShmaMGA16Point1(): Date;
|
|
219
|
+
/**
|
|
220
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
221
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
222
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
223
|
+
*
|
|
224
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
225
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
226
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
227
|
+
* @return {Date}
|
|
228
|
+
*/
|
|
229
|
+
sofZmanShmaMGA19Point8(): Date;
|
|
230
|
+
/**
|
|
231
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
|
|
232
|
+
* @return {Date}
|
|
233
|
+
*/
|
|
234
|
+
sofZmanTfillaMGA(): Date;
|
|
235
|
+
/**
|
|
236
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
237
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
238
|
+
* dawn to nightfall with both being 16.1° below the horizon.
|
|
239
|
+
* @return {Date}
|
|
240
|
+
*/
|
|
241
|
+
sofZmanTfillaMGA16Point1(): Date;
|
|
242
|
+
/**
|
|
243
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
244
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
245
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
246
|
+
*
|
|
247
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
248
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
249
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
250
|
+
* @return {Date}
|
|
251
|
+
*/
|
|
252
|
+
sofZmanTfillaMGA19Point8(): Date;
|
|
253
|
+
/**
|
|
254
|
+
* Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours.
|
|
255
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
256
|
+
* @return {Date}
|
|
257
|
+
*/
|
|
258
|
+
minchaGedola(): Date;
|
|
259
|
+
/**
|
|
260
|
+
* Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours.
|
|
261
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
262
|
+
* @return {Date}
|
|
263
|
+
*/
|
|
264
|
+
minchaKetana(): Date;
|
|
265
|
+
/**
|
|
266
|
+
* Plag haMincha; Sunrise plus 10.75 halachic hours.
|
|
267
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
268
|
+
* @return {Date}
|
|
269
|
+
*/
|
|
270
|
+
plagHaMincha(): Date;
|
|
271
|
+
/**
|
|
272
|
+
* @param {number} [angle=8.5] optional time for solar depression.
|
|
273
|
+
* Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars.
|
|
274
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
275
|
+
* the result is not impacted by elevation.
|
|
276
|
+
* @return {Date}
|
|
277
|
+
*/
|
|
278
|
+
tzeit(angle?: number | undefined): Date;
|
|
279
|
+
/**
|
|
280
|
+
* Alias for sunrise
|
|
281
|
+
* @return {Date}
|
|
282
|
+
*/
|
|
283
|
+
neitzHaChama(): Date;
|
|
284
|
+
/**
|
|
285
|
+
* Alias for sunset
|
|
286
|
+
* @return {Date}
|
|
287
|
+
*/
|
|
288
|
+
shkiah(): Date;
|
|
289
|
+
/**
|
|
290
|
+
* Rabbeinu Tam holds that bein hashmashos is a specific time
|
|
291
|
+
* between sunset and tzeis hakochavim.
|
|
292
|
+
* One opinion on how to calculate this time is that
|
|
293
|
+
* it is 13.5 minutes before tzies 7.083.
|
|
294
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
295
|
+
* the result is not impacted by elevation.
|
|
296
|
+
* @return {Date}
|
|
297
|
+
*/
|
|
298
|
+
beinHaShmashos(): Date;
|
|
299
|
+
/**
|
|
300
|
+
* Returns sunrise + `offset` minutes (either positive or negative).
|
|
301
|
+
* If elevation is enabled, this function will include elevation in the calculation
|
|
302
|
+
* unless `forceSeaLevel` is `true`.
|
|
303
|
+
* @param {number} offset minutes
|
|
304
|
+
* @param {boolean} roundMinute round time to nearest minute (default true)
|
|
305
|
+
* @param {boolean} forceSeaLevel use sea-level sunrise (default false)
|
|
306
|
+
* @return {Date}
|
|
307
|
+
*/
|
|
308
|
+
sunriseOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
|
|
309
|
+
/**
|
|
310
|
+
* Returns sunset + `offset` minutes (either positive or negative).
|
|
311
|
+
* If elevation is enabled, this function will include elevation in the calculation
|
|
312
|
+
* unless `forceSeaLevel` is `true`.
|
|
313
|
+
* @param {number} offset minutes
|
|
314
|
+
* @param {boolean} roundMinute round time to nearest minute (default true)
|
|
315
|
+
* @param {boolean} forceSeaLevel use sea-level sunset (default false)
|
|
316
|
+
* @return {Date}
|
|
317
|
+
*/
|
|
318
|
+
sunsetOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
|
|
319
|
+
}
|
|
320
|
+
import { NOAACalculator } from '@hebcal/noaa';
|
|
321
|
+
import { HDate } from '@hebcal/hdate';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Eyal Schachter (https://github.com/Scimonster)",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"exports": {
|
|
28
28
|
"import": "./dist/index.mjs",
|
|
29
29
|
"require": "./dist/index.cjs",
|
|
30
|
-
"types": "./
|
|
30
|
+
"types": "./dist/index.d.ts"
|
|
31
31
|
},
|
|
32
|
-
"typings": "
|
|
32
|
+
"typings": "./dist/index.d.ts",
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">= 16.0.0"
|
|
35
35
|
},
|
|
@@ -42,14 +42,12 @@
|
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist",
|
|
45
|
-
"hebcal.d.ts",
|
|
46
45
|
"po"
|
|
47
46
|
],
|
|
48
47
|
"scripts": {
|
|
49
48
|
"build:rollup": "rollup -c",
|
|
50
|
-
"build": "npm run
|
|
49
|
+
"build": "npm run version && npm run build:rollup --production",
|
|
51
50
|
"prepublish": "npm run build",
|
|
52
|
-
"po2json": "node ./po2json.cjs po/*.po",
|
|
53
51
|
"version": "node ./version.cjs package.json src/pkgVersion.js",
|
|
54
52
|
"readme": "cp dist/index.mjs tmp.js && npx -p jsdoc-to-markdown jsdoc2md tmp.js && rm -f tmp.js",
|
|
55
53
|
"pretest": "npm run build",
|
|
@@ -71,16 +69,15 @@
|
|
|
71
69
|
"temporal-polyfill": "^0.2.4"
|
|
72
70
|
},
|
|
73
71
|
"devDependencies": {
|
|
74
|
-
"@babel/core": "^7.24.
|
|
75
|
-
"@babel/preset-env": "^7.24.
|
|
76
|
-
"@babel/register": "^7.
|
|
77
|
-
"@hebcal/hdate": "^0.9.3",
|
|
78
|
-
"@hebcal/noaa": "^0.8.14",
|
|
72
|
+
"@babel/core": "^7.24.6",
|
|
73
|
+
"@babel/preset-env": "^7.24.6",
|
|
74
|
+
"@babel/register": "^7.24.6",
|
|
79
75
|
"@rollup/plugin-babel": "^6.0.4",
|
|
80
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
76
|
+
"@rollup/plugin-commonjs": "^25.0.8",
|
|
81
77
|
"@rollup/plugin-json": "^6.1.0",
|
|
82
78
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
83
79
|
"@rollup/plugin-terser": "^0.4.4",
|
|
80
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
84
81
|
"ava": "^6.1.3",
|
|
85
82
|
"core-js": "^3.37.1",
|
|
86
83
|
"eslint": "^8.57.0",
|
|
@@ -89,7 +86,13 @@
|
|
|
89
86
|
"jsdoc-to-markdown": "^8.0.1",
|
|
90
87
|
"nyc": "^15.1.0",
|
|
91
88
|
"quick-lru": "^7.0.0",
|
|
92
|
-
"rollup": "^4.
|
|
93
|
-
"ttag-cli": "^1.10.12"
|
|
89
|
+
"rollup": "^4.18.0",
|
|
90
|
+
"ttag-cli": "^1.10.12",
|
|
91
|
+
"typescript": "^5.4.5"
|
|
92
|
+
},
|
|
93
|
+
"dependencies": {
|
|
94
|
+
"@hebcal/hdate": "^0.9.10",
|
|
95
|
+
"@hebcal/noaa": "^0.8.14",
|
|
96
|
+
"tslib": "^2.6.2"
|
|
94
97
|
}
|
|
95
98
|
}
|