@hebcal/core 6.2.0 → 6.3.1
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/dist/bundle.js +149 -33
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +9 -9
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.js +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +1 -1
- package/dist/esm/TimedEvent.js +14 -7
- package/dist/esm/TimedEvent.js.map +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.js +1 -1
- package/dist/esm/calendar.js +29 -3
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.js +4 -3
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/event.js +1 -1
- package/dist/esm/getStartAndEnd.js +1 -1
- package/dist/esm/hallel.js +1 -1
- package/dist/esm/he-x-NoNikud.po.d.ts +10 -0
- package/dist/esm/he-x-NoNikud.po.js +2 -2
- package/dist/esm/he-x-NoNikud.po.js.map +1 -1
- package/dist/esm/he.po.d.ts +2 -0
- package/dist/esm/he.po.js +2 -2
- package/dist/esm/he.po.js.map +1 -1
- package/dist/esm/hebcal.js +1 -1
- package/dist/esm/holidays.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/isAssurBemlacha.js +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.d.ts +7 -0
- package/dist/esm/location.js +8 -1
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.js +1 -1
- package/dist/esm/moladBase.js +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/omer.d.ts +48 -0
- package/dist/esm/omer.js +61 -2
- package/dist/esm/omer.js.map +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.js +1 -1
- package/dist/esm/pkgVersion.d.ts +1 -1
- package/dist/esm/pkgVersion.js +2 -2
- package/dist/esm/pkgVersion.js.map +1 -1
- package/dist/esm/reformatTimeStr.js +1 -1
- package/dist/esm/sedra.js +1 -1
- package/dist/esm/sefira.json.js +5 -0
- package/dist/esm/sefira.json.js.map +1 -0
- package/dist/esm/staticHolidays.d.ts +14 -0
- package/dist/esm/staticHolidays.js +22 -1
- package/dist/esm/staticHolidays.js.map +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/zmanim.d.ts +15 -3
- package/dist/esm/zmanim.js +26 -21
- package/dist/esm/zmanim.js.map +1 -1
- package/dist/src/TimedEvent.js +13 -6
- package/dist/src/calendar.js +28 -2
- package/dist/src/candles.js +3 -2
- package/dist/src/he-x-NoNikud.po.d.ts +10 -0
- package/dist/src/he-x-NoNikud.po.js +1 -1
- package/dist/src/he.po.d.ts +2 -0
- package/dist/src/he.po.js +1 -1
- package/dist/src/location.d.ts +7 -0
- package/dist/src/location.js +7 -0
- package/dist/src/omer.d.ts +48 -0
- package/dist/src/omer.js +60 -1
- package/dist/src/pkgVersion.d.ts +1 -1
- package/dist/src/pkgVersion.js +1 -1
- package/dist/src/sefira.json +63 -0
- package/dist/src/staticHolidays.d.ts +14 -0
- package/dist/src/staticHolidays.js +21 -0
- package/dist/src/zmanim.d.ts +15 -3
- package/dist/src/zmanim.js +24 -19
- package/package.json +5 -4
- package/dist/coverage/block-navigation.d.ts +0 -1
- package/dist/coverage/block-navigation.js +0 -70
- package/dist/coverage/prettify.d.ts +0 -0
- package/dist/coverage/prettify.js +0 -477
- package/dist/coverage/sorter.d.ts +0 -1
- package/dist/coverage/sorter.js +0 -176
package/dist/src/omer.d.ts
CHANGED
|
@@ -49,4 +49,52 @@ export declare class OmerEvent extends Event {
|
|
|
49
49
|
*/
|
|
50
50
|
getTodayIs(locale: string): string;
|
|
51
51
|
url(): string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the word from Psalm 67 (לַמְנַצֵּחַ, "Lamnatzeach") corresponding
|
|
54
|
+
* to this Omer day. Psalm 67 contains 49 words (excluding its opening verse),
|
|
55
|
+
* one for each day of the Omer. The words are taken from verses 2–8, split on
|
|
56
|
+
* spaces and maqef (־).
|
|
57
|
+
* @returns a Hebrew word from Psalm 67
|
|
58
|
+
* @example
|
|
59
|
+
* const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);
|
|
60
|
+
* ev.getLamnatzeachWord(); // 'אֱלֹהִים' (day 1, first word of verse 2)
|
|
61
|
+
* @example
|
|
62
|
+
* const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);
|
|
63
|
+
* ev.getLamnatzeachWord(); // 'אָרֶץ' (day 49, last word of verse 8)
|
|
64
|
+
*/
|
|
65
|
+
getLamnatzeachWord(): string;
|
|
66
|
+
/**
|
|
67
|
+
* Returns the letter from verse 5 of Psalm 67 corresponding to this Omer day.
|
|
68
|
+
* Verse 5 (יִשְׂמְחוּ וִירַנְּנוּ לְאֻמִּים…) contains exactly 49 letters,
|
|
69
|
+
* one for each day of the Omer, and is used as a Kabbalistic meditation during
|
|
70
|
+
* the counting.
|
|
71
|
+
* @returns a single Hebrew letter from verse 5 of Psalm 67
|
|
72
|
+
* @example
|
|
73
|
+
* const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);
|
|
74
|
+
* ev.getLamnatzeachLetter(); // 'י' (day 1, first letter of verse 5)
|
|
75
|
+
* @example
|
|
76
|
+
* const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);
|
|
77
|
+
* ev.getLamnatzeachLetter(); // 'ה' (day 49, last letter of verse 5)
|
|
78
|
+
*/
|
|
79
|
+
getLamnatzeachLetter(): string;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the word from the Ana BeKoach prayer (אָנָּא בְּכֹחַ) corresponding
|
|
82
|
+
* to this Omer day. Ana BeKoach is a 42-word Kabbalistic prayer whose initial
|
|
83
|
+
* letters spell out the 42-letter name of God. The prayer has 7 verses of
|
|
84
|
+
* 6 words each; the 7th entry of each group is the abbreviation of the acrostic
|
|
85
|
+
* letters for that verse (e.g. `אב״ג ית״ץ` for verse 1). Together the 49
|
|
86
|
+
* entries (7 verses × 7 entries) align with the 49 days of the Omer, connecting
|
|
87
|
+
* each day to one of the lower seven Sefirot within a Sefirah.
|
|
88
|
+
* @returns a Hebrew word or verse-abbreviation string from Ana BeKoach
|
|
89
|
+
* @example
|
|
90
|
+
* const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);
|
|
91
|
+
* ev.getAnaBekoachWord(); // 'אָנָּא' (day 1, first word of verse 1)
|
|
92
|
+
* @example
|
|
93
|
+
* const ev = new OmerEvent(new HDate(22, 'Nisan', 5785), 7);
|
|
94
|
+
* ev.getAnaBekoachWord(); // 'אב״ג ית״ץ' (day 7, acrostic abbreviation for verse 1)
|
|
95
|
+
* @example
|
|
96
|
+
* const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);
|
|
97
|
+
* ev.getAnaBekoachWord(); // 'שק״ו צי״ת' (day 49, acrostic abbreviation for verse 7)
|
|
98
|
+
*/
|
|
99
|
+
getAnaBekoachWord(): string;
|
|
52
100
|
}
|
package/dist/src/omer.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Locale, gematriya } from '@hebcal/hdate';
|
|
2
2
|
import { Event, flags } from './event';
|
|
3
3
|
import './locale'; // Adds Hebrew and Ashkenazic translations
|
|
4
|
+
import sefira from './sefira.json';
|
|
4
5
|
const sefirot = {
|
|
5
6
|
en: {
|
|
6
7
|
infix: 'within ',
|
|
@@ -183,6 +184,10 @@ function omerTodayIsHe(omerDay) {
|
|
|
183
184
|
str += 'לָעֽוֹמֶר';
|
|
184
185
|
return str.normalize();
|
|
185
186
|
}
|
|
187
|
+
const anaBekoach = sefira.anaBekoach;
|
|
188
|
+
const ps67lines = sefira.ps67lines;
|
|
189
|
+
const lamnatzeach = ps67lines.flatMap((x) => x.split(/[ ־]/));
|
|
190
|
+
const lamnatzeachLetters = sefira.lamnatzeachLetters.split('');
|
|
186
191
|
/** Represents a day 1-49 of counting the Omer from Pesach to Shavuot */
|
|
187
192
|
export class OmerEvent extends Event {
|
|
188
193
|
weekNumber;
|
|
@@ -297,9 +302,63 @@ export class OmerEvent extends Event {
|
|
|
297
302
|
}
|
|
298
303
|
url() {
|
|
299
304
|
const year = this.getDate().getFullYear();
|
|
300
|
-
if (year
|
|
305
|
+
if (year <= 4000 || year > 6759) {
|
|
301
306
|
return undefined;
|
|
302
307
|
}
|
|
303
308
|
return `https://www.hebcal.com/omer/${year}/${this.omer}`;
|
|
304
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* Returns the word from Psalm 67 (לַמְנַצֵּחַ, "Lamnatzeach") corresponding
|
|
312
|
+
* to this Omer day. Psalm 67 contains 49 words (excluding its opening verse),
|
|
313
|
+
* one for each day of the Omer. The words are taken from verses 2–8, split on
|
|
314
|
+
* spaces and maqef (־).
|
|
315
|
+
* @returns a Hebrew word from Psalm 67
|
|
316
|
+
* @example
|
|
317
|
+
* const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);
|
|
318
|
+
* ev.getLamnatzeachWord(); // 'אֱלֹהִים' (day 1, first word of verse 2)
|
|
319
|
+
* @example
|
|
320
|
+
* const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);
|
|
321
|
+
* ev.getLamnatzeachWord(); // 'אָרֶץ' (day 49, last word of verse 8)
|
|
322
|
+
*/
|
|
323
|
+
getLamnatzeachWord() {
|
|
324
|
+
return lamnatzeach[this.omer - 1];
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Returns the letter from verse 5 of Psalm 67 corresponding to this Omer day.
|
|
328
|
+
* Verse 5 (יִשְׂמְחוּ וִירַנְּנוּ לְאֻמִּים…) contains exactly 49 letters,
|
|
329
|
+
* one for each day of the Omer, and is used as a Kabbalistic meditation during
|
|
330
|
+
* the counting.
|
|
331
|
+
* @returns a single Hebrew letter from verse 5 of Psalm 67
|
|
332
|
+
* @example
|
|
333
|
+
* const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);
|
|
334
|
+
* ev.getLamnatzeachLetter(); // 'י' (day 1, first letter of verse 5)
|
|
335
|
+
* @example
|
|
336
|
+
* const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);
|
|
337
|
+
* ev.getLamnatzeachLetter(); // 'ה' (day 49, last letter of verse 5)
|
|
338
|
+
*/
|
|
339
|
+
getLamnatzeachLetter() {
|
|
340
|
+
return lamnatzeachLetters[this.omer - 1];
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Returns the word from the Ana BeKoach prayer (אָנָּא בְּכֹחַ) corresponding
|
|
344
|
+
* to this Omer day. Ana BeKoach is a 42-word Kabbalistic prayer whose initial
|
|
345
|
+
* letters spell out the 42-letter name of God. The prayer has 7 verses of
|
|
346
|
+
* 6 words each; the 7th entry of each group is the abbreviation of the acrostic
|
|
347
|
+
* letters for that verse (e.g. `אב״ג ית״ץ` for verse 1). Together the 49
|
|
348
|
+
* entries (7 verses × 7 entries) align with the 49 days of the Omer, connecting
|
|
349
|
+
* each day to one of the lower seven Sefirot within a Sefirah.
|
|
350
|
+
* @returns a Hebrew word or verse-abbreviation string from Ana BeKoach
|
|
351
|
+
* @example
|
|
352
|
+
* const ev = new OmerEvent(new HDate(16, 'Nisan', 5785), 1);
|
|
353
|
+
* ev.getAnaBekoachWord(); // 'אָנָּא' (day 1, first word of verse 1)
|
|
354
|
+
* @example
|
|
355
|
+
* const ev = new OmerEvent(new HDate(22, 'Nisan', 5785), 7);
|
|
356
|
+
* ev.getAnaBekoachWord(); // 'אב״ג ית״ץ' (day 7, acrostic abbreviation for verse 1)
|
|
357
|
+
* @example
|
|
358
|
+
* const ev = new OmerEvent(new HDate(3, 'Sivan', 5785), 49);
|
|
359
|
+
* ev.getAnaBekoachWord(); // 'שק״ו צי״ת' (day 49, acrostic abbreviation for verse 7)
|
|
360
|
+
*/
|
|
361
|
+
getAnaBekoachWord() {
|
|
362
|
+
return anaBekoach[this.omer - 1].normalize();
|
|
363
|
+
}
|
|
305
364
|
}
|
package/dist/src/pkgVersion.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
2
|
-
export declare const version = "6.
|
|
2
|
+
export declare const version = "6.3.1";
|
package/dist/src/pkgVersion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
2
|
-
export const version = '6.
|
|
2
|
+
export const version = '6.3.1';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ps67lines": [
|
|
3
|
+
"אֱלֹהִים יְחָנֵּנוּ וִיבָרְכֵנוּ יָאֵר־פָּנָיו אִתָּנוּ סֶלָה",
|
|
4
|
+
"לָדַעַת בָּאָרֶץ דַּרְכֶּךָ בְּכָל־גּוֹיִם יְשׁוּעָתֶךָ",
|
|
5
|
+
"יוֹדוּךָ עַמִּים אֱלֹהִים יוֹדוּךָ עַמִּים כֻּלָּם",
|
|
6
|
+
"יִשְׂמְחוּ וִירַנְּנוּ לְאֻמִּים כִּי־תִשְׁפֹּט עַמִּים מִישׁוֹר וּלְאֻמִּים בָּאָרֶץ תַּנחֵם סֶלָה",
|
|
7
|
+
"יוֹדוּךָ עַמִּים אֱלֹהִים יוֹדוּךָ עַמִּים כֻּלָּם",
|
|
8
|
+
"אֶרֶץ נָתְנָה יְבוּלָהּ יְבָרְכֵנוּ אֱלֹהִים אֱלֹהֵינוּ",
|
|
9
|
+
"יְבָרְכֵנוּ אֱלֹהִים וְיִירְאוּ אוֹתוֹ כָּל־אַפְסֵי־אָרֶץ"
|
|
10
|
+
],
|
|
11
|
+
"lamnatzeachLetters": "ישמחווירננולאמיםכיתשפוטעמיםמישורולאמיםבארץתנחםסלה",
|
|
12
|
+
"anaBekoach": [
|
|
13
|
+
"אָנָּא",
|
|
14
|
+
"בְּכֹחַ",
|
|
15
|
+
"גְּדֻלַּת",
|
|
16
|
+
"יְמִינְךָ",
|
|
17
|
+
"תַּתִּיר",
|
|
18
|
+
"צְרוּרָה",
|
|
19
|
+
"אב״ג ית״ץ",
|
|
20
|
+
"קַבֵּל",
|
|
21
|
+
"רִנַּת",
|
|
22
|
+
"עַמְּךָ",
|
|
23
|
+
"שַׂגְּבֵנוּ",
|
|
24
|
+
"טַהֲרֵנוּ",
|
|
25
|
+
"נוֹרָא",
|
|
26
|
+
"קר״ע שט״ן",
|
|
27
|
+
"נָא",
|
|
28
|
+
"גִבּוֹר",
|
|
29
|
+
"דּוֹרְשֵׁי",
|
|
30
|
+
"יִחוּדְךָ",
|
|
31
|
+
"כְּבָבַת",
|
|
32
|
+
"שָׁמְרֵם",
|
|
33
|
+
"נג״ד יכ״ש",
|
|
34
|
+
"בָּרְכֵם",
|
|
35
|
+
"טַהֲרֵם",
|
|
36
|
+
"רַחֲמֵי",
|
|
37
|
+
"צִדְקָתְךָ",
|
|
38
|
+
"תָּמִיד",
|
|
39
|
+
"גָּמְלֵם",
|
|
40
|
+
"בט״ר צת״ג",
|
|
41
|
+
"חֲסִין",
|
|
42
|
+
"קָדוֹשׁ",
|
|
43
|
+
"בְּרֹב",
|
|
44
|
+
"טוּבְךָ",
|
|
45
|
+
"נַהֵל",
|
|
46
|
+
"עֲדָתֶךָ",
|
|
47
|
+
"חק״ב תנ״ע",
|
|
48
|
+
"יָחִיד",
|
|
49
|
+
"גֵּאֶה",
|
|
50
|
+
"לְעַמְּךָ",
|
|
51
|
+
"פְּנֵה",
|
|
52
|
+
"זוֹכְרֵי",
|
|
53
|
+
"קְדֻשָּׁתֶךָ",
|
|
54
|
+
"יג״ל פז״ק",
|
|
55
|
+
"שַׁוְעָתֵנוּ",
|
|
56
|
+
"קַבֵּל",
|
|
57
|
+
"וּשְׁמַע",
|
|
58
|
+
"צַעֲקָתֵנוּ",
|
|
59
|
+
"יוֹדֵעַ",
|
|
60
|
+
"תַּעֲלוּמוֹת",
|
|
61
|
+
"שק״ו צי״ת"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
@@ -152,6 +152,20 @@ export declare const holidayDesc: {
|
|
|
152
152
|
readonly YOM_KIPPUR: "Yom Kippur";
|
|
153
153
|
/** Yom Yerushalayim */
|
|
154
154
|
readonly YOM_YERUSHALAYIM: "Yom Yerushalayim";
|
|
155
|
+
/** Candle lighting */
|
|
156
|
+
readonly CANDLE_LIGHTING: "Candle lighting";
|
|
157
|
+
/** Havdalah */
|
|
158
|
+
readonly HAVDALAH: "Havdalah";
|
|
159
|
+
/** Fast begins */
|
|
160
|
+
readonly FAST_BEGINS: "Fast begins";
|
|
161
|
+
/** Fast ends */
|
|
162
|
+
readonly FAST_ENDS: "Fast ends";
|
|
163
|
+
/** Biur Chametz */
|
|
164
|
+
readonly BIUR_CHAMETZ: "Biur Chametz";
|
|
165
|
+
/** Finish eating chametz */
|
|
166
|
+
readonly SOF_ZMAN_ACHILAT_CHAMETZ: "Finish eating chametz";
|
|
167
|
+
/** Yizkor */
|
|
168
|
+
readonly YIZKOR: "Yizkor";
|
|
155
169
|
};
|
|
156
170
|
export interface Holiday {
|
|
157
171
|
mm: number;
|
|
@@ -71,6 +71,13 @@ const SIGD = 'Sigd';
|
|
|
71
71
|
const YOM_HAALIYAH = 'Yom HaAliyah';
|
|
72
72
|
const YOM_HAALIYAH_SCHOOL_OBSERVANCE = 'Yom HaAliyah School Observance';
|
|
73
73
|
const HEBREW_LANGUAGE_DAY = 'Hebrew Language Day';
|
|
74
|
+
const CANDLE_LIGHTING = 'Candle lighting';
|
|
75
|
+
const HAVDALAH = 'Havdalah';
|
|
76
|
+
const FAST_BEGINS = 'Fast begins';
|
|
77
|
+
const FAST_ENDS = 'Fast ends';
|
|
78
|
+
const BIUR_CHAMETZ = 'Biur Chametz';
|
|
79
|
+
const SOF_ZMAN_ACHILAT_CHAMETZ = 'Finish eating chametz';
|
|
80
|
+
const YIZKOR = 'Yizkor';
|
|
74
81
|
/**
|
|
75
82
|
* Transliterated names of holidays, used by `Event.getDesc()`
|
|
76
83
|
* @readonly
|
|
@@ -225,6 +232,20 @@ export const holidayDesc = {
|
|
|
225
232
|
YOM_KIPPUR,
|
|
226
233
|
/** Yom Yerushalayim */
|
|
227
234
|
YOM_YERUSHALAYIM,
|
|
235
|
+
/** Candle lighting */
|
|
236
|
+
CANDLE_LIGHTING,
|
|
237
|
+
/** Havdalah */
|
|
238
|
+
HAVDALAH,
|
|
239
|
+
/** Fast begins */
|
|
240
|
+
FAST_BEGINS,
|
|
241
|
+
/** Fast ends */
|
|
242
|
+
FAST_ENDS,
|
|
243
|
+
/** Biur Chametz */
|
|
244
|
+
BIUR_CHAMETZ,
|
|
245
|
+
/** Finish eating chametz */
|
|
246
|
+
SOF_ZMAN_ACHILAT_CHAMETZ,
|
|
247
|
+
/** Yizkor */
|
|
248
|
+
YIZKOR,
|
|
228
249
|
};
|
|
229
250
|
export const staticHolidays = [
|
|
230
251
|
{
|
package/dist/src/zmanim.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { HDate } from '@hebcal/hdate';
|
|
|
28
28
|
* const timeStr = Zmanim.formatISOWithTimeZone(tzid, candleLighting);
|
|
29
29
|
*/
|
|
30
30
|
export declare class Zmanim {
|
|
31
|
+
private readonly hdate;
|
|
31
32
|
private readonly plainDate;
|
|
32
33
|
private readonly gloc;
|
|
33
34
|
private readonly noaa;
|
|
@@ -159,6 +160,18 @@ export declare class Zmanim {
|
|
|
159
160
|
* If elevation is enabled, this function will include elevation in the calculation.
|
|
160
161
|
*/
|
|
161
162
|
sofZmanTfilla(): Date;
|
|
163
|
+
/**
|
|
164
|
+
* This method returns the latest time for burning _chametz_ on _Erev Pesach_ according to the opinion
|
|
165
|
+
* of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>. This time is 5 hours into the day based on the
|
|
166
|
+
* opinion of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> that the day is calculated from
|
|
167
|
+
* sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea
|
|
168
|
+
* level sunrise}.
|
|
169
|
+
* @return the <code>Date</code> of the latest time for burning _chametz_ on _Erev Pesach_. If it is not
|
|
170
|
+
* _erev Pesach_ or the calculation can't be computed such as in the Arctic Circle where there is at least
|
|
171
|
+
* one day a year where the sun does not rise, and one where it does not set, a <code>null</code> will be
|
|
172
|
+
* returned.
|
|
173
|
+
*/
|
|
174
|
+
sofZmanBiurChametzGRA(): Date;
|
|
162
175
|
/**
|
|
163
176
|
* Returns an array with alot (Date) and ms in hour (number)
|
|
164
177
|
* @private
|
|
@@ -316,7 +329,6 @@ export declare class Zmanim {
|
|
|
316
329
|
* returned.
|
|
317
330
|
*/
|
|
318
331
|
private getMoladBasedTime;
|
|
319
|
-
private getHDate;
|
|
320
332
|
/**
|
|
321
333
|
* Returns the latest time of Kiddush Levana according to the <a
|
|
322
334
|
* href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as
|
|
@@ -458,9 +470,9 @@ export declare class Zmanim {
|
|
|
458
470
|
* before {@link getSunrise() sunrise}.
|
|
459
471
|
*
|
|
460
472
|
* The zenith of 16.9° below is based on the calculation that the time between dawn
|
|
461
|
-
* and
|
|
473
|
+
* and _netz amiti_ (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes
|
|
462
474
|
* a mil (<a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a> and others). The sun's position at 72
|
|
463
|
-
* minutes before {@link getSunriseBaalHatanya
|
|
475
|
+
* minutes before {@link getSunriseBaalHatanya _netz amiti_ (sunrise)} in Jerusalem <a href=
|
|
464
476
|
* "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a> is
|
|
465
477
|
* 16.9° below {@link GEOMETRIC_ZENITH geometric zenith}.
|
|
466
478
|
*
|
package/dist/src/zmanim.js
CHANGED
|
@@ -13,13 +13,6 @@ function zdtToDate(zdt) {
|
|
|
13
13
|
res.setMilliseconds(0);
|
|
14
14
|
return res;
|
|
15
15
|
}
|
|
16
|
-
function getDate(date) {
|
|
17
|
-
if (isDate(date))
|
|
18
|
-
return date;
|
|
19
|
-
if (HDate.isHDate(date))
|
|
20
|
-
return date.greg();
|
|
21
|
-
throw new TypeError(`invalid date: ${date}`);
|
|
22
|
-
}
|
|
23
16
|
/**
|
|
24
17
|
* The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°
|
|
25
18
|
*/
|
|
@@ -60,6 +53,7 @@ const ZENITH_1_POINT_583 = GEOMETRIC_ZENITH + 1.583;
|
|
|
60
53
|
* const timeStr = Zmanim.formatISOWithTimeZone(tzid, candleLighting);
|
|
61
54
|
*/
|
|
62
55
|
export class Zmanim {
|
|
56
|
+
hdate;
|
|
63
57
|
plainDate;
|
|
64
58
|
gloc;
|
|
65
59
|
noaa;
|
|
@@ -76,7 +70,8 @@ export class Zmanim {
|
|
|
76
70
|
* These zmanim intentionally do not support elevation adjustment.
|
|
77
71
|
*/
|
|
78
72
|
constructor(gloc, date, useElevation) {
|
|
79
|
-
|
|
73
|
+
this.hdate = new HDate(date);
|
|
74
|
+
const dt = isDate(date) ? date : this.hdate.greg();
|
|
80
75
|
this.plainDate = Temporal.PlainDate.from({
|
|
81
76
|
year: dt.getFullYear(),
|
|
82
77
|
month: dt.getMonth() + 1,
|
|
@@ -283,6 +278,20 @@ export class Zmanim {
|
|
|
283
278
|
// Gra
|
|
284
279
|
return this.getShaahZmanisBasedZman(4);
|
|
285
280
|
}
|
|
281
|
+
/**
|
|
282
|
+
* This method returns the latest time for burning _chametz_ on _Erev Pesach_ according to the opinion
|
|
283
|
+
* of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>. This time is 5 hours into the day based on the
|
|
284
|
+
* opinion of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> that the day is calculated from
|
|
285
|
+
* sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea
|
|
286
|
+
* level sunrise}.
|
|
287
|
+
* @return the <code>Date</code> of the latest time for burning _chametz_ on _Erev Pesach_. If it is not
|
|
288
|
+
* _erev Pesach_ or the calculation can't be computed such as in the Arctic Circle where there is at least
|
|
289
|
+
* one day a year where the sun does not rise, and one where it does not set, a <code>null</code> will be
|
|
290
|
+
* returned.
|
|
291
|
+
*/
|
|
292
|
+
sofZmanBiurChametzGRA() {
|
|
293
|
+
return this.getShaahZmanisBasedZman(5);
|
|
294
|
+
}
|
|
286
295
|
/**
|
|
287
296
|
* Returns an array with alot (Date) and ms in hour (number)
|
|
288
297
|
* @private
|
|
@@ -537,10 +546,6 @@ export class Zmanim {
|
|
|
537
546
|
// It's the night, the provided time is valid
|
|
538
547
|
return moladBasedTime.withTimeZone(this.gloc.getTimeZone());
|
|
539
548
|
}
|
|
540
|
-
getHDate() {
|
|
541
|
-
const dt = new Date(this.plainDate.year, this.plainDate.month - 1, this.plainDate.day);
|
|
542
|
-
return new HDate(dt);
|
|
543
|
-
}
|
|
544
549
|
/**
|
|
545
550
|
* Returns the latest time of Kiddush Levana according to the <a
|
|
546
551
|
* href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as
|
|
@@ -562,7 +567,7 @@ export class Zmanim {
|
|
|
562
567
|
* day, a `null` will be returned.
|
|
563
568
|
*/
|
|
564
569
|
getSofZmanKidushLevanaBetweenMoldos(alos = null, tzais = null) {
|
|
565
|
-
const hd = this.
|
|
570
|
+
const hd = this.hdate;
|
|
566
571
|
// Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French
|
|
567
572
|
// Polynesia on Dec 2027 when kiddush Levana 3 days can be said on _Rosh Chodesh_, the sof zman Kiddush Levana
|
|
568
573
|
// will be on the 12th of the Teves. In the case of Anadyr, Russia on Jan, 2071, sof zman Kiddush Levana between the
|
|
@@ -591,7 +596,7 @@ export class Zmanim {
|
|
|
591
596
|
*
|
|
592
597
|
*/
|
|
593
598
|
getSofZmanKidushLevana15Days(alos = null, tzais = null) {
|
|
594
|
-
const hd = this.
|
|
599
|
+
const hd = this.hdate;
|
|
595
600
|
// Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in
|
|
596
601
|
// French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on _Rosh Chodesh_, the sof zman Kiddush
|
|
597
602
|
// Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will
|
|
@@ -623,7 +628,7 @@ export class Zmanim {
|
|
|
623
628
|
* `null` will be returned.
|
|
624
629
|
*/
|
|
625
630
|
getTchilasZmanKidushLevana3Days(alos = null, tzais = null) {
|
|
626
|
-
const hd = this.
|
|
631
|
+
const hd = this.hdate;
|
|
627
632
|
// Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for
|
|
628
633
|
// the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening
|
|
629
634
|
// of the 30th, the second night of Rosh Chodesh. The 3rd day after the _molad_ will be on the 4th of the month.
|
|
@@ -653,7 +658,7 @@ export class Zmanim {
|
|
|
653
658
|
*
|
|
654
659
|
*/
|
|
655
660
|
getZmanMolad() {
|
|
656
|
-
const hd = this.
|
|
661
|
+
const hd = this.hdate;
|
|
657
662
|
// Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa
|
|
658
663
|
// Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on
|
|
659
664
|
// Jan 2071, the molad will be on the 2nd day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).
|
|
@@ -679,7 +684,7 @@ export class Zmanim {
|
|
|
679
684
|
* will not occur on this day, a `null` will be returned.
|
|
680
685
|
*/
|
|
681
686
|
getTchilasZmanKidushLevana7Days(alos = null, tzais = null) {
|
|
682
|
-
const hd = this.
|
|
687
|
+
const hd = this.hdate;
|
|
683
688
|
// Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for
|
|
684
689
|
// the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening
|
|
685
690
|
// of the 30th, the second night of Rosh Chodesh), the 7th day after the molad will be on the 4th of the month.
|
|
@@ -757,9 +762,9 @@ export class Zmanim {
|
|
|
757
762
|
* before {@link getSunrise() sunrise}.
|
|
758
763
|
*
|
|
759
764
|
* The zenith of 16.9° below is based on the calculation that the time between dawn
|
|
760
|
-
* and
|
|
765
|
+
* and _netz amiti_ (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes
|
|
761
766
|
* a mil (<a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a> and others). The sun's position at 72
|
|
762
|
-
* minutes before {@link getSunriseBaalHatanya
|
|
767
|
+
* minutes before {@link getSunriseBaalHatanya _netz amiti_ (sunrise)} in Jerusalem <a href=
|
|
763
768
|
* "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a> is
|
|
764
769
|
* 16.9° below {@link GEOMETRIC_ZENITH geometric zenith}.
|
|
765
770
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.1",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Eyal Schachter (https://github.com/Scimonster)",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"license": "GPL-2.0",
|
|
70
70
|
"devDependencies": {
|
|
71
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
71
72
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
72
73
|
"@rollup/plugin-terser": "^1.0.0",
|
|
73
74
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
@@ -76,11 +77,11 @@
|
|
|
76
77
|
"gettext-parser": "^9.0.2",
|
|
77
78
|
"gts": "^7.0.0",
|
|
78
79
|
"pretty-bytes": "^7.1.0",
|
|
79
|
-
"rollup": "^4.60.
|
|
80
|
+
"rollup": "^4.60.2",
|
|
80
81
|
"rollup-plugin-bundle-size": "^1.0.3",
|
|
81
82
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
82
|
-
"typedoc": "^0.28.
|
|
83
|
-
"typescript": "^6.0.
|
|
83
|
+
"typedoc": "^0.28.19",
|
|
84
|
+
"typescript": "^6.0.3",
|
|
84
85
|
"vitest": "^4.1.4"
|
|
85
86
|
},
|
|
86
87
|
"dependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare function jumpToCode(event: any): void;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
var jumpToCode = (function init() {
|
|
4
|
-
// Classes of code we would like to highlight in the file view
|
|
5
|
-
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
|
6
|
-
// Elements to highlight in the file listing view
|
|
7
|
-
var fileListingElements = ['td.pct.low'];
|
|
8
|
-
// We don't want to select elements that are direct descendants of another match
|
|
9
|
-
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
|
10
|
-
// Selector that finds elements on the page to which we can jump
|
|
11
|
-
var selector = fileListingElements.join(', ') +
|
|
12
|
-
', ' +
|
|
13
|
-
notSelector +
|
|
14
|
-
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
15
|
-
// The NodeList of matching elements
|
|
16
|
-
var missingCoverageElements = document.querySelectorAll(selector);
|
|
17
|
-
var currentIndex;
|
|
18
|
-
function toggleClass(index) {
|
|
19
|
-
missingCoverageElements
|
|
20
|
-
.item(currentIndex)
|
|
21
|
-
.classList.remove('highlighted');
|
|
22
|
-
missingCoverageElements.item(index).classList.add('highlighted');
|
|
23
|
-
}
|
|
24
|
-
function makeCurrent(index) {
|
|
25
|
-
toggleClass(index);
|
|
26
|
-
currentIndex = index;
|
|
27
|
-
missingCoverageElements.item(index).scrollIntoView({
|
|
28
|
-
behavior: 'smooth',
|
|
29
|
-
block: 'center',
|
|
30
|
-
inline: 'center'
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function goToPrevious() {
|
|
34
|
-
var nextIndex = 0;
|
|
35
|
-
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
|
36
|
-
nextIndex = missingCoverageElements.length - 1;
|
|
37
|
-
}
|
|
38
|
-
else if (missingCoverageElements.length > 1) {
|
|
39
|
-
nextIndex = currentIndex - 1;
|
|
40
|
-
}
|
|
41
|
-
makeCurrent(nextIndex);
|
|
42
|
-
}
|
|
43
|
-
function goToNext() {
|
|
44
|
-
var nextIndex = 0;
|
|
45
|
-
if (typeof currentIndex === 'number' &&
|
|
46
|
-
currentIndex < missingCoverageElements.length - 1) {
|
|
47
|
-
nextIndex = currentIndex + 1;
|
|
48
|
-
}
|
|
49
|
-
makeCurrent(nextIndex);
|
|
50
|
-
}
|
|
51
|
-
return function jump(event) {
|
|
52
|
-
if (document.getElementById('fileSearch') === document.activeElement &&
|
|
53
|
-
document.activeElement != null) {
|
|
54
|
-
// if we're currently focused on the search input, we don't want to navigate
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
switch (event.which) {
|
|
58
|
-
case 78: // n
|
|
59
|
-
case 74: // j
|
|
60
|
-
goToNext();
|
|
61
|
-
break;
|
|
62
|
-
case 66: // b
|
|
63
|
-
case 75: // k
|
|
64
|
-
case 80: // p
|
|
65
|
-
goToPrevious();
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
})();
|
|
70
|
-
window.addEventListener('keydown', jumpToCode);
|
|
File without changes
|