@hebcal/core 5.4.8 → 5.4.10
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 +3 -3735
- package/dist/CalOptions.d.ts +2 -1
- package/dist/DailyLearning.d.ts +3 -6
- package/dist/HebrewDateEvent.d.ts +4 -7
- package/dist/HolidayEvent.d.ts +9 -23
- package/dist/MevarchimChodeshEvent.d.ts +5 -8
- package/dist/ParshaEvent.d.ts +2 -9
- package/dist/TimedEvent.d.ts +5 -12
- package/dist/YomKippurKatanEvent.d.ts +4 -8
- package/dist/bundle.js +1123 -878
- package/dist/bundle.js.map +1 -0
- package/dist/bundle.min.js +3 -2
- package/dist/bundle.min.js.map +1 -0
- package/dist/event.d.ts +61 -51
- package/dist/hallel.d.ts +0 -3
- package/dist/hebcal.d.ts +15 -36
- package/dist/index.cjs +1172 -912
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +1172 -912
- package/dist/index.mjs.map +1 -0
- package/dist/location.d.ts +14 -28
- package/dist/modern.d.ts +2 -4
- package/dist/molad.d.ts +13 -18
- package/dist/omer.d.ts +6 -14
- package/dist/pkgVersion.d.ts +1 -1
- package/dist/reformatTimeStr.d.ts +3 -4
- package/dist/sedra.d.ts +9 -19
- package/dist/staticHolidays.d.ts +74 -74
- package/dist/zmanim.d.ts +19 -60
- package/package.json +13 -12
package/dist/zmanim.d.ts
CHANGED
|
@@ -34,10 +34,10 @@ export declare class Zmanim {
|
|
|
34
34
|
private useElevation;
|
|
35
35
|
/**
|
|
36
36
|
* Initialize a Zmanim instance.
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
37
|
+
* @param gloc GeoLocation including latitude, longitude, and timezone
|
|
38
|
+
* @param date Regular or Hebrew Date. If `date` is a regular `Date`,
|
|
39
39
|
* hours, minutes, seconds and milliseconds are ignored.
|
|
40
|
-
* @param
|
|
40
|
+
* @param useElevation use elevation for calculations (default `false`).
|
|
41
41
|
* If `true`, use elevation to affect the calculation of all sunrise/sunset based
|
|
42
42
|
* zmanim. Note: there are some zmanim such as degree-based zmanim that are driven
|
|
43
43
|
* by the amount of light in the sky and are not impacted by elevation.
|
|
@@ -47,115 +47,98 @@ export declare class Zmanim {
|
|
|
47
47
|
/**
|
|
48
48
|
* Returns `true` if elevation adjustment is enabled
|
|
49
49
|
* for zmanim support elevation adjustment
|
|
50
|
-
* @return {boolean}
|
|
51
50
|
*/
|
|
52
51
|
getUseElevation(): boolean;
|
|
53
52
|
/**
|
|
54
53
|
* Enables or disables elevation adjustment for zmanim support elevation adjustment
|
|
55
|
-
* @param
|
|
54
|
+
* @param useElevation
|
|
56
55
|
*/
|
|
57
56
|
setUseElevation(useElevation: boolean): void;
|
|
58
57
|
/**
|
|
59
58
|
* Convenience function to get the time when sun is above or below the horizon
|
|
60
59
|
* for a certain angle (in degrees).
|
|
61
60
|
* This function does not support elevation adjustment.
|
|
62
|
-
* @param
|
|
63
|
-
* @param
|
|
64
|
-
* @return {Date}
|
|
61
|
+
* @param angle
|
|
62
|
+
* @param rising
|
|
65
63
|
*/
|
|
66
64
|
timeAtAngle(angle: number, rising: boolean): Date;
|
|
67
65
|
/**
|
|
68
66
|
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
|
|
69
67
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
70
|
-
* @return {Date}
|
|
71
68
|
*/
|
|
72
69
|
sunrise(): Date;
|
|
73
70
|
/**
|
|
74
71
|
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon).
|
|
75
72
|
* This function does not support elevation adjustment.
|
|
76
|
-
* @return {Date}
|
|
77
73
|
*/
|
|
78
74
|
seaLevelSunrise(): Date;
|
|
79
75
|
/**
|
|
80
76
|
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
81
77
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
82
|
-
* @return {Date}
|
|
83
78
|
*/
|
|
84
79
|
sunset(): Date;
|
|
85
80
|
/**
|
|
86
81
|
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
87
82
|
* This function does not support elevation adjustment.
|
|
88
|
-
* @return {Date}
|
|
89
83
|
*/
|
|
90
84
|
seaLevelSunset(): Date;
|
|
91
85
|
/**
|
|
92
86
|
* Civil dawn; Sun is 6° below the horizon in the morning.
|
|
93
87
|
* Because degree-based functions estimate the amount of light in the sky,
|
|
94
88
|
* the result is not impacted by elevation.
|
|
95
|
-
* @return {Date}
|
|
96
89
|
*/
|
|
97
90
|
dawn(): Date;
|
|
98
91
|
/**
|
|
99
92
|
* Civil dusk; Sun is 6° below the horizon in the evening.
|
|
100
93
|
* Because degree-based functions estimate the amount of light in the sky,
|
|
101
94
|
* the result is not impacted by elevation.
|
|
102
|
-
* @return {Date}
|
|
103
95
|
*/
|
|
104
96
|
dusk(): Date;
|
|
105
97
|
/**
|
|
106
98
|
* Returns sunset for the previous day.
|
|
107
99
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
108
|
-
* @return {Date}
|
|
109
100
|
*/
|
|
110
101
|
gregEve(): Date;
|
|
111
102
|
/**
|
|
112
103
|
* @private
|
|
113
|
-
* @return {number}
|
|
114
104
|
*/
|
|
115
105
|
nightHour(): number;
|
|
116
106
|
/**
|
|
117
107
|
* Midday – Chatzot; Sunrise plus 6 halachic hours
|
|
118
|
-
* @return {Date}
|
|
119
108
|
*/
|
|
120
109
|
chatzot(): Date;
|
|
121
110
|
/**
|
|
122
111
|
* Midnight – Chatzot; Sunset plus 6 halachic hours.
|
|
123
112
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
124
|
-
* @return {Date}
|
|
125
113
|
*/
|
|
126
114
|
chatzotNight(): Date;
|
|
127
115
|
/**
|
|
128
116
|
* Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning.
|
|
129
117
|
* Because degree-based functions estimate the amount of light in the sky,
|
|
130
118
|
* the result is not impacted by elevation.
|
|
131
|
-
* @return {Date}
|
|
132
119
|
*/
|
|
133
120
|
alotHaShachar(): Date;
|
|
134
121
|
/**
|
|
135
122
|
* Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning.
|
|
136
123
|
* Because degree-based functions estimate the amount of light in the sky,
|
|
137
124
|
* the result is not impacted by elevation.
|
|
138
|
-
* @return {Date}
|
|
139
125
|
*/
|
|
140
126
|
misheyakir(): Date;
|
|
141
127
|
/**
|
|
142
128
|
* Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning.
|
|
143
129
|
* Because degree-based functions estimate the amount of light in the sky,
|
|
144
130
|
* the result is not impacted by elevation.
|
|
145
|
-
* @return {Date}
|
|
146
131
|
*/
|
|
147
132
|
misheyakirMachmir(): Date;
|
|
148
133
|
/**
|
|
149
134
|
* Utility method for using elevation-aware sunrise/sunset
|
|
150
135
|
* @private
|
|
151
|
-
* @param
|
|
152
|
-
* @return {Date}
|
|
136
|
+
* @param hours
|
|
153
137
|
*/
|
|
154
138
|
getShaahZmanisBasedZman(hours: number): Date;
|
|
155
139
|
/**
|
|
156
140
|
* Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra.
|
|
157
141
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
158
|
-
* @return {Date}
|
|
159
142
|
*/
|
|
160
143
|
sofZmanShma(): Date;
|
|
161
144
|
/**
|
|
@@ -167,7 +150,6 @@ export declare class Zmanim {
|
|
|
167
150
|
* to the [GRA](https://en.wikipedia.org/wiki/Vilna_Gaon).
|
|
168
151
|
*
|
|
169
152
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
170
|
-
* @return {Date}
|
|
171
153
|
*/
|
|
172
154
|
sofZmanTfilla(): Date;
|
|
173
155
|
/**
|
|
@@ -185,14 +167,12 @@ export declare class Zmanim {
|
|
|
185
167
|
* Based on the opinion of the MGA that the day is calculated from
|
|
186
168
|
* dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed
|
|
187
169
|
* 72 minutes after sea-level sunset.
|
|
188
|
-
* @return {Date}
|
|
189
170
|
*/
|
|
190
171
|
sofZmanShmaMGA(): Date;
|
|
191
172
|
/**
|
|
192
173
|
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
193
174
|
* Based on the opinion of the MGA that the day is calculated from
|
|
194
175
|
* dawn to nightfall with both being 16.1° below the horizon.
|
|
195
|
-
* @return {Date}
|
|
196
176
|
*/
|
|
197
177
|
sofZmanShmaMGA16Point1(): Date;
|
|
198
178
|
/**
|
|
@@ -203,19 +183,16 @@ export declare class Zmanim {
|
|
|
203
183
|
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
204
184
|
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
205
185
|
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
206
|
-
* @return {Date}
|
|
207
186
|
*/
|
|
208
187
|
sofZmanShmaMGA19Point8(): Date;
|
|
209
188
|
/**
|
|
210
189
|
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
|
|
211
|
-
* @return {Date}
|
|
212
190
|
*/
|
|
213
191
|
sofZmanTfillaMGA(): Date;
|
|
214
192
|
/**
|
|
215
193
|
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
216
194
|
* Based on the opinion of the MGA that the day is calculated from
|
|
217
195
|
* dawn to nightfall with both being 16.1° below the horizon.
|
|
218
|
-
* @return {Date}
|
|
219
196
|
*/
|
|
220
197
|
sofZmanTfillaMGA16Point1(): Date;
|
|
221
198
|
/**
|
|
@@ -226,7 +203,6 @@ export declare class Zmanim {
|
|
|
226
203
|
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
227
204
|
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
228
205
|
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
229
|
-
* @return {Date}
|
|
230
206
|
*/
|
|
231
207
|
sofZmanTfillaMGA19Point8(): Date;
|
|
232
208
|
/**
|
|
@@ -241,7 +217,6 @@ export declare class Zmanim {
|
|
|
241
217
|
* The Ramba"m is of the opinion that it is better to delay *mincha* until
|
|
242
218
|
* *mincha ketana* while the Ra"sh, Tur, GRA and others are of the
|
|
243
219
|
* opinion that *mincha* can be prayed *lechatchila* starting at *mincha gedola*.
|
|
244
|
-
* @return {Date}
|
|
245
220
|
*/
|
|
246
221
|
minchaGedola(): Date;
|
|
247
222
|
/**
|
|
@@ -251,7 +226,6 @@ export declare class Zmanim {
|
|
|
251
226
|
* This method returns the time of *mincha gedola* according to the Magen Avraham
|
|
252
227
|
* with the day starting 72 minutes before sunrise and ending 72 minutes after sunset.
|
|
253
228
|
* This is the earliest time to pray *mincha*.
|
|
254
|
-
* @return {Date}
|
|
255
229
|
*/
|
|
256
230
|
minchaGedolaMGA(): Date;
|
|
257
231
|
/**
|
|
@@ -263,7 +237,6 @@ export declare class Zmanim {
|
|
|
263
237
|
* that is 9.5 *shaos zmaniyos* (solar hours) after sunrise or sea level sunrise
|
|
264
238
|
* (depending on the `useElevation` setting), according
|
|
265
239
|
* to the [GRA](https://en.wikipedia.org/wiki/Vilna_Gaon).
|
|
266
|
-
* @return {Date}
|
|
267
240
|
*/
|
|
268
241
|
minchaKetana(): Date;
|
|
269
242
|
/**
|
|
@@ -273,31 +246,26 @@ export declare class Zmanim {
|
|
|
273
246
|
* the [Rambam](https://en.wikipedia.org/wiki/Maimonides) and others.
|
|
274
247
|
*
|
|
275
248
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
276
|
-
* @return {Date}
|
|
277
249
|
*/
|
|
278
250
|
minchaKetanaMGA(): Date;
|
|
279
251
|
/**
|
|
280
252
|
* Plag haMincha; Sunrise plus 10.75 halachic hours.
|
|
281
253
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
282
|
-
* @return {Date}
|
|
283
254
|
*/
|
|
284
255
|
plagHaMincha(): Date;
|
|
285
256
|
/**
|
|
286
|
-
* @param
|
|
257
|
+
* @param [angle=8.5] optional time for solar depression.
|
|
287
258
|
* Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars.
|
|
288
259
|
* Because degree-based functions estimate the amount of light in the sky,
|
|
289
260
|
* the result is not impacted by elevation.
|
|
290
|
-
* @return {Date}
|
|
291
261
|
*/
|
|
292
262
|
tzeit(angle?: number): Date;
|
|
293
263
|
/**
|
|
294
264
|
* Alias for sunrise
|
|
295
|
-
* @return {Date}
|
|
296
265
|
*/
|
|
297
266
|
neitzHaChama(): Date;
|
|
298
267
|
/**
|
|
299
268
|
* Alias for sunset
|
|
300
|
-
* @return {Date}
|
|
301
269
|
*/
|
|
302
270
|
shkiah(): Date;
|
|
303
271
|
/**
|
|
@@ -307,54 +275,45 @@ export declare class Zmanim {
|
|
|
307
275
|
* it is 13.5 minutes before tzies 7.083.
|
|
308
276
|
* Because degree-based functions estimate the amount of light in the sky,
|
|
309
277
|
* the result is not impacted by elevation.
|
|
310
|
-
* @return {Date}
|
|
311
278
|
*/
|
|
312
279
|
beinHaShmashos(): Date;
|
|
313
280
|
/**
|
|
314
281
|
* Uses timeFormat to return a date like '20:34'
|
|
315
|
-
* @param {Date} dt
|
|
316
|
-
* @param {Intl.DateTimeFormat} timeFormat
|
|
317
|
-
* @return {string}
|
|
318
282
|
*/
|
|
319
283
|
static formatTime(dt: Date, timeFormat: Intl.DateTimeFormat): string;
|
|
320
284
|
/**
|
|
321
285
|
* Discards seconds, rounding to nearest minute.
|
|
322
|
-
* @param
|
|
323
|
-
* @return {Date}
|
|
286
|
+
* @param dt
|
|
324
287
|
*/
|
|
325
288
|
static roundTime(dt: Date): Date;
|
|
326
289
|
/**
|
|
327
290
|
* Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
|
|
328
|
-
* @param
|
|
329
|
-
* @param
|
|
330
|
-
* @return {string}
|
|
291
|
+
* @param tzid
|
|
292
|
+
* @param date
|
|
331
293
|
*/
|
|
332
294
|
static timeZoneOffset(tzid: string, date: Date): string;
|
|
333
295
|
/**
|
|
334
296
|
* Returns a string like "2022-04-01T13:06:00-11:00"
|
|
335
|
-
* @param
|
|
336
|
-
* @param
|
|
337
|
-
* @return {string}
|
|
297
|
+
* @param tzid
|
|
298
|
+
* @param date
|
|
338
299
|
*/
|
|
339
300
|
static formatISOWithTimeZone(tzid: string, date: Date): string;
|
|
340
301
|
/**
|
|
341
302
|
* Returns sunrise + `offset` minutes (either positive or negative).
|
|
342
303
|
* If elevation is enabled, this function will include elevation in the calculation
|
|
343
304
|
* unless `forceSeaLevel` is `true`.
|
|
344
|
-
* @param
|
|
345
|
-
* @param
|
|
346
|
-
* @param
|
|
347
|
-
* @return {Date}
|
|
305
|
+
* @param offset minutes
|
|
306
|
+
* @param roundMinute round time to nearest minute (default true)
|
|
307
|
+
* @param forceSeaLevel use sea-level sunrise (default false)
|
|
348
308
|
*/
|
|
349
309
|
sunriseOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
|
|
350
310
|
/**
|
|
351
311
|
* Returns sunset + `offset` minutes (either positive or negative).
|
|
352
312
|
* If elevation is enabled, this function will include elevation in the calculation
|
|
353
313
|
* unless `forceSeaLevel` is `true`.
|
|
354
|
-
* @param
|
|
355
|
-
* @param
|
|
356
|
-
* @param
|
|
357
|
-
* @return {Date}
|
|
314
|
+
* @param offset minutes
|
|
315
|
+
* @param roundMinute round time to nearest minute (default true)
|
|
316
|
+
* @param forceSeaLevel use sea-level sunset (default false)
|
|
358
317
|
*/
|
|
359
318
|
sunsetOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
|
|
360
319
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/core",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.10",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Eyal Schachter (https://github.com/Scimonster)",
|
|
@@ -49,11 +49,13 @@
|
|
|
49
49
|
"prepublish": "npm run build",
|
|
50
50
|
"version": "node ./version.cjs package.json src/pkgVersion.ts",
|
|
51
51
|
"po2json": "node ./po2json.cjs po/*.po",
|
|
52
|
-
"
|
|
52
|
+
"docs": "typedoc",
|
|
53
53
|
"pretest": "npm run build",
|
|
54
|
-
"lint": "
|
|
54
|
+
"lint": "gts lint",
|
|
55
55
|
"coverage": "jest --coverage",
|
|
56
|
-
"test": "jest"
|
|
56
|
+
"test": "jest",
|
|
57
|
+
"clean": "gts clean",
|
|
58
|
+
"fix": "gts fix"
|
|
57
59
|
},
|
|
58
60
|
"license": "GPL-2.0",
|
|
59
61
|
"overrides": {
|
|
@@ -65,8 +67,8 @@
|
|
|
65
67
|
"temporal-polyfill": "^0.2.4"
|
|
66
68
|
},
|
|
67
69
|
"devDependencies": {
|
|
68
|
-
"@babel/core": "^7.24.
|
|
69
|
-
"@babel/preset-env": "^7.24.
|
|
70
|
+
"@babel/core": "^7.24.9",
|
|
71
|
+
"@babel/preset-env": "^7.24.8",
|
|
70
72
|
"@babel/preset-typescript": "^7.24.7",
|
|
71
73
|
"@babel/register": "^7.24.6",
|
|
72
74
|
"@rollup/plugin-babel": "^6.0.4",
|
|
@@ -76,19 +78,18 @@
|
|
|
76
78
|
"@rollup/plugin-terser": "^0.4.4",
|
|
77
79
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
78
80
|
"@types/jest": "^29.5.12",
|
|
81
|
+
"@types/node": "^20.14.10",
|
|
79
82
|
"core-js": "^3.37.1",
|
|
80
|
-
"
|
|
81
|
-
"eslint-config-google": "^0.14.0",
|
|
83
|
+
"gts": "^5.3.1",
|
|
82
84
|
"jest": "^29.7.0",
|
|
83
|
-
"jsdoc": "^4.0.3",
|
|
84
|
-
"jsdoc-to-markdown": "^8.0.1",
|
|
85
85
|
"quick-lru": "<=6.1.2",
|
|
86
|
-
"rollup": "^4.18.
|
|
86
|
+
"rollup": "^4.18.1",
|
|
87
87
|
"ttag-cli": "^1.10.12",
|
|
88
|
+
"typedoc": "^0.26.4",
|
|
88
89
|
"typescript": "^5.5.3"
|
|
89
90
|
},
|
|
90
91
|
"dependencies": {
|
|
91
|
-
"@hebcal/hdate": "^0.
|
|
92
|
+
"@hebcal/hdate": "^0.11.1",
|
|
92
93
|
"@hebcal/noaa": "^0.8.14",
|
|
93
94
|
"tslib": "^2.6.3"
|
|
94
95
|
}
|