@hebcal/core 6.5.0 → 6.5.2
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 +5983 -5473
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +17 -17
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/CalOptions.d.ts +7 -4
- package/dist/esm/DailyLearning.d.ts +44 -7
- package/dist/esm/DailyLearning.js +45 -8
- package/dist/esm/DailyLearning.js.map +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.d.ts +34 -1
- package/dist/esm/HolidayEvent.js +35 -2
- package/dist/esm/HolidayEvent.js.map +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +1 -1
- package/dist/esm/TimedEvent.d.ts +32 -3
- package/dist/esm/TimedEvent.js +33 -4
- package/dist/esm/TimedEvent.js.map +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.d.ts +1 -0
- package/dist/esm/ashkenazi.po.js +2 -2
- package/dist/esm/ashkenazi.po.js.map +1 -1
- package/dist/esm/calendar.d.ts +1 -0
- package/dist/esm/calendar.js +12 -2
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.d.ts +14 -1
- package/dist/esm/candles.js +15 -2
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/cities.json.js +5 -0
- package/dist/esm/cities.json.js.map +1 -0
- package/dist/esm/event.d.ts +58 -13
- package/dist/esm/event.js +59 -14
- package/dist/esm/event.js.map +1 -1
- package/dist/esm/getStartAndEnd.js +10 -2
- package/dist/esm/getStartAndEnd.js.map +1 -1
- package/dist/esm/hallel.js +20 -28
- package/dist/esm/hallel.js.map +1 -1
- package/dist/esm/he-x-NoNikud.po.js +1 -1
- package/dist/esm/he.po.d.ts +1 -0
- package/dist/esm/he.po.js +2 -2
- package/dist/esm/he.po.js.map +1 -1
- package/dist/esm/hebcal.d.ts +97 -19
- package/dist/esm/hebcal.js +102 -21
- package/dist/esm/hebcal.js.map +1 -1
- package/dist/esm/holidays.d.ts +21 -2
- package/dist/esm/holidays.js +39 -3
- package/dist/esm/holidays.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isAssurBemlacha.d.ts +24 -4
- package/dist/esm/isAssurBemlacha.js +25 -5
- package/dist/esm/isAssurBemlacha.js.map +1 -1
- package/dist/esm/isAveilut.d.ts +14 -3
- package/dist/esm/isAveilut.js +15 -4
- package/dist/esm/isAveilut.js.map +1 -1
- package/dist/esm/isFastDay.d.ts +13 -1
- package/dist/esm/isFastDay.js +14 -2
- package/dist/esm/isFastDay.js.map +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.d.ts +96 -8
- package/dist/esm/location.js +112 -88
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.d.ts +39 -7
- package/dist/esm/molad.js +40 -8
- package/dist/esm/molad.js.map +1 -1
- package/dist/esm/moladBase.js +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/omer.d.ts +32 -4
- package/dist/esm/omer.js +33 -5
- package/dist/esm/omer.js.map +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.d.ts +12 -1
- package/dist/esm/parshaYear.js +13 -2
- package/dist/esm/parshaYear.js.map +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.d.ts +94 -14
- package/dist/esm/sedra.js +95 -15
- package/dist/esm/sedra.js.map +1 -1
- package/dist/esm/sefira.json.js +1 -1
- package/dist/esm/staticHolidays.d.ts +2 -0
- package/dist/esm/staticHolidays.js +3 -1
- package/dist/esm/staticHolidays.js.map +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/temporal-shim.js +1 -1
- package/dist/esm/zmanim.js +1 -1
- package/dist/src/CalOptions.d.ts +7 -4
- package/dist/src/DailyLearning.d.ts +44 -7
- package/dist/src/DailyLearning.js +44 -7
- package/dist/src/HolidayEvent.d.ts +34 -1
- package/dist/src/HolidayEvent.js +34 -1
- package/dist/src/TimedEvent.d.ts +32 -3
- package/dist/src/TimedEvent.js +32 -3
- package/dist/src/ashkenazi.po.d.ts +1 -0
- package/dist/src/ashkenazi.po.js +1 -1
- package/dist/src/calendar.d.ts +1 -0
- package/dist/src/calendar.js +11 -1
- package/dist/src/candles.d.ts +14 -1
- package/dist/src/candles.js +14 -1
- package/dist/src/cities.json +67 -0
- package/dist/src/event.d.ts +58 -13
- package/dist/src/event.js +58 -13
- package/dist/src/getStartAndEnd.js +9 -1
- package/dist/src/hallel.js +19 -27
- package/dist/src/he.po.d.ts +1 -0
- package/dist/src/he.po.js +1 -1
- package/dist/src/hebcal.d.ts +97 -19
- package/dist/src/hebcal.js +101 -20
- package/dist/src/holidays.d.ts +21 -2
- package/dist/src/holidays.js +38 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/isAssurBemlacha.d.ts +24 -4
- package/dist/src/isAssurBemlacha.js +24 -4
- package/dist/src/isAveilut.d.ts +14 -3
- package/dist/src/isAveilut.js +14 -3
- package/dist/src/isFastDay.d.ts +13 -1
- package/dist/src/isFastDay.js +13 -1
- package/dist/src/location.d.ts +96 -8
- package/dist/src/location.js +111 -87
- package/dist/src/molad.d.ts +39 -7
- package/dist/src/molad.js +39 -7
- package/dist/src/omer.d.ts +32 -4
- package/dist/src/omer.js +32 -4
- package/dist/src/parshaYear.d.ts +12 -1
- package/dist/src/parshaYear.js +12 -1
- package/dist/src/pkgVersion.d.ts +1 -1
- package/dist/src/pkgVersion.js +1 -1
- package/dist/src/sedra.d.ts +94 -14
- package/dist/src/sedra.js +94 -14
- package/dist/src/staticHolidays.d.ts +2 -0
- package/dist/src/staticHolidays.js +2 -0
- package/package.json +6 -6
package/dist/src/event.d.ts
CHANGED
|
@@ -63,15 +63,27 @@ export declare const flags: {
|
|
|
63
63
|
readonly DAILY_LEARNING: 67108864;
|
|
64
64
|
/** Yizkor */
|
|
65
65
|
readonly YIZKOR: 134217728;
|
|
66
|
+
/** BeHaB fast days on Monday, Thursday and Monday after Pesach and Sukkot */
|
|
67
|
+
readonly BEHAB: 268435456;
|
|
66
68
|
};
|
|
67
69
|
/**
|
|
68
70
|
* Represents an Event with a title, date, and flags.
|
|
69
71
|
*
|
|
70
72
|
* Events are used to represent holidays, candle-lighting times,
|
|
71
|
-
* Torah readings, and more.
|
|
73
|
+
* Torah readings, Omer days, Hebrew dates, and more. Most concrete event
|
|
74
|
+
* types are subclasses (e.g. {@link HolidayEvent}, {@link TimedEvent},
|
|
75
|
+
* {@link ParshaEvent}, {@link OmerEvent}) and are produced by
|
|
76
|
+
* {@link HebrewCalendar.calendar}.
|
|
72
77
|
*
|
|
73
|
-
* To get the title of the event a language other than English
|
|
74
|
-
*
|
|
78
|
+
* To get the title of the event in a language other than English with
|
|
79
|
+
* Sephardic transliterations, use the {@link Event.render} method.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* import {Event, HDate, flags} from '@hebcal/core';
|
|
83
|
+
* const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
|
|
84
|
+
* ev.getDate().toString(); // '6 Sivan 5749'
|
|
85
|
+
* ev.getDesc(); // 'Shavuot'
|
|
86
|
+
* ev.render('he'); // 'שָׁבוּעוֹת'
|
|
75
87
|
*/
|
|
76
88
|
export declare class Event {
|
|
77
89
|
/** Hebrew date of this event */
|
|
@@ -130,25 +142,47 @@ export declare class Event {
|
|
|
130
142
|
render(locale?: string): string;
|
|
131
143
|
/**
|
|
132
144
|
* Returns a brief (translated) description of this event.
|
|
133
|
-
*
|
|
134
|
-
*
|
|
145
|
+
*
|
|
146
|
+
* For most events this is the same as {@link render}. Some subclasses
|
|
147
|
+
* (e.g. {@link CandleLightingEvent}, {@link HavdalahEvent},
|
|
148
|
+
* {@link OmerEvent}) produce shorter text without an attached time or
|
|
149
|
+
* extra qualifier — useful for compact UI display.
|
|
150
|
+
* @example
|
|
151
|
+
* import {CandleLightingEvent} from '@hebcal/core';
|
|
152
|
+
* // For a regular Event, renderBrief() == render():
|
|
153
|
+
* const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
|
|
154
|
+
* ev.renderBrief('en'); // 'Shavuot'
|
|
135
155
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
136
156
|
*/
|
|
137
157
|
renderBrief(locale?: string): string;
|
|
138
158
|
/**
|
|
139
|
-
*
|
|
159
|
+
* Returns the event's emoji character (e.g. `🕯️`, `🕎`, `🇮🇱`, `🍏🍯`),
|
|
160
|
+
* or `null` if no emoji is associated with this event.
|
|
161
|
+
* Subclasses override this to provide holiday-specific emoji.
|
|
140
162
|
*/
|
|
141
163
|
getEmoji(): string | null;
|
|
142
164
|
/**
|
|
143
|
-
* Returns a simplified (untranslated) description for this event
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* For
|
|
165
|
+
* Returns a simplified (untranslated) description for this event, suitable
|
|
166
|
+
* for grouping related events under a single name.
|
|
167
|
+
*
|
|
168
|
+
* For example, {@link HolidayEvent} strips qualifiers so that
|
|
169
|
+
* `"Erev Pesach"` → `"Pesach"` and `"Sukkot III (CH''M)"` → `"Sukkot"`.
|
|
170
|
+
* For many events the basename and the event description are identical.
|
|
171
|
+
* @example
|
|
172
|
+
* import {HolidayEvent, HDate, months, flags} from '@hebcal/core';
|
|
173
|
+
* const ev = new HolidayEvent(
|
|
174
|
+
* new HDate(14, months.NISAN, 5784), 'Erev Pesach', flags.EREV);
|
|
175
|
+
* ev.getDesc(); // 'Erev Pesach'
|
|
176
|
+
* ev.basename(); // 'Pesach'
|
|
147
177
|
*/
|
|
148
178
|
basename(): string;
|
|
149
179
|
/**
|
|
150
|
-
* Returns a URL to hebcal.com or sefaria.org for more detail on the event
|
|
151
|
-
*
|
|
180
|
+
* Returns a URL to hebcal.com or sefaria.org for more detail on the event,
|
|
181
|
+
* or `undefined` for events with no detail page.
|
|
182
|
+
*
|
|
183
|
+
* Subclasses such as {@link HolidayEvent}, {@link ChanukahEvent},
|
|
184
|
+
* {@link AsaraBTevetEvent}, {@link ParshaEvent}, and {@link OmerEvent}
|
|
185
|
+
* override this with their own URL patterns.
|
|
152
186
|
*/
|
|
153
187
|
url(): string | undefined;
|
|
154
188
|
/**
|
|
@@ -182,7 +216,18 @@ export declare class Event {
|
|
|
182
216
|
*/
|
|
183
217
|
observedIn(il: boolean): boolean;
|
|
184
218
|
/**
|
|
185
|
-
* Returns
|
|
219
|
+
* Returns an array of category strings classifying this event, derived
|
|
220
|
+
* from its {@link flags} bitmask. The first element is the broad category
|
|
221
|
+
* (e.g. `'holiday'`, `'roshchodesh'`, `'parashat'`, `'omer'`), followed
|
|
222
|
+
* by zero or more refinements (e.g. `'major'`, `'minor'`, `'fast'`).
|
|
223
|
+
*
|
|
224
|
+
* Returns `['unknown']` if no flag maps to a known category.
|
|
225
|
+
* @example
|
|
226
|
+
* import {Event, HDate, flags} from '@hebcal/core';
|
|
227
|
+
* new Event(new HDate(10, 'Tishrei', 5784), 'Yom Kippur', flags.MAJOR_FAST)
|
|
228
|
+
* .getCategories(); // ['holiday', 'major', 'fast']
|
|
229
|
+
* new Event(new HDate(1, 'Shvat', 5784), 'Rosh Chodesh Sh\'vat', flags.ROSH_CHODESH)
|
|
230
|
+
* .getCategories(); // ['roshchodesh']
|
|
186
231
|
*/
|
|
187
232
|
getCategories(): string[];
|
|
188
233
|
}
|
package/dist/src/event.js
CHANGED
|
@@ -63,6 +63,8 @@ export const flags = {
|
|
|
63
63
|
DAILY_LEARNING: 0x4000000,
|
|
64
64
|
/** Yizkor */
|
|
65
65
|
YIZKOR: 0x8000000,
|
|
66
|
+
/** BeHaB fast days on Monday, Thursday and Monday after Pesach and Sukkot */
|
|
67
|
+
BEHAB: 0x10000000,
|
|
66
68
|
};
|
|
67
69
|
const flagToCategory = [
|
|
68
70
|
[flags.MAJOR_FAST, 'holiday', 'major', 'fast'],
|
|
@@ -84,10 +86,20 @@ const flagToCategory = [
|
|
|
84
86
|
* Represents an Event with a title, date, and flags.
|
|
85
87
|
*
|
|
86
88
|
* Events are used to represent holidays, candle-lighting times,
|
|
87
|
-
* Torah readings, and more.
|
|
89
|
+
* Torah readings, Omer days, Hebrew dates, and more. Most concrete event
|
|
90
|
+
* types are subclasses (e.g. {@link HolidayEvent}, {@link TimedEvent},
|
|
91
|
+
* {@link ParshaEvent}, {@link OmerEvent}) and are produced by
|
|
92
|
+
* {@link HebrewCalendar.calendar}.
|
|
88
93
|
*
|
|
89
|
-
* To get the title of the event a language other than English
|
|
90
|
-
*
|
|
94
|
+
* To get the title of the event in a language other than English with
|
|
95
|
+
* Sephardic transliterations, use the {@link Event.render} method.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* import {Event, HDate, flags} from '@hebcal/core';
|
|
99
|
+
* const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
|
|
100
|
+
* ev.getDate().toString(); // '6 Sivan 5749'
|
|
101
|
+
* ev.getDesc(); // 'Shavuot'
|
|
102
|
+
* ev.render('he'); // 'שָׁבוּעוֹת'
|
|
91
103
|
*/
|
|
92
104
|
export class Event {
|
|
93
105
|
/** Hebrew date of this event */
|
|
@@ -169,31 +181,53 @@ export class Event {
|
|
|
169
181
|
}
|
|
170
182
|
/**
|
|
171
183
|
* Returns a brief (translated) description of this event.
|
|
172
|
-
*
|
|
173
|
-
*
|
|
184
|
+
*
|
|
185
|
+
* For most events this is the same as {@link render}. Some subclasses
|
|
186
|
+
* (e.g. {@link CandleLightingEvent}, {@link HavdalahEvent},
|
|
187
|
+
* {@link OmerEvent}) produce shorter text without an attached time or
|
|
188
|
+
* extra qualifier — useful for compact UI display.
|
|
189
|
+
* @example
|
|
190
|
+
* import {CandleLightingEvent} from '@hebcal/core';
|
|
191
|
+
* // For a regular Event, renderBrief() == render():
|
|
192
|
+
* const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
|
|
193
|
+
* ev.renderBrief('en'); // 'Shavuot'
|
|
174
194
|
* @param [locale] Optional locale name (defaults to empty locale)
|
|
175
195
|
*/
|
|
176
196
|
renderBrief(locale) {
|
|
177
197
|
return this.render(locale);
|
|
178
198
|
}
|
|
179
199
|
/**
|
|
180
|
-
*
|
|
200
|
+
* Returns the event's emoji character (e.g. `🕯️`, `🕎`, `🇮🇱`, `🍏🍯`),
|
|
201
|
+
* or `null` if no emoji is associated with this event.
|
|
202
|
+
* Subclasses override this to provide holiday-specific emoji.
|
|
181
203
|
*/
|
|
182
204
|
getEmoji() {
|
|
183
205
|
return this.emoji || null;
|
|
184
206
|
}
|
|
185
207
|
/**
|
|
186
|
-
* Returns a simplified (untranslated) description for this event
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* For
|
|
208
|
+
* Returns a simplified (untranslated) description for this event, suitable
|
|
209
|
+
* for grouping related events under a single name.
|
|
210
|
+
*
|
|
211
|
+
* For example, {@link HolidayEvent} strips qualifiers so that
|
|
212
|
+
* `"Erev Pesach"` → `"Pesach"` and `"Sukkot III (CH''M)"` → `"Sukkot"`.
|
|
213
|
+
* For many events the basename and the event description are identical.
|
|
214
|
+
* @example
|
|
215
|
+
* import {HolidayEvent, HDate, months, flags} from '@hebcal/core';
|
|
216
|
+
* const ev = new HolidayEvent(
|
|
217
|
+
* new HDate(14, months.NISAN, 5784), 'Erev Pesach', flags.EREV);
|
|
218
|
+
* ev.getDesc(); // 'Erev Pesach'
|
|
219
|
+
* ev.basename(); // 'Pesach'
|
|
190
220
|
*/
|
|
191
221
|
basename() {
|
|
192
222
|
return this.getDesc();
|
|
193
223
|
}
|
|
194
224
|
/**
|
|
195
|
-
* Returns a URL to hebcal.com or sefaria.org for more detail on the event
|
|
196
|
-
*
|
|
225
|
+
* Returns a URL to hebcal.com or sefaria.org for more detail on the event,
|
|
226
|
+
* or `undefined` for events with no detail page.
|
|
227
|
+
*
|
|
228
|
+
* Subclasses such as {@link HolidayEvent}, {@link ChanukahEvent},
|
|
229
|
+
* {@link AsaraBTevetEvent}, {@link ParshaEvent}, and {@link OmerEvent}
|
|
230
|
+
* override this with their own URL patterns.
|
|
197
231
|
*/
|
|
198
232
|
url() {
|
|
199
233
|
return undefined;
|
|
@@ -235,7 +269,18 @@ export class Event {
|
|
|
235
269
|
return il ? this.observedInIsrael() : this.observedInDiaspora();
|
|
236
270
|
}
|
|
237
271
|
/**
|
|
238
|
-
* Returns
|
|
272
|
+
* Returns an array of category strings classifying this event, derived
|
|
273
|
+
* from its {@link flags} bitmask. The first element is the broad category
|
|
274
|
+
* (e.g. `'holiday'`, `'roshchodesh'`, `'parashat'`, `'omer'`), followed
|
|
275
|
+
* by zero or more refinements (e.g. `'major'`, `'minor'`, `'fast'`).
|
|
276
|
+
*
|
|
277
|
+
* Returns `['unknown']` if no flag maps to a known category.
|
|
278
|
+
* @example
|
|
279
|
+
* import {Event, HDate, flags} from '@hebcal/core';
|
|
280
|
+
* new Event(new HDate(10, 'Tishrei', 5784), 'Yom Kippur', flags.MAJOR_FAST)
|
|
281
|
+
* .getCategories(); // ['holiday', 'major', 'fast']
|
|
282
|
+
* new Event(new HDate(1, 'Shvat', 5784), 'Rosh Chodesh Sh\'vat', flags.ROSH_CHODESH)
|
|
283
|
+
* .getCategories(); // ['roshchodesh']
|
|
239
284
|
*/
|
|
240
285
|
getCategories() {
|
|
241
286
|
const mask = this.getFlags();
|
|
@@ -21,6 +21,7 @@ function getYear(options) {
|
|
|
21
21
|
? new HDate().getFullYear()
|
|
22
22
|
: new Date().getFullYear();
|
|
23
23
|
}
|
|
24
|
+
const MAX_NUM_YEARS = 2000;
|
|
24
25
|
/**
|
|
25
26
|
* Parse options object to determine start & end days
|
|
26
27
|
* @private
|
|
@@ -30,7 +31,11 @@ export function getStartAndEnd(options) {
|
|
|
30
31
|
throw new TypeError('Both options.start and options.end are required');
|
|
31
32
|
}
|
|
32
33
|
else if (options.start && options.end) {
|
|
33
|
-
|
|
34
|
+
const start = getAbs(options.start), end = getAbs(options.end);
|
|
35
|
+
if (end - start > 365 * MAX_NUM_YEARS) {
|
|
36
|
+
throw new RangeError(`Date range exceeds ${MAX_NUM_YEARS} years`);
|
|
37
|
+
}
|
|
38
|
+
return [start, end];
|
|
34
39
|
}
|
|
35
40
|
const isHebrewYear = Boolean(options.isHebrewYear);
|
|
36
41
|
const theYear = getYear(options);
|
|
@@ -42,6 +47,9 @@ export function getStartAndEnd(options) {
|
|
|
42
47
|
}
|
|
43
48
|
const theMonth = getMonth(options);
|
|
44
49
|
const numYears = Number(options.numYears) || 1;
|
|
50
|
+
if (numYears > MAX_NUM_YEARS) {
|
|
51
|
+
throw new RangeError(`options.numYears exceeds ${MAX_NUM_YEARS}`);
|
|
52
|
+
}
|
|
45
53
|
if (isHebrewYear) {
|
|
46
54
|
return startEndHebrew(theMonth, theYear, numYears);
|
|
47
55
|
}
|
package/dist/src/hallel.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { months } from '@hebcal/hdate';
|
|
2
2
|
import { flags } from './event';
|
|
3
|
+
import { holidayDesc as hdesc } from './staticHolidays';
|
|
3
4
|
const NONE = 0;
|
|
4
5
|
const HALF = 1;
|
|
5
6
|
const WHOLE = 2;
|
|
@@ -7,41 +8,32 @@ const WHOLE = 2;
|
|
|
7
8
|
* @private
|
|
8
9
|
*/
|
|
9
10
|
export function hallel_(events, hdate) {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const desc = ev.getDesc();
|
|
11
|
+
const abs = hdate.abs();
|
|
12
|
+
for (const ev of events) {
|
|
13
13
|
const hd = ev.getDate();
|
|
14
|
+
if (hd.abs() !== abs) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
const desc = ev.getDesc();
|
|
14
18
|
const month = hd.getMonth();
|
|
15
19
|
const mday = hd.getDate();
|
|
16
|
-
|
|
20
|
+
const mask = ev.getFlags();
|
|
21
|
+
if (desc.startsWith('Chanukah') ||
|
|
17
22
|
desc.startsWith('Shavuot') ||
|
|
18
23
|
desc.startsWith('Sukkot') ||
|
|
19
24
|
(month === months.NISAN &&
|
|
20
25
|
(mday === 15 || mday === 16) &&
|
|
21
|
-
|
|
22
|
-
desc ===
|
|
23
|
-
desc ===
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
const abs = hdate.abs();
|
|
29
|
-
if (whole.includes(abs)) {
|
|
30
|
-
return WHOLE;
|
|
31
|
-
}
|
|
32
|
-
const half = events
|
|
33
|
-
.filter(ev => {
|
|
34
|
-
const desc = ev.getDesc();
|
|
35
|
-
return (ev.getFlags() & flags.ROSH_CHODESH ||
|
|
26
|
+
mask & flags.CHAG) || // Pesach
|
|
27
|
+
desc === hdesc.YOM_HAATZMA_UT ||
|
|
28
|
+
desc === hdesc.YOM_YERUSHALAYIM) {
|
|
29
|
+
return WHOLE;
|
|
30
|
+
}
|
|
31
|
+
if (mask & flags.ROSH_CHODESH ||
|
|
36
32
|
(desc.startsWith('Pesach') &&
|
|
37
|
-
desc !==
|
|
38
|
-
desc !==
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return ev.getDate().abs();
|
|
42
|
-
});
|
|
43
|
-
if (half.includes(abs)) {
|
|
44
|
-
return HALF;
|
|
33
|
+
desc !== hdesc.PESACH_I &&
|
|
34
|
+
desc !== hdesc.PESACH_II)) {
|
|
35
|
+
return HALF;
|
|
36
|
+
}
|
|
45
37
|
}
|
|
46
38
|
return NONE;
|
|
47
39
|
}
|
package/dist/src/he.po.d.ts
CHANGED
|
@@ -132,6 +132,7 @@ declare const _default: {
|
|
|
132
132
|
"Sukkot VII (Hoshana Raba)": string[];
|
|
133
133
|
"Sukkot Shabbat Chol ha-Moed": string[];
|
|
134
134
|
"Ta'anit Bechorot": string[];
|
|
135
|
+
"Ta'anit BeHaB": string[];
|
|
135
136
|
"Ta'anit Esther": string[];
|
|
136
137
|
"Tish'a B'Av": string[];
|
|
137
138
|
"Tu B'Av": string[];
|
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": ["בִּרְכַּת הַחַמָּה"], "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": ["צֵאת הַכּוֹכָבִים"], "Biur Chametz": ["בִּעוּר חָמֵץ"], "Finish eating chametz": ["סוֹף זְמַן אֲכִילַת חָמֵץ"] } } };
|
|
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 BeHaB": ["תַּעֲנִית בה״ב"], "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": ["צֵאת הַכּוֹכָבִים"], "Biur Chametz": ["בִּעוּר חָמֵץ"], "Finish eating chametz": ["סוֹף זְמַן אֲכִילַת חָמֵץ"] } } };
|
package/dist/src/hebcal.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare class HebrewCalendar {
|
|
|
24
24
|
* The date range returned by this function can be controlled by:
|
|
25
25
|
* * `options.year` - Gregorian (e.g. 1993) or Hebrew year (e.g. 5749)
|
|
26
26
|
* * `options.isHebrewYear` - to interpret `year` as Hebrew year
|
|
27
|
-
* * `options.numYears` - generate calendar for multiple years (default 1)
|
|
27
|
+
* * `options.numYears` - generate calendar for multiple years (default 1, maximum 2000)
|
|
28
28
|
* * `options.month` - Gregorian or Hebrew month (to filter results to a single month)
|
|
29
29
|
*
|
|
30
30
|
* Alternatively, specify start and end days with `Date` or {@link HDate} instances:
|
|
@@ -187,57 +187,126 @@ export declare class HebrewCalendar {
|
|
|
187
187
|
static getYahrzeit(hyear: number, gdate: Date | HDate): HDate | undefined;
|
|
188
188
|
/**
|
|
189
189
|
* Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
|
|
190
|
-
* `HDate.toString()`. These events must filtered
|
|
190
|
+
* `HDate.toString()`. These events must be filtered for `flags.IL_ONLY`
|
|
191
191
|
* or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme.
|
|
192
|
+
*
|
|
193
|
+
* Includes Rosh Chodesh, fasts, Yom Kippur Katan, Special Shabbatot, etc.,
|
|
194
|
+
* but does not generate candle-lighting times, Torah readings, or Omer days.
|
|
195
|
+
* The result is cached in an internal LRU.
|
|
196
|
+
* @example
|
|
197
|
+
* import {HebrewCalendar} from '@hebcal/core';
|
|
198
|
+
* const map = HebrewCalendar.getHolidaysForYear(5784);
|
|
199
|
+
* for (const [hdStr, events] of map.entries()) {
|
|
200
|
+
* for (const ev of events) {
|
|
201
|
+
* console.log(hdStr, ev.getDesc());
|
|
202
|
+
* }
|
|
203
|
+
* }
|
|
192
204
|
* @param year Hebrew year
|
|
193
205
|
*/
|
|
194
206
|
static getHolidaysForYear(year: number): HolidayYearMap;
|
|
195
207
|
/**
|
|
196
|
-
* Returns
|
|
208
|
+
* Returns a sorted array of holidays observed during the given Hebrew year.
|
|
209
|
+
*
|
|
210
|
+
* Events are pre-filtered by Israel vs. Diaspora schedule, so callers do not
|
|
211
|
+
* need to inspect `flags.IL_ONLY` / `flags.CHUL_ONLY` themselves.
|
|
212
|
+
* Includes Rosh Chodesh, fasts, modern holidays, special Shabbatot, etc.,
|
|
213
|
+
* but does not generate candle-lighting times, Torah readings, or Omer days.
|
|
214
|
+
* @example
|
|
215
|
+
* import {HebrewCalendar} from '@hebcal/core';
|
|
216
|
+
* const events = HebrewCalendar.getHolidaysForYearArray(5784, false);
|
|
217
|
+
* console.log(events[0].getDesc()); // 'Rosh Hashana 5784'
|
|
197
218
|
* @param year Hebrew year
|
|
198
219
|
* @param il use the Israeli schedule for holidays
|
|
199
220
|
*/
|
|
200
221
|
static getHolidaysForYearArray(year: number, il: boolean): HolidayEvent[];
|
|
201
222
|
/**
|
|
202
|
-
* Returns an array of Events
|
|
223
|
+
* Returns an array of holiday Events that occur on the given date,
|
|
224
|
+
* or `undefined` if no holidays occur that day.
|
|
225
|
+
*
|
|
226
|
+
* When `il` is omitted, both Diaspora-only and Israel-only events are
|
|
227
|
+
* returned; pass `true` or `false` to filter to a single schedule.
|
|
228
|
+
* @example
|
|
229
|
+
* import {HebrewCalendar, HDate, months} from '@hebcal/core';
|
|
230
|
+
* const hd = new HDate(15, months.NISAN, 5784);
|
|
231
|
+
* const events = HebrewCalendar.getHolidaysOnDate(hd, false);
|
|
232
|
+
* console.log(events?.map(ev => ev.getDesc())); // ['Pesach I']
|
|
203
233
|
* @param date Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
204
234
|
* @param [il] use the Israeli schedule for holidays
|
|
205
235
|
*/
|
|
206
236
|
static getHolidaysOnDate(date: HDate | Date | number, il?: boolean): HolidayEvent[] | undefined;
|
|
207
237
|
/**
|
|
208
|
-
* Eruv Tavshilin
|
|
238
|
+
* Returns `true` if Eruv Tavshilin should be prepared on the given date.
|
|
239
|
+
*
|
|
240
|
+
* Eruv Tavshilin is prepared when a Yom Tov falls on Friday (so cooking
|
|
241
|
+
* for Shabbat that begins Friday night may continue from Yom Tov into
|
|
242
|
+
* Shabbat). This requires the day before to be a weekday (Wednesday or
|
|
243
|
+
* Thursday), the following Friday to be Yom Tov, and the day after Friday
|
|
244
|
+
* (Shabbat) to also be a sacred day.
|
|
245
|
+
* @example
|
|
246
|
+
* import {HebrewCalendar} from '@hebcal/core';
|
|
247
|
+
* // Thursday April 25, 2024 — first day of Pesach 5784, with Shabbat
|
|
248
|
+
* // chol ha-moed the next day, so Eruv Tavshilin is required:
|
|
249
|
+
* HebrewCalendar.eruvTavshilin(new Date(2024, 3, 25), false); // true
|
|
250
|
+
* @param date Gregorian or Hebrew date to test
|
|
251
|
+
* @param il use the Israeli holiday schedule
|
|
209
252
|
*/
|
|
210
253
|
static eruvTavshilin(date: Date | HDate, il: boolean): boolean;
|
|
211
254
|
/**
|
|
212
|
-
* Helper function to format a
|
|
213
|
-
*
|
|
214
|
-
* locale.
|
|
215
|
-
*
|
|
216
|
-
*
|
|
255
|
+
* Helper function to format a 24-hour (00:00-23:59) time string in either
|
|
256
|
+
* 12-hour US format (e.g. `"8:13pm"`) or keep it in 24-hour format (e.g.
|
|
257
|
+
* `"20:13"`) for any other locale or country.
|
|
258
|
+
*
|
|
259
|
+
* The locale (and therefore default behavior) is derived from
|
|
260
|
+
* `options.location` / `options.locale`. The `options.hour12` override
|
|
261
|
+
* takes precedence: if `false`, locale is ignored and the result is always
|
|
262
|
+
* 24-hour; if `true`, locale is ignored and the result is always 12-hour.
|
|
263
|
+
* @example
|
|
264
|
+
* import {HebrewCalendar, Location} from '@hebcal/core';
|
|
265
|
+
* const opts = {location: Location.lookup('Chicago')};
|
|
266
|
+
* HebrewCalendar.reformatTimeStr('20:30', 'pm', opts); // '8:30pm'
|
|
267
|
+
* HebrewCalendar.reformatTimeStr('20:30', 'pm', {hour12: false}); // '20:30'
|
|
217
268
|
* @param timeStr - original time like "20:30"
|
|
218
269
|
* @param suffix - "p" or "pm" or " P.M.". Add leading space if you want it
|
|
219
270
|
* @param options
|
|
220
271
|
*/
|
|
221
272
|
static reformatTimeStr(timeStr: string, suffix: string, options: CalOptions): string;
|
|
273
|
+
/**
|
|
274
|
+
* Returns the semantic version string of the `@hebcal/core` package
|
|
275
|
+
* (e.g. `"5.10.0"`). Useful for logging or feature detection.
|
|
276
|
+
*/
|
|
222
277
|
static version(): string;
|
|
223
278
|
/**
|
|
224
|
-
* Convenience function to create an instance of
|
|
225
|
-
* created and cached instance.
|
|
279
|
+
* Convenience function to create an instance of {@link Sedra} or reuse a
|
|
280
|
+
* previously created and cached instance for the same year + schedule.
|
|
281
|
+
*
|
|
282
|
+
* Use this in preference to `new Sedra(...)` when calling repeatedly,
|
|
283
|
+
* since an internal LRU cache (~120 entries) avoids recomputing the
|
|
284
|
+
* keviyah-specific reading pattern.
|
|
285
|
+
* @example
|
|
286
|
+
* import {HebrewCalendar} from '@hebcal/core';
|
|
287
|
+
* const sedra = HebrewCalendar.getSedra(5784, false);
|
|
288
|
+
* const result = sedra.lookup(new HDate(15, 'Cheshvan', 5784));
|
|
289
|
+
* console.log(result.parsha); // ['Lech-Lecha']
|
|
290
|
+
* @param hyear Hebrew year
|
|
291
|
+
* @param il Use Israel sedra schedule (`false` for Diaspora)
|
|
226
292
|
*/
|
|
227
293
|
static getSedra(hyear: number, il: boolean): Sedra;
|
|
228
294
|
/**
|
|
229
|
-
*
|
|
295
|
+
* Determines which form of Hallel (if any) is recited
|
|
296
|
+
* on a given Hebrew date.
|
|
297
|
+
*
|
|
298
|
+
* Returns 0 (none), 1 (half Hallel), or 2 (whole Hallel).
|
|
230
299
|
*
|
|
231
300
|
* Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
|
|
232
301
|
* Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
233
302
|
*
|
|
234
303
|
* Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* 1
|
|
240
|
-
* 2
|
|
304
|
+
* @returns 0 for no Hallel, 1 for half Hallel, 2 for whole Hallel
|
|
305
|
+
* @example
|
|
306
|
+
* import {HebrewCalendar, HDate, months} from '@hebcal/core';
|
|
307
|
+
* HebrewCalendar.hallel(new HDate(25, months.KISLEV, 5784), false); // 2 (Chanukah)
|
|
308
|
+
* HebrewCalendar.hallel(new HDate(1, months.SHVAT, 5784), false); // 1 (Rosh Chodesh)
|
|
309
|
+
* HebrewCalendar.hallel(new HDate(2, months.SHVAT, 5784), false); // 0
|
|
241
310
|
*/
|
|
242
311
|
static hallel(hdate: HDate, il: boolean): number;
|
|
243
312
|
/**
|
|
@@ -255,6 +324,15 @@ export declare class HebrewCalendar {
|
|
|
255
324
|
* Tachanun is not said at Mincha on days before it is not said at Shacharit.
|
|
256
325
|
*
|
|
257
326
|
* Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.
|
|
327
|
+
* @example
|
|
328
|
+
* import {HebrewCalendar, HDate, months} from '@hebcal/core';
|
|
329
|
+
* // Regular weekday — Tachanun is said at both services
|
|
330
|
+
* HebrewCalendar.tachanun(new HDate(2, months.SHVAT, 5784), false);
|
|
331
|
+
* // => { shacharit: true, mincha: true, allCongs: true }
|
|
332
|
+
*
|
|
333
|
+
* // Rosh Chodesh — no Tachanun
|
|
334
|
+
* HebrewCalendar.tachanun(new HDate(1, months.SHVAT, 5784), false);
|
|
335
|
+
* // => { shacharit: false, mincha: false, allCongs: false }
|
|
258
336
|
*/
|
|
259
337
|
static tachanun(hdate: HDate, il: boolean): TachanunResult;
|
|
260
338
|
}
|