@hebcal/core 6.0.8 → 6.1.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/dist/DailyLearning.d.ts +1 -1
- package/dist/HolidayEvent.d.ts +1 -0
- package/dist/ashkenazi.po.d.ts +14 -2
- package/dist/bundle.js +2085 -1535
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +17 -19
- package/dist/bundle.min.js.map +1 -1
- package/dist/coverage/block-navigation.d.ts +1 -0
- package/dist/coverage/block-navigation.js +70 -0
- package/dist/coverage/prettify.d.ts +0 -0
- package/dist/coverage/prettify.js +477 -0
- package/dist/coverage/sorter.d.ts +1 -0
- package/dist/coverage/sorter.js +176 -0
- package/dist/eslint.config.d.mts +83 -0
- package/dist/eslint.config.mjs +28 -0
- package/dist/esm/DailyLearning.d.ts +1 -1
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/DailyLearning.js.map +1 -1
- package/dist/esm/HebrewDateEvent.js +5 -5
- package/dist/esm/HebrewDateEvent.js.map +1 -1
- package/dist/esm/HolidayEvent.d.ts +1 -0
- package/dist/esm/HolidayEvent.js +17 -1
- package/dist/esm/HolidayEvent.js.map +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +2 -1
- package/dist/esm/MevarchimChodeshEvent.js.map +1 -1
- package/dist/esm/ParshaEvent.js +2 -1
- package/dist/esm/ParshaEvent.js.map +1 -1
- package/dist/esm/TimedEvent.js +9 -3
- package/dist/esm/TimedEvent.js.map +1 -1
- package/dist/esm/YomKippurKatanEvent.js +2 -1
- package/dist/esm/YomKippurKatanEvent.js.map +1 -1
- package/dist/esm/ashkenazi.po.d.ts +14 -2
- package/dist/esm/ashkenazi.po.js +2 -2
- package/dist/esm/ashkenazi.po.js.map +1 -1
- package/dist/esm/calendar.js +6 -8
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.js +11 -3
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/event.js +18 -1
- package/dist/esm/event.js.map +1 -1
- package/dist/esm/getStartAndEnd.js +2 -2
- package/dist/esm/getStartAndEnd.js.map +1 -1
- package/dist/esm/hallel.js +1 -1
- package/dist/esm/he-x-NoNikud.po.js +1 -1
- package/dist/esm/he.po.d.ts +20 -0
- package/dist/esm/he.po.js +2 -2
- package/dist/esm/he.po.js.map +1 -1
- package/dist/esm/hebcal.js +3 -3
- package/dist/esm/hebcal.js.map +1 -1
- package/dist/esm/holidays.js +3 -3
- package/dist/esm/holidays.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isAssurBemlacha.js +1 -1
- package/dist/esm/locale.d.ts +1 -2
- package/dist/esm/locale.js +1 -1
- package/dist/esm/locale.js.map +1 -1
- package/dist/esm/location.js +7 -1
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.d.ts +71 -1
- package/dist/esm/molad.js +113 -12
- package/dist/esm/molad.js.map +1 -1
- package/dist/esm/moladBase.d.ts +15 -0
- package/dist/esm/moladBase.js +83 -0
- package/dist/esm/moladBase.js.map +1 -0
- package/dist/esm/moladDate.d.ts +12 -0
- package/dist/esm/moladDate.js +63 -0
- package/dist/esm/moladDate.js.map +1 -0
- package/dist/esm/omer.d.ts +0 -1
- package/dist/esm/omer.js +7 -4
- package/dist/esm/omer.js.map +1 -1
- package/dist/esm/parshaName.js +2 -2
- package/dist/esm/parshaName.js.map +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 +5 -6
- package/dist/esm/reformatTimeStr.js.map +1 -1
- package/dist/esm/sedra.js +13 -7
- package/dist/esm/sedra.js.map +1 -1
- package/dist/esm/staticHolidays.js +1 -1
- package/dist/esm/tachanun.js +4 -4
- package/dist/esm/tachanun.js.map +1 -1
- package/dist/esm/zmanim.d.ts +114 -1
- package/dist/esm/zmanim.js +242 -8
- package/dist/esm/zmanim.js.map +1 -1
- package/dist/he.po.d.ts +20 -0
- package/dist/index.d.ts +2 -0
- package/dist/locale.d.ts +1 -2
- package/dist/molad.d.ts +71 -1
- package/dist/moladBase.d.ts +15 -0
- package/dist/moladDate.d.ts +12 -0
- package/dist/omer.d.ts +0 -1
- package/dist/pkgVersion.d.ts +1 -1
- package/dist/po2json.js +3 -4
- package/dist/src/DailyLearning.d.ts +1 -1
- package/dist/src/HebrewDateEvent.js +4 -4
- package/dist/src/HolidayEvent.d.ts +1 -0
- package/dist/src/HolidayEvent.js +16 -0
- package/dist/src/MevarchimChodeshEvent.js +1 -0
- package/dist/src/ParshaEvent.js +1 -0
- package/dist/src/TimedEvent.js +8 -2
- package/dist/src/YomKippurKatanEvent.js +1 -0
- package/dist/src/ashkenazi.po.d.ts +14 -2
- package/dist/src/ashkenazi.po.js +1 -1
- package/dist/src/calendar.js +5 -7
- package/dist/src/candles.js +10 -2
- package/dist/src/event.js +17 -0
- package/dist/src/getStartAndEnd.js +1 -1
- package/dist/src/he.po.d.ts +20 -0
- package/dist/src/he.po.js +1 -1
- package/dist/src/hebcal.js +2 -2
- package/dist/src/holidays.js +2 -2
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/locale.d.ts +1 -2
- package/dist/src/locale.js +1 -1
- package/dist/src/location.js +6 -0
- package/dist/src/molad.d.ts +71 -1
- package/dist/src/molad.js +112 -11
- package/dist/src/moladBase.d.ts +15 -0
- package/dist/src/moladBase.js +78 -0
- package/dist/src/moladDate.d.ts +12 -0
- package/dist/src/moladDate.js +58 -0
- package/dist/src/omer.d.ts +0 -1
- package/dist/src/omer.js +6 -3
- package/dist/src/parshaName.js +1 -1
- package/dist/src/pkgVersion.d.ts +1 -1
- package/dist/src/pkgVersion.js +1 -1
- package/dist/src/reformatTimeStr.js +4 -5
- package/dist/src/sedra.js +12 -6
- package/dist/src/tachanun.js +3 -3
- package/dist/src/zmanim.d.ts +114 -1
- package/dist/src/zmanim.js +240 -6
- package/dist/version.js +1 -2
- package/dist/zmanim.d.ts +114 -1
- package/package.json +17 -19
- package/dist/size-demo/dist/getHoliday.d.ts +0 -1944
- package/dist/size-demo/dist/getHoliday.js +0 -3712
- package/dist/size-demo/dist/parshiyot.js +0 -10662
- package/dist/size-demo/dist/sedra.d.ts +0 -1411
- package/dist/size-demo/dist/sedra.js +0 -2359
- package/dist/size-demo/dist/tachanun.d.ts +0 -1015
- package/dist/size-demo/dist/tachanun.js +0 -1755
- package/dist/size-demo/getHoliday.d.ts +0 -1
- package/dist/size-demo/getHoliday.js +0 -3
- package/dist/size-demo/parshiyot.d.ts +0 -1
- package/dist/size-demo/parshiyot.js +0 -11
- package/dist/size-demo/rollup.config.d.ts +0 -3
- package/dist/size-demo/rollup.config.js +0 -47
- package/dist/size-demo/sedra.d.ts +0 -1
- package/dist/size-demo/sedra.js +0 -3
- package/dist/size-demo/tachanun.d.ts +0 -1
- package/dist/size-demo/tachanun.js +0 -3
package/dist/src/calendar.js
CHANGED
|
@@ -123,7 +123,7 @@ import { Location } from './location';
|
|
|
123
123
|
* }
|
|
124
124
|
*/
|
|
125
125
|
export function calendar(options = {}) {
|
|
126
|
-
options =
|
|
126
|
+
options = { ...options }; // so we can modify freely
|
|
127
127
|
checkCandleOptions(options);
|
|
128
128
|
const location = (options.location = options.location || defaultLocation);
|
|
129
129
|
const il = (options.il = options.il || location.getIsrael() || false);
|
|
@@ -326,7 +326,7 @@ const RECOGNIZED_OPTIONS = {
|
|
|
326
326
|
*/
|
|
327
327
|
function warnUnrecognizedOptions(options) {
|
|
328
328
|
for (const k of Object.keys(options)) {
|
|
329
|
-
if (
|
|
329
|
+
if (RECOGNIZED_OPTIONS[k] === undefined &&
|
|
330
330
|
!unrecognizedAlreadyWarned.has(k)) {
|
|
331
331
|
console.warn(`Ignoring unrecognized HebrewCalendar option: ${k}`);
|
|
332
332
|
unrecognizedAlreadyWarned.add(k);
|
|
@@ -383,7 +383,7 @@ function checkCandleOptions(options) {
|
|
|
383
383
|
return;
|
|
384
384
|
}
|
|
385
385
|
const location = options.location;
|
|
386
|
-
if (
|
|
386
|
+
if (location === undefined || !(location instanceof Location)) {
|
|
387
387
|
throw new TypeError('options.candlelighting requires valid options.location');
|
|
388
388
|
}
|
|
389
389
|
if (typeof options.havdalahMins === 'number' &&
|
|
@@ -431,11 +431,10 @@ function overrideIsraelCandleMins(location, min) {
|
|
|
431
431
|
* @private
|
|
432
432
|
*/
|
|
433
433
|
function getMaskFromOptions(options) {
|
|
434
|
-
var _a;
|
|
435
434
|
if (typeof options.mask === 'number') {
|
|
436
435
|
return setOptionsFromMask(options);
|
|
437
436
|
}
|
|
438
|
-
const il = options.il ||
|
|
437
|
+
const il = options.il || options.location?.getIsrael() || false;
|
|
439
438
|
let mask = 0;
|
|
440
439
|
// default options
|
|
441
440
|
if (!options.noHolidays) {
|
|
@@ -602,8 +601,7 @@ function appendHolidayAndRelated(candlesEv, events, ev, options, isFriday, isSat
|
|
|
602
601
|
}
|
|
603
602
|
}
|
|
604
603
|
if ((isMajorFast || (isMinorFast && !options.noMinorFast)) &&
|
|
605
|
-
fastEv
|
|
606
|
-
fastEv.endEvent) {
|
|
604
|
+
fastEv?.endEvent) {
|
|
607
605
|
events.push(fastEv.endEvent);
|
|
608
606
|
}
|
|
609
607
|
return candlesEv;
|
package/dist/src/candles.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
1
|
import { months } from '@hebcal/hdate';
|
|
3
2
|
import { flags } from './event';
|
|
4
3
|
import { ChanukahEvent, HolidayEvent } from './HolidayEvent';
|
|
@@ -13,7 +12,7 @@ export function makeCandleEvent(ev, hd, options, isFriday, isSaturday) {
|
|
|
13
12
|
let havdalahTitle = false;
|
|
14
13
|
let useHavdalahOffset = isSaturday;
|
|
15
14
|
let mask = ev ? ev.getFlags() : LIGHT_CANDLES;
|
|
16
|
-
if (
|
|
15
|
+
if (ev !== undefined) {
|
|
17
16
|
// if linked event && dow == FRI, use Candle lighting time & title
|
|
18
17
|
if (!isFriday) {
|
|
19
18
|
if (mask & (LIGHT_CANDLES_TZEIS | flags.CHANUKAH_CANDLES)) {
|
|
@@ -54,6 +53,12 @@ const FAST_BEGINS = 'Fast begins';
|
|
|
54
53
|
const FAST_ENDS = 'Fast ends';
|
|
55
54
|
/** A fast day also contains a start and end time */
|
|
56
55
|
export class FastDayEvent extends HolidayEvent {
|
|
56
|
+
/** original event */
|
|
57
|
+
linkedEvent;
|
|
58
|
+
/** this will be a "Fast begins" event */
|
|
59
|
+
startEvent;
|
|
60
|
+
/** this will be a "Fast ends" event */
|
|
61
|
+
endEvent;
|
|
57
62
|
constructor(linkedEvent, startEvent, endEvent) {
|
|
58
63
|
super(linkedEvent.getDate(), linkedEvent.getDesc(), linkedEvent.getFlags());
|
|
59
64
|
this.linkedEvent = linkedEvent;
|
|
@@ -135,6 +140,9 @@ function makeTimedEvent(ev, time, desc, options) {
|
|
|
135
140
|
return new TimedEvent(hd, desc, ev.getFlags(), time, location, ev, options);
|
|
136
141
|
}
|
|
137
142
|
export class TimedChanukahEvent extends ChanukahEvent {
|
|
143
|
+
eventTime;
|
|
144
|
+
eventTimeStr;
|
|
145
|
+
location;
|
|
138
146
|
constructor(ev, eventTime, location) {
|
|
139
147
|
super(ev.getDate(), ev.getDesc(), ev.getFlags(), ev.chanukahDay);
|
|
140
148
|
this.eventTime = Zmanim.roundTime(eventTime);
|
package/dist/src/event.js
CHANGED
|
@@ -90,6 +90,23 @@ const flagToCategory = [
|
|
|
90
90
|
* with Sephardic transliterations, use the `render()` method.
|
|
91
91
|
*/
|
|
92
92
|
export class Event {
|
|
93
|
+
/** Hebrew date of this event */
|
|
94
|
+
date;
|
|
95
|
+
/**
|
|
96
|
+
* Untranslated title of this event. Note that these description
|
|
97
|
+
* strings are always in English and will remain stable across releases.
|
|
98
|
+
* To get the title of the event in another language, use the
|
|
99
|
+
* `render()` method.
|
|
100
|
+
*/
|
|
101
|
+
desc;
|
|
102
|
+
/** Bitmask of optional event flags. See {@link flags} */
|
|
103
|
+
mask;
|
|
104
|
+
/** Optional emoji character such as ✡️, 🕯️, 🕎, 🕍, 🌒 */
|
|
105
|
+
emoji;
|
|
106
|
+
/** Optional longer description or memo text */
|
|
107
|
+
memo;
|
|
108
|
+
/** Alarms are used by iCalendar feeds */
|
|
109
|
+
alarm;
|
|
93
110
|
/**
|
|
94
111
|
* Constructs Event
|
|
95
112
|
* @param date Hebrew date event occurs
|
package/dist/src/he.po.d.ts
CHANGED
|
@@ -184,11 +184,31 @@ declare const _default: {
|
|
|
184
184
|
"Ben-Gurion Day": string[];
|
|
185
185
|
"Hebrew Language Day": string[];
|
|
186
186
|
"Birkat Hachamah": string[];
|
|
187
|
+
"Birkat HaChamah": string[];
|
|
187
188
|
"Shushan Purim Katan": string[];
|
|
188
189
|
"Purim Meshulash": string[];
|
|
189
190
|
"Chag HaBanot": string[];
|
|
190
191
|
Molad: string[];
|
|
191
192
|
chalakim: string[];
|
|
193
|
+
"Alot HaShachar": string[];
|
|
194
|
+
Misheyakir: string[];
|
|
195
|
+
"Misheyakir Machmir": string[];
|
|
196
|
+
Sunrise: string[];
|
|
197
|
+
"Kriat Shema, sof zeman": string[];
|
|
198
|
+
"Tefilah, sof zeman": string[];
|
|
199
|
+
"Kriat Shema, sof zeman (MGA)": string[];
|
|
200
|
+
"Kriat Shema, sof zeman (GRA)": string[];
|
|
201
|
+
"Tefilah, sof zeman (MGA)": string[];
|
|
202
|
+
"Tefilah, sof zeman (GRA)": string[];
|
|
203
|
+
"Chatzot HaLailah": string[];
|
|
204
|
+
"Chatzot HaYom": string[];
|
|
205
|
+
"Chatzot hayom": string[];
|
|
206
|
+
"Mincha Gedolah": string[];
|
|
207
|
+
"Mincha Ketanah": string[];
|
|
208
|
+
"Plag HaMincha": string[];
|
|
209
|
+
Sunset: string[];
|
|
210
|
+
"Bein HaShemashot": string[];
|
|
211
|
+
"Tzeit HaKochavim": string[];
|
|
192
212
|
};
|
|
193
213
|
};
|
|
194
214
|
};
|
package/dist/src/he.po.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "he_IL" }, "contexts": { "": { "Shabbat": ["שַׁבָּת"], "Parashat": ["פָּרָשַׁת"], "Achrei Mot": ["אַחֲרֵי מוֹת"], "Balak": ["בָּלָק"], "Bamidbar": ["בְּמִדְבַּר"], "Bechukotai": ["בְּחֻקֹּתַי"], "Beha'alotcha": ["בְּהַעֲלֹתְךָ"], "Behar": ["בְּהַר"], "Bereshit": ["בְּרֵאשִׁית"], "Beshalach": ["בְּשַׁלַּח"], "Bo": ["בֹּא"], "Chayei Sara": ["חַיֵּי שָֹרָה"], "Chukat": ["חֻקַּת"], "Devarim": ["דְּבָרִים"], "Eikev": ["עֵקֶב"], "Emor": ["אֱמוֹר"], "Ha'azinu": ["הַאֲזִינוּ"], "Kedoshim": ["קְדֹשִׁים"], "Ki Tavo": ["כִּי־תָבוֹא"], "Ki Teitzei": ["כִּי־תֵצֵא"], "Ki Tisa": ["כִּי תִשָּׂא"], "Korach": ["קֹרַח"], "Lech-Lecha": ["לֶךְ־לְךָ"], "Masei": ["מַסְעֵי"], "Matot": ["מַטּוֹת"], "Metzora": ["מְצֹרָע"], "Miketz": ["מִקֵּץ"], "Mishpatim": ["מִשְׁפָּטִים"], "Nasso": ["נָשׂא"], "Nitzavim": ["נִצָּבִים"], "Noach": ["נֹחַ"], "Pekudei": ["פְקוּדֵי"], "Pinchas": ["פִּינְחָס"], "Re'eh": ["רְאֵה"], "Sh'lach": ["שְׁלַח־לְךָ"], "Shemot": ["שְׁמוֹת"], "Shmini": ["שְּׁמִינִי"], "Shoftim": ["שׁוֹפְטִים"], "Tazria": ["תַזְרִיעַ"], "Terumah": ["תְּרוּמָה"], "Tetzaveh": ["תְּצַוֶּה"], "Toldot": ["תּוֹלְדוֹת"], "Tzav": ["צַו"], "Vaera": ["וָאֵרָא"], "Vaetchanan": ["וָאֶתְחַנַּן"], "Vayakhel": ["וַיַּקְהֵל"], "Vayechi": ["וַיְחִי"], "Vayeilech": ["וַיֵּלֶךְ"], "Vayera": ["וַיֵּרָא"], "Vayeshev": ["וַיֵּשֶׁב"], "Vayetzei": ["וַיֵּצֵא"], "Vayigash": ["וַיִּגַּשׁ"], "Vayikra": ["וַיִּקְרָא"], "Vayishlach": ["וַיִּשְׁלַח"], "Vezot Haberakhah": ["וְזֹאת הַבְּרָכָה"], "Yitro": ["יִתְרוֹ"], "Asara B'Tevet": ["עֲשָׂרָה בְּטֵבֵת"], "Candle lighting": ["הַדְלָקַת נֵרוֹת"], "Chanukah": ["חֲנוּכָּה"], "Chanukah: 1 Candle": ["חֲנוּכָּה: א׳ נֵר"], "Chanukah: 2 Candles": ["חֲנוּכָּה: ב׳ נֵרוֹת"], "Chanukah: 3 Candles": ["חֲנוּכָּה: ג׳ נֵרוֹת"], "Chanukah: 4 Candles": ["חֲנוּכָּה: ד׳ נֵרוֹת"], "Chanukah: 5 Candles": ["חֲנוּכָּה: ה׳ נֵרוֹת"], "Chanukah: 6 Candles": ["חֲנוּכָּה: ו׳ נֵרוֹת"], "Chanukah: 7 Candles": ["חֲנוּכָּה: ז׳ נֵרוֹת"], "Chanukah: 8 Candles": ["חֲנוּכָּה: ח׳ נֵרוֹת"], "Chanukah: 8th Day": ["חֲנוּכָּה: יוֹם ח׳"], "Days of the Omer": ["סְפִירַת הָעוֹמֶר"], "Omer": ["עוֹמֶר"], "day of the Omer": ["בָּעוֹמֶר"], "Erev Pesach": ["עֶרֶב פֶּסַח"], "Erev Purim": ["עֶרֶב פּוּרִים"], "Erev Rosh Hashana": ["עֶרֶב רֹאשׁ הַשָּׁנָה"], "Erev Shavuot": ["עֶרֶב שָׁבוּעוֹת"], "Erev Simchat Torah": ["עֶרֶב שִׂמְחַת תּוֹרָה"], "Erev Sukkot": ["עֶרֶב סוּכּוֹת"], "Erev Tish'a B'Av": ["עֶרֶב תִּשְׁעָה בְּאָב"], "Erev Yom Kippur": ["עֶרֶב יוֹם כִּפּוּר"], "Havdalah": ["הַבְדָּלָה"], "Lag BaOmer": ["ל״ג בָּעוֹמֶר"], "Leil Selichot": ["סְלִיחוֹת"], "Pesach": ["פֶּסַח"], "Pesach I": ["פֶּסַח א׳"], "Pesach II": ["פֶּסַח ב׳"], "Pesach II (CH''M)": ["פֶּסַח ב׳ (חוה״מ)"], "Pesach III (CH''M)": ["פֶּסַח ג׳ (חוה״מ)"], "Pesach IV (CH''M)": ["פֶּסַח ד׳ (חוה״מ)"], "Pesach Sheni": ["פֶּסַח שֵׁנִי"], "Pesach V (CH''M)": ["פֶּסַח ה׳ (חוה״מ)"], "Pesach VI (CH''M)": ["פֶּסַח ו׳ (חוה״מ)"], "Pesach VII": ["פֶּסַח ז׳"], "Pesach VIII": ["פֶּסַח ח׳"], "Pesach Shabbat Chol ha-Moed": ["פֶּסַח שַׁבָּת חוֹל הַמּוֹעֵד"], "Purim": ["פּוּרִים"], "Purim Katan": ["פּוּרִים קָטָן"], "Rosh Chodesh %s": ["רֹאשׁ חוֹדֶשׁ %s"], "Rosh Chodesh": ["רֹאשׁ חוֹדֶשׁ"], "Rosh Hashana": ["רֹאשׁ הַשָּׁנָה"], "Rosh Hashana I": ["רֹאשׁ הַשָּׁנָה א׳"], "Rosh Hashana II": ["רֹאשׁ הַשָּׁנָה ב׳"], "Shabbat Chazon": ["שַׁבַּת חֲזוֹן"], "Shabbat HaChodesh": ["שַׁבַּת הַחֹדֶשׁ"], "Shabbat HaGadol": ["שַׁבַּת הַגָּדוֹל"], "Shabbat Nachamu": ["שַׁבַּת נַחֲמוּ"], "Shabbat Parah": ["שַׁבַּת פָּרָה"], "Shabbat Shekalim": ["שַׁבַּת שְׁקָלִים"], "Shabbat Shuva": ["שַׁבַּת שׁוּבָה"], "Shabbat Zachor": ["שַׁבַּת זָכוֹר"], "Shavuot": ["שָׁבוּעוֹת"], "Shavuot I": ["שָׁבוּעוֹת א׳"], "Shavuot II": ["שָׁבוּעוֹת ב׳"], "Shmini Atzeret": ["שְׁמִינִי עֲצֶרֶת"], "Shushan Purim": ["שׁוּשָׁן פּוּרִים"], "Sigd": ["חַג הַסִּיגְד"], "Simchat Torah": ["שִׂמְחַת תּוֹרָה"], "Sukkot": ["סוּכּוֹת"], "Sukkot I": ["סוּכּוֹת א׳"], "Sukkot II": ["סוּכּוֹת ב׳"], "Sukkot II (CH''M)": ["סוּכּוֹת ב׳ (חוה״מ)"], "Sukkot III (CH''M)": ["סוּכּוֹת ג׳ (חוה״מ)"], "Sukkot IV (CH''M)": ["סוּכּוֹת ד׳ (חוה״מ)"], "Sukkot V (CH''M)": ["סוּכּוֹת ה׳ (חוה״מ)"], "Sukkot VI (CH''M)": ["סוּכּוֹת ו׳ (חוה״מ)"], "Sukkot VII (Hoshana Raba)": ["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"], "Sukkot Shabbat Chol ha-Moed": ["סוּכּוֹת שַׁבָּת חוֹל הַמּוֹעֵד"], "Ta'anit Bechorot": ["תַּעֲנִית בְּכוֹרוֹת"], "Ta'anit Esther": ["תַּעֲנִית אֶסְתֵּר"], "Tish'a B'Av": ["תִּשְׁעָה בְּאָב"], "Tu B'Av": ["ט״וּ בְּאָב"], "Tu BiShvat": ["ט״וּ בִּשְׁבָט"], "Tu B'Shvat": ["ט״וּ בִּשְׁבָט"], "Tzom Gedaliah": ["צוֹם גְּדַלְיָה"], "Tzom Tammuz": ["צוֹם י״ז בְּתַמּוּז"], "Yom HaAtzma'ut": ["יוֹם הָעַצְמָאוּת"], "Yom HaShoah": ["יוֹם הַשּׁוֹאָה"], "Yom HaZikaron": ["יוֹם הַזִּכָּרוֹן"], "Yom Kippur": ["יוֹם כִּפּוּר"], "Yom Yerushalayim": ["יוֹם יְרוּשָׁלַיִם"], "Yom HaAliyah": ["יוֹם הַעֲלִיָּה"], "Yom HaAliyah School Observance": ["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"], "Rosh Chodesh Adar": ["רֹאשׁ חוֹדֶשׁ אֲדָר"], "Rosh Chodesh Adar I": ["רֹאשׁ חוֹדֶשׁ אֲדָר א׳"], "Rosh Chodesh Adar II": ["רֹאשׁ חוֹדֶשׁ אֲדָר ב׳"], "Rosh Chodesh Av": ["רֹאשׁ חוֹדֶשׁ אָב"], "Rosh Chodesh Cheshvan": ["רֹאשׁ חוֹדֶשׁ חֶשְׁוָן"], "Rosh Chodesh Elul": ["רֹאשׁ חוֹדֶשׁ אֱלוּל"], "Rosh Chodesh Iyyar": ["רֹאשׁ חוֹדֶשׁ אִיָּיר"], "Rosh Chodesh Kislev": ["רֹאשׁ חוֹדֶשׁ כִּסְלֵו"], "Rosh Chodesh Nisan": ["רֹאשׁ חוֹדֶשׁ נִיסָן"], "Rosh Chodesh Sh'vat": ["רֹאשׁ חוֹדֶשׁ שְׁבָט"], "Rosh Chodesh Sivan": ["רֹאשׁ חוֹדֶשׁ סִיוָן"], "Rosh Chodesh Tamuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tammuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tevet": ["רֹאשׁ חוֹדֶשׁ טֵבֵת"], "min": ["דַּקּוֹת"], "Fast begins": ["תְּחִילַּת הַצוֹם"], "Fast ends": ["סִיּוּם הַצוֹם"], "Rosh Hashana LaBehemot": ["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"], "Tish'a B'Av (observed)": ["(תִּשְׁעָה בְּאָב (נִדְחָה"], "Shabbat Mevarchim Chodesh": ["שַׁבַּת מְבָרְכִים חוֹדֶשׁ"], "Shabbat Shirah": ["שַׁבַּת שִׁירָה"], "Lovingkindness": ["חֶסֶד"], "Might": ["גְּבוּרָה"], "Beauty": ["תִּפְאֶרֶת"], "Eternity": ["נֶּצַח"], "Splendor": ["הוֹד"], "Foundation": ["יְּסוֹד"], "Majesty": ["מַּלְכוּת"], "day": ["יוֹם"], "Yom Kippur Katan": ["יוֹם כִּפּוּר קָטָן"], "Yizkor": ["יִזְכּוֹר"], "Family Day": ["יוֹם הַמִּשׁפָּחָה"], "Yitzhak Rabin Memorial Day": ["יוֹם הַזִּכָּרוֹן לְיִצְחָק רַבִּין"], "Jabotinsky Day": ["יוֹם זַ׳בּוֹטִינְסְקִי"], "Herzl Day": ["יוֹם הֵרְצְל"], "Ben-Gurion Day": ["יוֹם בן־גוריון"], "Hebrew Language Day": ["יוֹם הַשָׂפָה הַעִברִית"], "Birkat Hachamah": ["בִּרְכַּת הַחַמָּה"], "Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"], "Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"], "Chag HaBanot": ["חַג הַבָּנוֹת"], "Molad": ["מוֹלָד הָלְּבָנָה"], "chalakim": ["חֲלָקִים"] } } };
|
|
1
|
+
export default { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);", "language": "he_IL" }, "contexts": { "": { "Shabbat": ["שַׁבָּת"], "Parashat": ["פָּרָשַׁת"], "Achrei Mot": ["אַחֲרֵי מוֹת"], "Balak": ["בָּלָק"], "Bamidbar": ["בְּמִדְבַּר"], "Bechukotai": ["בְּחֻקֹּתַי"], "Beha'alotcha": ["בְּהַעֲלֹתְךָ"], "Behar": ["בְּהַר"], "Bereshit": ["בְּרֵאשִׁית"], "Beshalach": ["בְּשַׁלַּח"], "Bo": ["בֹּא"], "Chayei Sara": ["חַיֵּי שָֹרָה"], "Chukat": ["חֻקַּת"], "Devarim": ["דְּבָרִים"], "Eikev": ["עֵקֶב"], "Emor": ["אֱמוֹר"], "Ha'azinu": ["הַאֲזִינוּ"], "Kedoshim": ["קְדֹשִׁים"], "Ki Tavo": ["כִּי־תָבוֹא"], "Ki Teitzei": ["כִּי־תֵצֵא"], "Ki Tisa": ["כִּי תִשָּׂא"], "Korach": ["קֹרַח"], "Lech-Lecha": ["לֶךְ־לְךָ"], "Masei": ["מַסְעֵי"], "Matot": ["מַטּוֹת"], "Metzora": ["מְצֹרָע"], "Miketz": ["מִקֵּץ"], "Mishpatim": ["מִשְׁפָּטִים"], "Nasso": ["נָשׂא"], "Nitzavim": ["נִצָּבִים"], "Noach": ["נֹחַ"], "Pekudei": ["פְקוּדֵי"], "Pinchas": ["פִּינְחָס"], "Re'eh": ["רְאֵה"], "Sh'lach": ["שְׁלַח־לְךָ"], "Shemot": ["שְׁמוֹת"], "Shmini": ["שְּׁמִינִי"], "Shoftim": ["שׁוֹפְטִים"], "Tazria": ["תַזְרִיעַ"], "Terumah": ["תְּרוּמָה"], "Tetzaveh": ["תְּצַוֶּה"], "Toldot": ["תּוֹלְדוֹת"], "Tzav": ["צַו"], "Vaera": ["וָאֵרָא"], "Vaetchanan": ["וָאֶתְחַנַּן"], "Vayakhel": ["וַיַּקְהֵל"], "Vayechi": ["וַיְחִי"], "Vayeilech": ["וַיֵּלֶךְ"], "Vayera": ["וַיֵּרָא"], "Vayeshev": ["וַיֵּשֶׁב"], "Vayetzei": ["וַיֵּצֵא"], "Vayigash": ["וַיִּגַּשׁ"], "Vayikra": ["וַיִּקְרָא"], "Vayishlach": ["וַיִּשְׁלַח"], "Vezot Haberakhah": ["וְזֹאת הַבְּרָכָה"], "Yitro": ["יִתְרוֹ"], "Asara B'Tevet": ["עֲשָׂרָה בְּטֵבֵת"], "Candle lighting": ["הַדְלָקַת נֵרוֹת"], "Chanukah": ["חֲנוּכָּה"], "Chanukah: 1 Candle": ["חֲנוּכָּה: א׳ נֵר"], "Chanukah: 2 Candles": ["חֲנוּכָּה: ב׳ נֵרוֹת"], "Chanukah: 3 Candles": ["חֲנוּכָּה: ג׳ נֵרוֹת"], "Chanukah: 4 Candles": ["חֲנוּכָּה: ד׳ נֵרוֹת"], "Chanukah: 5 Candles": ["חֲנוּכָּה: ה׳ נֵרוֹת"], "Chanukah: 6 Candles": ["חֲנוּכָּה: ו׳ נֵרוֹת"], "Chanukah: 7 Candles": ["חֲנוּכָּה: ז׳ נֵרוֹת"], "Chanukah: 8 Candles": ["חֲנוּכָּה: ח׳ נֵרוֹת"], "Chanukah: 8th Day": ["חֲנוּכָּה: יוֹם ח׳"], "Days of the Omer": ["סְפִירַת הָעוֹמֶר"], "Omer": ["עוֹמֶר"], "day of the Omer": ["בָּעוֹמֶר"], "Erev Pesach": ["עֶרֶב פֶּסַח"], "Erev Purim": ["עֶרֶב פּוּרִים"], "Erev Rosh Hashana": ["עֶרֶב רֹאשׁ הַשָּׁנָה"], "Erev Shavuot": ["עֶרֶב שָׁבוּעוֹת"], "Erev Simchat Torah": ["עֶרֶב שִׂמְחַת תּוֹרָה"], "Erev Sukkot": ["עֶרֶב סוּכּוֹת"], "Erev Tish'a B'Av": ["עֶרֶב תִּשְׁעָה בְּאָב"], "Erev Yom Kippur": ["עֶרֶב יוֹם כִּפּוּר"], "Havdalah": ["הַבְדָּלָה"], "Lag BaOmer": ["ל״ג בָּעוֹמֶר"], "Leil Selichot": ["סְלִיחוֹת"], "Pesach": ["פֶּסַח"], "Pesach I": ["פֶּסַח א׳"], "Pesach II": ["פֶּסַח ב׳"], "Pesach II (CH''M)": ["פֶּסַח ב׳ (חוה״מ)"], "Pesach III (CH''M)": ["פֶּסַח ג׳ (חוה״מ)"], "Pesach IV (CH''M)": ["פֶּסַח ד׳ (חוה״מ)"], "Pesach Sheni": ["פֶּסַח שֵׁנִי"], "Pesach V (CH''M)": ["פֶּסַח ה׳ (חוה״מ)"], "Pesach VI (CH''M)": ["פֶּסַח ו׳ (חוה״מ)"], "Pesach VII": ["פֶּסַח ז׳"], "Pesach VIII": ["פֶּסַח ח׳"], "Pesach Shabbat Chol ha-Moed": ["פֶּסַח שַׁבָּת חוֹל הַמּוֹעֵד"], "Purim": ["פּוּרִים"], "Purim Katan": ["פּוּרִים קָטָן"], "Rosh Chodesh %s": ["רֹאשׁ חוֹדֶשׁ %s"], "Rosh Chodesh": ["רֹאשׁ חוֹדֶשׁ"], "Rosh Hashana": ["רֹאשׁ הַשָּׁנָה"], "Rosh Hashana I": ["רֹאשׁ הַשָּׁנָה א׳"], "Rosh Hashana II": ["רֹאשׁ הַשָּׁנָה ב׳"], "Shabbat Chazon": ["שַׁבַּת חֲזוֹן"], "Shabbat HaChodesh": ["שַׁבַּת הַחֹדֶשׁ"], "Shabbat HaGadol": ["שַׁבַּת הַגָּדוֹל"], "Shabbat Nachamu": ["שַׁבַּת נַחֲמוּ"], "Shabbat Parah": ["שַׁבַּת פָּרָה"], "Shabbat Shekalim": ["שַׁבַּת שְׁקָלִים"], "Shabbat Shuva": ["שַׁבַּת שׁוּבָה"], "Shabbat Zachor": ["שַׁבַּת זָכוֹר"], "Shavuot": ["שָׁבוּעוֹת"], "Shavuot I": ["שָׁבוּעוֹת א׳"], "Shavuot II": ["שָׁבוּעוֹת ב׳"], "Shmini Atzeret": ["שְׁמִינִי עֲצֶרֶת"], "Shushan Purim": ["שׁוּשָׁן פּוּרִים"], "Sigd": ["חַג הַסִּיגְד"], "Simchat Torah": ["שִׂמְחַת תּוֹרָה"], "Sukkot": ["סוּכּוֹת"], "Sukkot I": ["סוּכּוֹת א׳"], "Sukkot II": ["סוּכּוֹת ב׳"], "Sukkot II (CH''M)": ["סוּכּוֹת ב׳ (חוה״מ)"], "Sukkot III (CH''M)": ["סוּכּוֹת ג׳ (חוה״מ)"], "Sukkot IV (CH''M)": ["סוּכּוֹת ד׳ (חוה״מ)"], "Sukkot V (CH''M)": ["סוּכּוֹת ה׳ (חוה״מ)"], "Sukkot VI (CH''M)": ["סוּכּוֹת ו׳ (חוה״מ)"], "Sukkot VII (Hoshana Raba)": ["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"], "Sukkot Shabbat Chol ha-Moed": ["סוּכּוֹת שַׁבָּת חוֹל הַמּוֹעֵד"], "Ta'anit Bechorot": ["תַּעֲנִית בְּכוֹרוֹת"], "Ta'anit Esther": ["תַּעֲנִית אֶסְתֵּר"], "Tish'a B'Av": ["תִּשְׁעָה בְּאָב"], "Tu B'Av": ["ט״וּ בְּאָב"], "Tu BiShvat": ["ט״וּ בִּשְׁבָט"], "Tu B'Shvat": ["ט״וּ בִּשְׁבָט"], "Tzom Gedaliah": ["צוֹם גְּדַלְיָה"], "Tzom Tammuz": ["צוֹם י״ז בְּתַמּוּז"], "Yom HaAtzma'ut": ["יוֹם הָעַצְמָאוּת"], "Yom HaShoah": ["יוֹם הַשּׁוֹאָה"], "Yom HaZikaron": ["יוֹם הַזִּכָּרוֹן"], "Yom Kippur": ["יוֹם כִּפּוּר"], "Yom Yerushalayim": ["יוֹם יְרוּשָׁלַיִם"], "Yom HaAliyah": ["יוֹם הַעֲלִיָּה"], "Yom HaAliyah School Observance": ["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"], "Rosh Chodesh Adar": ["רֹאשׁ חוֹדֶשׁ אֲדָר"], "Rosh Chodesh Adar I": ["רֹאשׁ חוֹדֶשׁ אֲדָר א׳"], "Rosh Chodesh Adar II": ["רֹאשׁ חוֹדֶשׁ אֲדָר ב׳"], "Rosh Chodesh Av": ["רֹאשׁ חוֹדֶשׁ אָב"], "Rosh Chodesh Cheshvan": ["רֹאשׁ חוֹדֶשׁ חֶשְׁוָן"], "Rosh Chodesh Elul": ["רֹאשׁ חוֹדֶשׁ אֱלוּל"], "Rosh Chodesh Iyyar": ["רֹאשׁ חוֹדֶשׁ אִיָּיר"], "Rosh Chodesh Kislev": ["רֹאשׁ חוֹדֶשׁ כִּסְלֵו"], "Rosh Chodesh Nisan": ["רֹאשׁ חוֹדֶשׁ נִיסָן"], "Rosh Chodesh Sh'vat": ["רֹאשׁ חוֹדֶשׁ שְׁבָט"], "Rosh Chodesh Sivan": ["רֹאשׁ חוֹדֶשׁ סִיוָן"], "Rosh Chodesh Tamuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tammuz": ["רֹאשׁ חוֹדֶשׁ תַּמּוּז"], "Rosh Chodesh Tevet": ["רֹאשׁ חוֹדֶשׁ טֵבֵת"], "min": ["דַּקּוֹת"], "Fast begins": ["תְּחִילַּת הַצוֹם"], "Fast ends": ["סִיּוּם הַצוֹם"], "Rosh Hashana LaBehemot": ["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"], "Tish'a B'Av (observed)": ["(תִּשְׁעָה בְּאָב (נִדְחָה"], "Shabbat Mevarchim Chodesh": ["שַׁבַּת מְבָרְכִים חוֹדֶשׁ"], "Shabbat Shirah": ["שַׁבַּת שִׁירָה"], "Lovingkindness": ["חֶסֶד"], "Might": ["גְּבוּרָה"], "Beauty": ["תִּפְאֶרֶת"], "Eternity": ["נֶּצַח"], "Splendor": ["הוֹד"], "Foundation": ["יְּסוֹד"], "Majesty": ["מַּלְכוּת"], "day": ["יוֹם"], "Yom Kippur Katan": ["יוֹם כִּפּוּר קָטָן"], "Yizkor": ["יִזְכּוֹר"], "Family Day": ["יוֹם הַמִּשׁפָּחָה"], "Yitzhak Rabin Memorial Day": ["יוֹם הַזִּכָּרוֹן לְיִצְחָק רַבִּין"], "Jabotinsky Day": ["יוֹם זַ׳בּוֹטִינְסְקִי"], "Herzl Day": ["יוֹם הֵרְצְל"], "Ben-Gurion Day": ["יוֹם בן־גוריון"], "Hebrew Language Day": ["יוֹם הַשָׂפָה הַעִברִית"], "Birkat Hachamah": ["בִּרְכַּת הַחַמָּה"], "Birkat HaChamah": ["בִּרְכַּת הַחַמָּה"], "Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"], "Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"], "Chag HaBanot": ["חַג הַבָּנוֹת"], "Molad": ["מוֹלָד הָלְּבָנָה"], "chalakim": ["חֲלָקִים"], "Alot HaShachar": ["עֲלוֹת הַשַּׁחַר"], "Misheyakir": ["מִשֶּׁיַּכִּיר"], "Misheyakir Machmir": ["מִשֶּׁיַּכִּיר מַחְמִיר"], "Sunrise": ["נֵץ הַחַמָּה"], "Kriat Shema, sof zeman": ["סוֹף זְמַן קְרִיאַת שְׁמַע"], "Tefilah, sof zeman": ["סוֹף זְמַן תְּפִלָּה"], "Kriat Shema, sof zeman (MGA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע (מג״א)"], "Kriat Shema, sof zeman (GRA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע (גְּרָ״א)"], "Tefilah, sof zeman (MGA)": ["סוֹף זְמַן תְּפִלָּה (מג״א)"], "Tefilah, sof zeman (GRA)": ["סוֹף זְמַן תְּפִלָּה (גְּרָ״א)"], "Chatzot HaLailah": ["חֲצוֹת הַלַּיְלָה"], "Chatzot HaYom": ["חֲצוֹת הַיּוֹם"], "Chatzot hayom": ["חֲצוֹת הַיּוֹם"], "Mincha Gedolah": ["מִנְחָה גְּדוֹלָה"], "Mincha Ketanah": ["מִנְחָה קְטַנָּה"], "Plag HaMincha": ["פְּלַג הַמִּנְחָה"], "Sunset": ["שְׁקִיעַת הַחַמָּה"], "Bein HaShemashot": ["בֵּין הַשְּׁמָשׁוֹת"], "Tzeit HaKochavim": ["צֵאת הַכּוֹכָבִים"] } } };
|
package/dist/src/hebcal.js
CHANGED
|
@@ -175,7 +175,7 @@ export class HebrewCalendar {
|
|
|
175
175
|
*/
|
|
176
176
|
static getBirthdayOrAnniversary(hyear, gdate) {
|
|
177
177
|
const dt = getBirthdayHD(hyear, gdate);
|
|
178
|
-
if (
|
|
178
|
+
if (dt === undefined) {
|
|
179
179
|
return dt;
|
|
180
180
|
}
|
|
181
181
|
return new HDate(dt);
|
|
@@ -216,7 +216,7 @@ export class HebrewCalendar {
|
|
|
216
216
|
*/
|
|
217
217
|
static getYahrzeit(hyear, gdate) {
|
|
218
218
|
const dt = getYahrzeitHD(hyear, gdate);
|
|
219
|
-
if (
|
|
219
|
+
if (dt === undefined) {
|
|
220
220
|
return dt;
|
|
221
221
|
}
|
|
222
222
|
return new HDate(dt);
|
package/dist/src/holidays.js
CHANGED
|
@@ -37,7 +37,7 @@ export function getHolidaysOnDate(date, il) {
|
|
|
37
37
|
const yearMap = getHolidaysForYear_(hd.getFullYear());
|
|
38
38
|
const events = yearMap.get(hdStr);
|
|
39
39
|
// if il isn't a boolean return both diaspora + IL for day
|
|
40
|
-
if (
|
|
40
|
+
if (il === undefined || events === undefined) {
|
|
41
41
|
return events;
|
|
42
42
|
}
|
|
43
43
|
const filtered = events.filter(ev => ev.observedIn(il));
|
|
@@ -67,7 +67,7 @@ const TEVET = months.TEVET;
|
|
|
67
67
|
const ADAR_I = months.ADAR_I;
|
|
68
68
|
const ADAR_II = months.ADAR_II;
|
|
69
69
|
const emojiIsraelFlag = { emoji: '🇮🇱' };
|
|
70
|
-
const yearCache = new QuickLRU({ maxSize:
|
|
70
|
+
const yearCache = new QuickLRU({ maxSize: 120 });
|
|
71
71
|
/**
|
|
72
72
|
* Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
|
|
73
73
|
* `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`
|
package/dist/src/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export { Zmanim } from './zmanim';
|
|
|
11
11
|
export { isAssurBemlacha } from './isAssurBemlacha';
|
|
12
12
|
export { TimedEvent, CandleLightingEvent, HavdalahEvent } from './TimedEvent';
|
|
13
13
|
export { FastDayEvent, TimedChanukahEvent } from './candles';
|
|
14
|
+
export { MoladBase, calculateMolad } from './moladBase';
|
|
15
|
+
export { getMoladAsDate } from './moladDate';
|
|
14
16
|
export { Molad, MoladEvent } from './molad';
|
|
15
17
|
export { OmerEvent, OmerLang } from './omer';
|
|
16
18
|
export { TachanunResult } from './tachanun';
|
package/dist/src/index.js
CHANGED
|
@@ -10,6 +10,8 @@ export { Zmanim } from './zmanim';
|
|
|
10
10
|
export { isAssurBemlacha } from './isAssurBemlacha';
|
|
11
11
|
export { TimedEvent, CandleLightingEvent, HavdalahEvent } from './TimedEvent';
|
|
12
12
|
export { FastDayEvent, TimedChanukahEvent } from './candles';
|
|
13
|
+
export { calculateMolad } from './moladBase';
|
|
14
|
+
export { getMoladAsDate } from './moladDate';
|
|
13
15
|
export { Molad, MoladEvent } from './molad';
|
|
14
16
|
export { OmerEvent } from './omer';
|
|
15
17
|
export { Sedra, parshiot, getSedra } from './sedra';
|
package/dist/src/locale.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Locale };
|
|
1
|
+
export { Locale } from '@hebcal/hdate';
|
package/dist/src/locale.js
CHANGED
|
@@ -2,10 +2,10 @@ import { Locale } from '@hebcal/hdate';
|
|
|
2
2
|
import poAshkenazi from './ashkenazi.po';
|
|
3
3
|
import poHe from './he.po';
|
|
4
4
|
import noNikudOverride from './he-x-NoNikud.po';
|
|
5
|
-
export { Locale };
|
|
6
5
|
Locale.addTranslations('he', poHe);
|
|
7
6
|
Locale.addTranslations('ashkenazi', poAshkenazi);
|
|
8
7
|
/* Hebrew without nikkud */
|
|
9
8
|
const poHeNoNikud = Locale.copyLocaleNoNikud(poHe);
|
|
10
9
|
Locale.addTranslations('he-x-NoNikud', poHeNoNikud);
|
|
11
10
|
Locale.addTranslations('he-x-NoNikud', noNikudOverride);
|
|
11
|
+
export { Locale } from '@hebcal/hdate';
|
package/dist/src/location.js
CHANGED
|
@@ -132,6 +132,9 @@ function getFormatter(tzid) {
|
|
|
132
132
|
}
|
|
133
133
|
/** Class representing Location */
|
|
134
134
|
export class Location extends GeoLocation {
|
|
135
|
+
il;
|
|
136
|
+
cc;
|
|
137
|
+
geoid;
|
|
135
138
|
/**
|
|
136
139
|
* Initialize a Location instance
|
|
137
140
|
* @param latitude - Latitude as a decimal, valid range -90 thru +90 (e.g. 41.85003)
|
|
@@ -156,6 +159,9 @@ export class Location extends GeoLocation {
|
|
|
156
159
|
throw new RangeError('Invalid timezone');
|
|
157
160
|
}
|
|
158
161
|
const elev = typeof elevation === 'number' && elevation > 0 ? elevation : 0;
|
|
162
|
+
if (cityName && typeof cityName !== 'string') {
|
|
163
|
+
cityName = String(cityName);
|
|
164
|
+
}
|
|
159
165
|
super(cityName || null, lat, long, elev, tzid);
|
|
160
166
|
this.il = Boolean(il);
|
|
161
167
|
this.cc = countryCode;
|
package/dist/src/molad.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import 'temporal-polyfill/global';
|
|
1
2
|
import { Event } from './event';
|
|
2
3
|
import { CalOptions } from './CalOptions';
|
|
3
4
|
import { HDate } from '@hebcal/hdate';
|
|
@@ -7,19 +8,35 @@ import './locale';
|
|
|
7
8
|
*/
|
|
8
9
|
export declare class Molad {
|
|
9
10
|
private readonly m;
|
|
11
|
+
private readonly year;
|
|
12
|
+
private readonly month;
|
|
13
|
+
private instant?;
|
|
10
14
|
/**
|
|
11
15
|
* Calculates the molad for a Hebrew month
|
|
12
16
|
* @param year
|
|
13
|
-
* @param month
|
|
17
|
+
* @param month 1=NISSAN, 7=TISHREI
|
|
14
18
|
*/
|
|
15
19
|
constructor(year: number, month: number);
|
|
16
20
|
/**
|
|
21
|
+
* The exact Hebrew date of the molad, which often falls on the
|
|
22
|
+
* 28th or 30th of the preceeding month, occasionally on the first of the
|
|
23
|
+
* month, and in extremely rare circumstances the 27th of the month.
|
|
24
|
+
* - Molad Shevat 5541 occured on 27 Tevet / 1781-01-24T19:57:20.170Z
|
|
25
|
+
* - Molad Shevat 5788 will occur on 27 Tevet / 2028-01-26T19:07:03.504Z
|
|
26
|
+
* - Molad Nissan 5866 will occur on 27 Adar II / 2106-04-03T21:08:46.837Z
|
|
27
|
+
*/
|
|
28
|
+
getMoladDate(): HDate;
|
|
29
|
+
/**
|
|
30
|
+
* The year of the molad (as constructed)
|
|
17
31
|
*/
|
|
18
32
|
getYear(): number;
|
|
19
33
|
/**
|
|
34
|
+
* The month (1=NISSAN, 7=TISHREI) as constructed
|
|
20
35
|
*/
|
|
21
36
|
getMonth(): number;
|
|
22
37
|
/**
|
|
38
|
+
* Returns a transliterated string name of the molad's Hebrew month,
|
|
39
|
+
* for example 'Elul' or 'Cheshvan'.
|
|
23
40
|
*/
|
|
24
41
|
getMonthName(): string;
|
|
25
42
|
/**
|
|
@@ -38,6 +55,59 @@ export declare class Molad {
|
|
|
38
55
|
* @returns parts of a minute (0-17)
|
|
39
56
|
*/
|
|
40
57
|
getChalakim(): number;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the molad in Standard Time in Yerushalayim as a Temporal.ZonedDateTime.
|
|
60
|
+
* This method subtracts 20.94 minutes (20 minutes and 56.496 seconds) from the computed time (Har Habayis with a longitude
|
|
61
|
+
* of 35.2354° is 5.2354° away from the %15 timezone longitude) to get to standard time. This method
|
|
62
|
+
* intentionally uses standard time and not daylight savings time.
|
|
63
|
+
*
|
|
64
|
+
* @return the Temporal.ZonedDateTime representing the moment of the molad in Yerushalayim standard time (GMT + 2)
|
|
65
|
+
*/
|
|
66
|
+
getInstant(): Temporal.ZonedDateTime;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the earliest time of _Kiddush Levana_ calculated as 3 days after the molad. This method returns the time
|
|
69
|
+
* even if it is during the day when _Kiddush Levana_ can't be said. Callers of this method should consider
|
|
70
|
+
* displaying the next _tzais_ if the zman is between _alos_ and _tzais_.
|
|
71
|
+
*
|
|
72
|
+
* @return the Temporal.ZonedDateTime representing the moment 3 days after the molad.
|
|
73
|
+
*/
|
|
74
|
+
getTchilasZmanKidushLevana3Days(): Temporal.ZonedDateTime;
|
|
75
|
+
/**
|
|
76
|
+
* Returns the earliest time of Kiddush Levana calculated as 7 days after the molad as mentioned by the <a
|
|
77
|
+
* href="https://en.wikipedia.org/wiki/Yosef_Karo">Mechaber</a>. See the <a
|
|
78
|
+
* href="https://en.wikipedia.org/wiki/Yoel_Sirkis">Bach's</a> opinion on this time. This method returns the time
|
|
79
|
+
* even if it is during the day when _Kiddush Levana_ can't be said. Callers of this method should consider
|
|
80
|
+
* displaying the next _tzais_ if the zman is between _alos_ and _tzais_.
|
|
81
|
+
*
|
|
82
|
+
* @return the Temporal.ZonedDateTime representing the moment 7 days after the molad.
|
|
83
|
+
*/
|
|
84
|
+
getTchilasZmanKidushLevana7Days(): Temporal.ZonedDateTime;
|
|
85
|
+
/**
|
|
86
|
+
* Returns the latest time of Kiddush Levana according to the <a
|
|
87
|
+
* href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as
|
|
88
|
+
* halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and
|
|
89
|
+
* molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. This method returns the time
|
|
90
|
+
* even if it is during the day when _Kiddush Levana_ can't be said. Callers of this method should consider
|
|
91
|
+
* displaying _alos_ before this time if the zman is between _alos_ and _tzais_.
|
|
92
|
+
*
|
|
93
|
+
* @return the Temporal.ZonedDateTime representing the moment halfway between molad and molad.
|
|
94
|
+
*/
|
|
95
|
+
getSofZmanKidushLevanaBetweenMoldos(): Temporal.ZonedDateTime;
|
|
96
|
+
/**
|
|
97
|
+
* Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down
|
|
98
|
+
* in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the
|
|
99
|
+
* <a href="https://en.wikipedia.org/wiki/Moses_Isserles">Rema</a> who brings down the opinion of the <a
|
|
100
|
+
* href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> of calculating
|
|
101
|
+
* {@link Molad.getSofZmanKidushLevanaBetweenMoldos() half way between molad and mold} is of the opinion that Mechaber
|
|
102
|
+
* agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid
|
|
103
|
+
* Heber's very detailed writeup in Siman Daled (chapter 4) of <a
|
|
104
|
+
* href="https://www.worldcat.org/oclc/461326125">Shaarei Zmanim</a>. This method returns the time even if it is during
|
|
105
|
+
* the day when _Kiddush Levana_ can't be said. Callers of this method should consider displaying _alos_
|
|
106
|
+
* before this time if the zman is between _alos_ and _tzais_.
|
|
107
|
+
*
|
|
108
|
+
* @return the Temporal.ZonedDateTime representing the moment 15 days after the molad.
|
|
109
|
+
*/
|
|
110
|
+
getSofZmanKidushLevana15Days(): Temporal.ZonedDateTime;
|
|
41
111
|
/**
|
|
42
112
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
43
113
|
* @param options
|
package/dist/src/molad.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import 'temporal-polyfill/global';
|
|
2
2
|
import { Event, flags } from './event';
|
|
3
|
-
import { HDate, Locale,
|
|
3
|
+
import { HDate, Locale, pad2 } from '@hebcal/hdate';
|
|
4
4
|
import { reformatTimeStr } from './reformatTimeStr';
|
|
5
|
+
import { calculateMolad } from './moladBase';
|
|
6
|
+
import { getMoladAsDate } from './moladDate';
|
|
5
7
|
import './locale'; // Adds Hebrew and Ashkenazic translations
|
|
6
8
|
const enDoW = [
|
|
7
9
|
'Sunday',
|
|
@@ -55,34 +57,55 @@ function getHebrewTimeOfDay(hour) {
|
|
|
55
57
|
* Represents a molad, the moment when the new moon is "born"
|
|
56
58
|
*/
|
|
57
59
|
export class Molad {
|
|
60
|
+
m;
|
|
61
|
+
year;
|
|
62
|
+
month;
|
|
63
|
+
instant;
|
|
58
64
|
/**
|
|
59
65
|
* Calculates the molad for a Hebrew month
|
|
60
66
|
* @param year
|
|
61
|
-
* @param month
|
|
67
|
+
* @param month 1=NISSAN, 7=TISHREI
|
|
62
68
|
*/
|
|
63
69
|
constructor(year, month) {
|
|
64
|
-
this.m =
|
|
70
|
+
this.m = calculateMolad(year, month);
|
|
71
|
+
this.year = year;
|
|
72
|
+
this.month = month;
|
|
65
73
|
}
|
|
66
74
|
/**
|
|
75
|
+
* The exact Hebrew date of the molad, which often falls on the
|
|
76
|
+
* 28th or 30th of the preceeding month, occasionally on the first of the
|
|
77
|
+
* month, and in extremely rare circumstances the 27th of the month.
|
|
78
|
+
* - Molad Shevat 5541 occured on 27 Tevet / 1781-01-24T19:57:20.170Z
|
|
79
|
+
* - Molad Shevat 5788 will occur on 27 Tevet / 2028-01-26T19:07:03.504Z
|
|
80
|
+
* - Molad Nissan 5866 will occur on 27 Adar II / 2106-04-03T21:08:46.837Z
|
|
81
|
+
*/
|
|
82
|
+
getMoladDate() {
|
|
83
|
+
return this.m.hdate;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The year of the molad (as constructed)
|
|
67
87
|
*/
|
|
68
88
|
getYear() {
|
|
69
|
-
return this.
|
|
89
|
+
return this.year;
|
|
70
90
|
}
|
|
71
91
|
/**
|
|
92
|
+
* The month (1=NISSAN, 7=TISHREI) as constructed
|
|
72
93
|
*/
|
|
73
94
|
getMonth() {
|
|
74
|
-
return this.
|
|
95
|
+
return this.month;
|
|
75
96
|
}
|
|
76
97
|
/**
|
|
98
|
+
* Returns a transliterated string name of the molad's Hebrew month,
|
|
99
|
+
* for example 'Elul' or 'Cheshvan'.
|
|
77
100
|
*/
|
|
78
101
|
getMonthName() {
|
|
79
|
-
return HDate.getMonthName(this.
|
|
102
|
+
return HDate.getMonthName(this.month, this.year);
|
|
80
103
|
}
|
|
81
104
|
/**
|
|
82
105
|
* @returns Day of Week (0=Sunday, 6=Saturday)
|
|
83
106
|
*/
|
|
84
107
|
getDow() {
|
|
85
|
-
return this.m.
|
|
108
|
+
return this.m.hdate.getDay();
|
|
86
109
|
}
|
|
87
110
|
/**
|
|
88
111
|
* @returns hour of day (0-23)
|
|
@@ -102,13 +125,89 @@ export class Molad {
|
|
|
102
125
|
getChalakim() {
|
|
103
126
|
return this.m.chalakim;
|
|
104
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Returns the molad in Standard Time in Yerushalayim as a Temporal.ZonedDateTime.
|
|
130
|
+
* This method subtracts 20.94 minutes (20 minutes and 56.496 seconds) from the computed time (Har Habayis with a longitude
|
|
131
|
+
* of 35.2354° is 5.2354° away from the %15 timezone longitude) to get to standard time. This method
|
|
132
|
+
* intentionally uses standard time and not daylight savings time.
|
|
133
|
+
*
|
|
134
|
+
* @return the Temporal.ZonedDateTime representing the moment of the molad in Yerushalayim standard time (GMT + 2)
|
|
135
|
+
*/
|
|
136
|
+
getInstant() {
|
|
137
|
+
this.instant ??= getMoladAsDate(this.m);
|
|
138
|
+
return this.instant;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Returns the earliest time of _Kiddush Levana_ calculated as 3 days after the molad. This method returns the time
|
|
142
|
+
* even if it is during the day when _Kiddush Levana_ can't be said. Callers of this method should consider
|
|
143
|
+
* displaying the next _tzais_ if the zman is between _alos_ and _tzais_.
|
|
144
|
+
*
|
|
145
|
+
* @return the Temporal.ZonedDateTime representing the moment 3 days after the molad.
|
|
146
|
+
*/
|
|
147
|
+
getTchilasZmanKidushLevana3Days() {
|
|
148
|
+
const zdt = this.getInstant();
|
|
149
|
+
return zdt.add({ hours: 72 });
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Returns the earliest time of Kiddush Levana calculated as 7 days after the molad as mentioned by the <a
|
|
153
|
+
* href="https://en.wikipedia.org/wiki/Yosef_Karo">Mechaber</a>. See the <a
|
|
154
|
+
* href="https://en.wikipedia.org/wiki/Yoel_Sirkis">Bach's</a> opinion on this time. This method returns the time
|
|
155
|
+
* even if it is during the day when _Kiddush Levana_ can't be said. Callers of this method should consider
|
|
156
|
+
* displaying the next _tzais_ if the zman is between _alos_ and _tzais_.
|
|
157
|
+
*
|
|
158
|
+
* @return the Temporal.ZonedDateTime representing the moment 7 days after the molad.
|
|
159
|
+
*/
|
|
160
|
+
getTchilasZmanKidushLevana7Days() {
|
|
161
|
+
const zdt = this.getInstant();
|
|
162
|
+
return zdt.add({ hours: 168 });
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Returns the latest time of Kiddush Levana according to the <a
|
|
166
|
+
* href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as
|
|
167
|
+
* halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and
|
|
168
|
+
* molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. This method returns the time
|
|
169
|
+
* even if it is during the day when _Kiddush Levana_ can't be said. Callers of this method should consider
|
|
170
|
+
* displaying _alos_ before this time if the zman is between _alos_ and _tzais_.
|
|
171
|
+
*
|
|
172
|
+
* @return the Temporal.ZonedDateTime representing the moment halfway between molad and molad.
|
|
173
|
+
*/
|
|
174
|
+
getSofZmanKidushLevanaBetweenMoldos() {
|
|
175
|
+
const zdt = this.getInstant();
|
|
176
|
+
// add half the time between molad and molad (half of 29 days, 12 hours and 793 chalakim (44 minutes, 3.3
|
|
177
|
+
// seconds), or 14 days, 18 hours, 22 minutes and 666 milliseconds). Add it as hours, not days, to avoid
|
|
178
|
+
// DST/ST crossover issues.
|
|
179
|
+
return zdt.add({
|
|
180
|
+
hours: 24 * 14 + 18,
|
|
181
|
+
minutes: 22,
|
|
182
|
+
seconds: 1,
|
|
183
|
+
milliseconds: 666,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down
|
|
188
|
+
* in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the
|
|
189
|
+
* <a href="https://en.wikipedia.org/wiki/Moses_Isserles">Rema</a> who brings down the opinion of the <a
|
|
190
|
+
* href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> of calculating
|
|
191
|
+
* {@link Molad.getSofZmanKidushLevanaBetweenMoldos() half way between molad and mold} is of the opinion that Mechaber
|
|
192
|
+
* agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid
|
|
193
|
+
* Heber's very detailed writeup in Siman Daled (chapter 4) of <a
|
|
194
|
+
* href="https://www.worldcat.org/oclc/461326125">Shaarei Zmanim</a>. This method returns the time even if it is during
|
|
195
|
+
* the day when _Kiddush Levana_ can't be said. Callers of this method should consider displaying _alos_
|
|
196
|
+
* before this time if the zman is between _alos_ and _tzais_.
|
|
197
|
+
*
|
|
198
|
+
* @return the Temporal.ZonedDateTime representing the moment 15 days after the molad.
|
|
199
|
+
*/
|
|
200
|
+
getSofZmanKidushLevana15Days() {
|
|
201
|
+
const zdt = this.getInstant();
|
|
202
|
+
// 15 days after the molad. Add it as hours, not days, to avoid DST/ST crossover issues.
|
|
203
|
+
return zdt.add({ hours: 24 * 15 });
|
|
204
|
+
}
|
|
105
205
|
/**
|
|
106
206
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
107
207
|
* @param options
|
|
108
208
|
*/
|
|
109
209
|
render(locale, options) {
|
|
110
|
-
|
|
111
|
-
locale = locale !== null && locale !== void 0 ? locale : 'en';
|
|
210
|
+
locale = locale ?? 'en';
|
|
112
211
|
if (typeof locale === 'string') {
|
|
113
212
|
locale = locale.toLowerCase();
|
|
114
213
|
}
|
|
@@ -120,7 +219,7 @@ export class Molad {
|
|
|
120
219
|
const hour = this.getHour();
|
|
121
220
|
const chalakim = this.getChalakim();
|
|
122
221
|
const moladStr = Locale.gettext('Molad', locale);
|
|
123
|
-
const minutesStr =
|
|
222
|
+
const minutesStr = Locale.lookupTranslation('min', locale) ?? 'minutes';
|
|
124
223
|
const chalakimStr = Locale.gettext('chalakim', locale);
|
|
125
224
|
const and = Locale.gettext('and', locale);
|
|
126
225
|
if (isHebrewLocale) {
|
|
@@ -147,6 +246,8 @@ export class Molad {
|
|
|
147
246
|
}
|
|
148
247
|
/** Represents a Molad announcement on Shabbat Mevarchim */
|
|
149
248
|
export class MoladEvent extends Event {
|
|
249
|
+
molad;
|
|
250
|
+
options;
|
|
150
251
|
/**
|
|
151
252
|
* @param date Hebrew date event occurs
|
|
152
253
|
* @param hyear molad year
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HDate } from '@hebcal/hdate';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a molad, the moment when the new moon is "born"
|
|
4
|
+
*/
|
|
5
|
+
export type MoladBase = {
|
|
6
|
+
/** Hebrew date */
|
|
7
|
+
readonly hdate: HDate;
|
|
8
|
+
/** hour of day (0-23) */
|
|
9
|
+
readonly hour: number;
|
|
10
|
+
/** minutes past hour (0-59) */
|
|
11
|
+
readonly minutes: number;
|
|
12
|
+
/** parts of a minute (0-17) */
|
|
13
|
+
readonly chalakim: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function calculateMolad(year: number, month: number): MoladBase;
|