@hebcal/core 5.0.1 → 5.0.3
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 +1007 -629
- package/dist/bundle.min.js +2 -2
- package/dist/{index.js → index.cjs} +874 -497
- package/dist/index.mjs +874 -497
- package/package.json +20 -13
package/dist/bundle.js
CHANGED
|
@@ -1,454 +1,112 @@
|
|
|
1
|
-
/*! @hebcal/core v5.0.
|
|
1
|
+
/*! @hebcal/core v5.0.3 */
|
|
2
2
|
var hebcal = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'ג': 3,
|
|
11
|
-
'ד': 4,
|
|
12
|
-
'ה': 5,
|
|
13
|
-
'ו': 6,
|
|
14
|
-
'ז': 7,
|
|
15
|
-
'ח': 8,
|
|
16
|
-
'ט': 9,
|
|
17
|
-
'י': 10,
|
|
18
|
-
'כ': 20,
|
|
19
|
-
'ל': 30,
|
|
20
|
-
'מ': 40,
|
|
21
|
-
'נ': 50,
|
|
22
|
-
'ס': 60,
|
|
23
|
-
'ע': 70,
|
|
24
|
-
'פ': 80,
|
|
25
|
-
'צ': 90,
|
|
26
|
-
'ק': 100,
|
|
27
|
-
'ר': 200,
|
|
28
|
-
'ש': 300,
|
|
29
|
-
'ת': 400
|
|
30
|
-
};
|
|
31
|
-
const num2heb = new Map();
|
|
32
|
-
for (const [key, val] of Object.entries(heb2num)) {
|
|
33
|
-
num2heb.set(val, key);
|
|
34
|
-
}
|
|
35
|
-
|
|
5
|
+
/** @private */
|
|
6
|
+
const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
7
|
+
/** @private */
|
|
8
|
+
const monthLengths = [lengths, lengths.slice()];
|
|
9
|
+
monthLengths[1][2] = 29;
|
|
36
10
|
/**
|
|
37
11
|
* @private
|
|
38
|
-
* @param {number} num
|
|
39
|
-
* @return {number[]}
|
|
40
12
|
*/
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
while (num > 0) {
|
|
44
|
-
if (num === 15 || num === 16) {
|
|
45
|
-
digits.push(9);
|
|
46
|
-
digits.push(num - 9);
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
let incr = 100;
|
|
50
|
-
let i;
|
|
51
|
-
for (i = 400; i > num; i -= incr) {
|
|
52
|
-
if (i === incr) {
|
|
53
|
-
incr = incr / 10;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
digits.push(i);
|
|
57
|
-
num -= i;
|
|
58
|
-
}
|
|
59
|
-
return digits;
|
|
13
|
+
function mod$1(x, y) {
|
|
14
|
+
return x - y * Math.floor(x / y);
|
|
60
15
|
}
|
|
61
|
-
|
|
62
16
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* When specifying years of the Hebrew calendar in the present millennium,
|
|
66
|
-
* we omit the thousands (which is presently 5 [ה]).
|
|
67
|
-
* @example
|
|
68
|
-
* gematriya(5774) // 'תשע״ד' - cropped to 774
|
|
69
|
-
* gematriya(25) // 'כ״ה'
|
|
70
|
-
* gematriya(60) // 'ס׳'
|
|
71
|
-
* gematriya(3761) // 'ג׳תשס״א'
|
|
72
|
-
* gematriya(1123) // 'א׳קכ״ג'
|
|
73
|
-
* @param {number} number
|
|
74
|
-
* @return {string}
|
|
17
|
+
* @private
|
|
75
18
|
*/
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
if (!num) {
|
|
79
|
-
throw new TypeError(`invalid parameter to gematriya ${number}`);
|
|
80
|
-
}
|
|
81
|
-
let str = '';
|
|
82
|
-
const thousands = Math.floor(num / 1000);
|
|
83
|
-
if (thousands > 0 && thousands !== 5) {
|
|
84
|
-
const tdigits = num2digits(thousands);
|
|
85
|
-
for (const tdig of tdigits) {
|
|
86
|
-
str += num2heb.get(tdig);
|
|
87
|
-
}
|
|
88
|
-
str += GERESH;
|
|
89
|
-
}
|
|
90
|
-
const digits = num2digits(num % 1000);
|
|
91
|
-
if (digits.length == 1) {
|
|
92
|
-
return str + num2heb.get(digits[0]) + GERESH;
|
|
93
|
-
}
|
|
94
|
-
for (let i = 0; i < digits.length; i++) {
|
|
95
|
-
if (i + 1 === digits.length) {
|
|
96
|
-
str += GERSHAYIM;
|
|
97
|
-
}
|
|
98
|
-
str += num2heb.get(digits[i]);
|
|
99
|
-
}
|
|
100
|
-
return str;
|
|
19
|
+
function quotient(x, y) {
|
|
20
|
+
return Math.floor(x / y);
|
|
101
21
|
}
|
|
102
|
-
|
|
22
|
+
/*
|
|
23
|
+
const ABS_14SEP1752 = 639797;
|
|
24
|
+
const ABS_2SEP1752 = 639785;
|
|
25
|
+
*/
|
|
103
26
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* Only considers the value of Hebrew letters `א` through `ת`.
|
|
107
|
-
* Ignores final Hebrew letters such as `ך` (kaf sofit) or `ם` (mem sofit)
|
|
108
|
-
* and vowels (nekudot).
|
|
109
|
-
*
|
|
110
|
-
* @param {string} str
|
|
111
|
-
* @return {number}
|
|
27
|
+
* Gregorian date helper functions.
|
|
112
28
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
29
|
+
exports.greg = void 0;
|
|
30
|
+
(function (greg) {
|
|
31
|
+
/**
|
|
32
|
+
* Long names of the Gregorian months (1='January', 12='December')
|
|
33
|
+
* @readonly
|
|
34
|
+
* @type {string[]}
|
|
35
|
+
*/
|
|
36
|
+
greg.monthNames = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
37
|
+
/**
|
|
38
|
+
* Returns true if the Gregorian year is a leap year
|
|
39
|
+
* @param {number} year Gregorian year
|
|
40
|
+
* @return {boolean}
|
|
41
|
+
*/
|
|
42
|
+
function isLeapYear(year) {
|
|
43
|
+
return !(year % 4) && (!!(year % 100) || !(year % 400));
|
|
120
44
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
45
|
+
greg.isLeapYear = isLeapYear;
|
|
46
|
+
/**
|
|
47
|
+
* Number of days in the Gregorian month for given year
|
|
48
|
+
* @param {number} month Gregorian month (1=January, 12=December)
|
|
49
|
+
* @param {number} year Gregorian year
|
|
50
|
+
* @return {number}
|
|
51
|
+
*/
|
|
52
|
+
function daysInMonth(month, year) {
|
|
53
|
+
// 1 based months
|
|
54
|
+
return monthLengths[+isLeapYear(year)][month];
|
|
126
55
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
'': {}
|
|
56
|
+
greg.daysInMonth = daysInMonth;
|
|
57
|
+
/**
|
|
58
|
+
* Returns true if the object is a Javascript Date
|
|
59
|
+
* @param {Object} obj
|
|
60
|
+
* @return {boolean}
|
|
61
|
+
*/
|
|
62
|
+
function isDate(obj) {
|
|
63
|
+
return typeof obj === 'object' && Date.prototype.isPrototypeOf(obj);
|
|
136
64
|
}
|
|
137
|
-
|
|
138
|
-
const alias = {
|
|
139
|
-
'h': 'he',
|
|
140
|
-
'a': 'ashkenazi',
|
|
141
|
-
's': 'en',
|
|
142
|
-
'': 'en'
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/** @private */
|
|
146
|
-
const locales = new Map();
|
|
147
|
-
/** @private */
|
|
148
|
-
let activeLocale = null;
|
|
149
|
-
/** @private */
|
|
150
|
-
let activeName = null;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* A locale in Hebcal is used for translations/transliterations of
|
|
154
|
-
* holidays. `@hebcal/core` supports four locales by default
|
|
155
|
-
* * `en` - default, Sephardic transliterations (e.g. "Shabbat")
|
|
156
|
-
* * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
|
|
157
|
-
* * `he` - Hebrew (e.g. "שַׁבָּת")
|
|
158
|
-
* * `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
|
|
159
|
-
*/
|
|
160
|
-
class Locale {
|
|
65
|
+
greg.isDate = isDate;
|
|
161
66
|
/**
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
* @param {string} id Message ID to translate
|
|
165
|
-
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
166
|
-
* @return {string}
|
|
67
|
+
* @private
|
|
68
|
+
* @param abs - R.D. number of days
|
|
167
69
|
*/
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
70
|
+
function yearFromFixed(abs) {
|
|
71
|
+
const l0 = abs - 1;
|
|
72
|
+
const n400 = quotient(l0, 146097);
|
|
73
|
+
const d1 = mod$1(l0, 146097);
|
|
74
|
+
const n100 = quotient(d1, 36524);
|
|
75
|
+
const d2 = mod$1(d1, 36524);
|
|
76
|
+
const n4 = quotient(d2, 1461);
|
|
77
|
+
const d3 = mod$1(d2, 1461);
|
|
78
|
+
const n1 = quotient(d3, 365);
|
|
79
|
+
const year = 400 * n400 + 100 * n100 + 4 * n4 + n1;
|
|
80
|
+
return n100 != 4 && n1 != 4 ? year + 1 : year;
|
|
176
81
|
}
|
|
177
|
-
|
|
178
82
|
/**
|
|
179
|
-
*
|
|
180
|
-
* @param
|
|
181
|
-
* @param
|
|
182
|
-
* @
|
|
83
|
+
* @private
|
|
84
|
+
* @param year
|
|
85
|
+
* @param month (1-12)
|
|
86
|
+
* @param day (1-31)
|
|
183
87
|
*/
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
return id;
|
|
188
|
-
}
|
|
189
|
-
return text;
|
|
88
|
+
function toFixed(year, month, day) {
|
|
89
|
+
const py = year - 1;
|
|
90
|
+
return 365 * py + quotient(py, 4) - quotient(py, 100) + quotient(py, 400) + quotient(367 * month - 362, 12) + (month <= 2 ? 0 : isLeapYear(year) ? -1 : -2) + day;
|
|
190
91
|
}
|
|
191
|
-
|
|
192
92
|
/**
|
|
193
|
-
*
|
|
194
|
-
* @param {
|
|
195
|
-
* @
|
|
93
|
+
* Converts Gregorian date to absolute R.D. (Rata Die) days
|
|
94
|
+
* @param {Date} date Gregorian date
|
|
95
|
+
* @return {number}
|
|
196
96
|
*/
|
|
197
|
-
|
|
198
|
-
if (
|
|
199
|
-
throw new TypeError(`
|
|
97
|
+
function greg2abs(date) {
|
|
98
|
+
if (!isDate(date)) {
|
|
99
|
+
throw new TypeError(`Argument not a Date: ${date}`);
|
|
200
100
|
}
|
|
201
|
-
|
|
202
|
-
|
|
101
|
+
const abs = toFixed(date.getFullYear(), date.getMonth() + 1, date.getDate());
|
|
102
|
+
/*
|
|
103
|
+
if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
|
|
104
|
+
throw new RangeError(`Invalid Date: ${date}`);
|
|
203
105
|
}
|
|
204
|
-
|
|
106
|
+
*/
|
|
107
|
+
return abs;
|
|
205
108
|
}
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Adds a translation to `locale`, replacing any previous translation.
|
|
209
|
-
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`).
|
|
210
|
-
* @param {string} id Message ID to translate
|
|
211
|
-
* @param {string} translation Translation text
|
|
212
|
-
*/
|
|
213
|
-
static addTranslation(locale, id, translation) {
|
|
214
|
-
if (typeof locale !== 'string') {
|
|
215
|
-
throw new TypeError(`Invalid locale name: ${locale}`);
|
|
216
|
-
}
|
|
217
|
-
const locale0 = locale.toLowerCase();
|
|
218
|
-
const loc = locales.get(locale0);
|
|
219
|
-
if (!loc) {
|
|
220
|
-
throw new TypeError(`Unknown locale: ${locale}`);
|
|
221
|
-
}
|
|
222
|
-
if (typeof id !== 'string' || id.length === 0) {
|
|
223
|
-
throw new TypeError(`Invalid id: ${id}`);
|
|
224
|
-
}
|
|
225
|
-
const isArray = Array.isArray(translation);
|
|
226
|
-
if (isArray) {
|
|
227
|
-
const t0 = translation[0];
|
|
228
|
-
if (typeof t0 !== 'string' || t0.length === 0) {
|
|
229
|
-
throw new TypeError(`Invalid translation array: ${translation}`);
|
|
230
|
-
}
|
|
231
|
-
} else if (typeof translation !== 'string') {
|
|
232
|
-
throw new TypeError(`Invalid translation: ${translation}`);
|
|
233
|
-
}
|
|
234
|
-
loc[id] = isArray ? translation : [translation];
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Adds multiple translations to `locale`, replacing any previous translations.
|
|
238
|
-
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`).
|
|
239
|
-
* @param {LocaleData} data parsed data from a `.po` file.
|
|
240
|
-
*/
|
|
241
|
-
static addTranslations(locale, data) {
|
|
242
|
-
if (typeof locale !== 'string') {
|
|
243
|
-
throw new TypeError(`Invalid locale name: ${locale}`);
|
|
244
|
-
}
|
|
245
|
-
const locale0 = locale.toLowerCase();
|
|
246
|
-
const loc = locales.get(locale0);
|
|
247
|
-
if (!loc) {
|
|
248
|
-
throw new TypeError(`Unknown locale: ${locale}`);
|
|
249
|
-
}
|
|
250
|
-
if (typeof data.contexts !== 'object' || typeof data.contexts[''] !== 'object') {
|
|
251
|
-
throw new TypeError(`Locale '${locale}' invalid compact format`);
|
|
252
|
-
}
|
|
253
|
-
const ctx = data.contexts[''];
|
|
254
|
-
Object.assign(loc, ctx);
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Activates a locale. Throws an error if the locale has not been previously added.
|
|
258
|
-
* After setting the locale to be used, all strings marked for translations
|
|
259
|
-
* will be represented by the corresponding translation in the specified locale.
|
|
260
|
-
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`)
|
|
261
|
-
* @return {LocaleData}
|
|
262
|
-
*/
|
|
263
|
-
static useLocale(locale) {
|
|
264
|
-
const locale0 = locale.toLowerCase();
|
|
265
|
-
const obj = locales.get(locale0);
|
|
266
|
-
if (!obj) {
|
|
267
|
-
throw new RangeError(`Locale '${locale}' not found`);
|
|
268
|
-
}
|
|
269
|
-
activeName = alias[locale0] || locale0;
|
|
270
|
-
activeLocale = obj;
|
|
271
|
-
return activeLocale;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
|
|
276
|
-
* @return {string}
|
|
277
|
-
*/
|
|
278
|
-
static getLocaleName() {
|
|
279
|
-
return activeName;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Returns the names of registered locales
|
|
284
|
-
* @return {string[]}
|
|
285
|
-
*/
|
|
286
|
-
static getLocaleNames() {
|
|
287
|
-
const keys = Array.from(locales.keys());
|
|
288
|
-
return keys.sort((a, b) => a.localeCompare(b));
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* @param {number} n
|
|
293
|
-
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
294
|
-
* @return {string}
|
|
295
|
-
*/
|
|
296
|
-
static ordinal(n, locale) {
|
|
297
|
-
const locale1 = locale === null || locale === void 0 ? void 0 : locale.toLowerCase();
|
|
298
|
-
const locale0 = locale1 || activeName;
|
|
299
|
-
if (!locale0) {
|
|
300
|
-
return this.getEnOrdinal(n);
|
|
301
|
-
}
|
|
302
|
-
switch (locale0) {
|
|
303
|
-
case 'en':
|
|
304
|
-
case 's':
|
|
305
|
-
case 'a':
|
|
306
|
-
case 'ashkenazi':
|
|
307
|
-
case 'ashkenazi_litvish':
|
|
308
|
-
case 'ashkenazi_poylish':
|
|
309
|
-
case 'ashkenazi_standard':
|
|
310
|
-
return this.getEnOrdinal(n);
|
|
311
|
-
case 'es':
|
|
312
|
-
return n + 'º';
|
|
313
|
-
case 'h':
|
|
314
|
-
case 'he':
|
|
315
|
-
case 'he-x-nonikud':
|
|
316
|
-
return String(n);
|
|
317
|
-
default:
|
|
318
|
-
return n + '.';
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* @private
|
|
324
|
-
* @param {number} n
|
|
325
|
-
* @return {string}
|
|
326
|
-
*/
|
|
327
|
-
static getEnOrdinal(n) {
|
|
328
|
-
const s = ['th', 'st', 'nd', 'rd'];
|
|
329
|
-
const v = n % 100;
|
|
330
|
-
return n + (s[(v - 20) % 10] || s[v] || s[0]);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Removes nekudot from Hebrew string
|
|
335
|
-
* @param {string} str
|
|
336
|
-
* @return {string}
|
|
337
|
-
*/
|
|
338
|
-
static hebrewStripNikkud(str) {
|
|
339
|
-
return str.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
Locale.addLocale('en', noopLocale);
|
|
343
|
-
Locale.addLocale('s', noopLocale);
|
|
344
|
-
Locale.addLocale('', noopLocale);
|
|
345
|
-
Locale.useLocale('en');
|
|
346
|
-
|
|
347
|
-
/** @private */
|
|
348
|
-
const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
349
|
-
/** @private */
|
|
350
|
-
const monthLengths = [lengths, lengths.slice()];
|
|
351
|
-
monthLengths[1][2] = 29;
|
|
352
|
-
/**
|
|
353
|
-
* @private
|
|
354
|
-
*/
|
|
355
|
-
function mod$1(x, y) {
|
|
356
|
-
return x - y * Math.floor(x / y);
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* @private
|
|
360
|
-
*/
|
|
361
|
-
function quotient(x, y) {
|
|
362
|
-
return Math.floor(x / y);
|
|
363
|
-
}
|
|
364
|
-
/*
|
|
365
|
-
const ABS_14SEP1752 = 639797;
|
|
366
|
-
const ABS_2SEP1752 = 639785;
|
|
367
|
-
*/
|
|
368
|
-
/**
|
|
369
|
-
* Gregorian date helper functions.
|
|
370
|
-
*/
|
|
371
|
-
exports.greg = void 0;
|
|
372
|
-
(function (greg) {
|
|
373
|
-
/**
|
|
374
|
-
* Long names of the Gregorian months (1='January', 12='December')
|
|
375
|
-
* @readonly
|
|
376
|
-
* @type {string[]}
|
|
377
|
-
*/
|
|
378
|
-
greg.monthNames = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
379
|
-
/**
|
|
380
|
-
* Returns true if the Gregorian year is a leap year
|
|
381
|
-
* @param {number} year Gregorian year
|
|
382
|
-
* @return {boolean}
|
|
383
|
-
*/
|
|
384
|
-
function isLeapYear(year) {
|
|
385
|
-
return !(year % 4) && (!!(year % 100) || !(year % 400));
|
|
386
|
-
}
|
|
387
|
-
greg.isLeapYear = isLeapYear;
|
|
388
|
-
/**
|
|
389
|
-
* Number of days in the Gregorian month for given year
|
|
390
|
-
* @param {number} month Gregorian month (1=January, 12=December)
|
|
391
|
-
* @param {number} year Gregorian year
|
|
392
|
-
* @return {number}
|
|
393
|
-
*/
|
|
394
|
-
function daysInMonth(month, year) {
|
|
395
|
-
// 1 based months
|
|
396
|
-
return monthLengths[+isLeapYear(year)][month];
|
|
397
|
-
}
|
|
398
|
-
greg.daysInMonth = daysInMonth;
|
|
399
|
-
/**
|
|
400
|
-
* Returns true if the object is a Javascript Date
|
|
401
|
-
* @param {Object} obj
|
|
402
|
-
* @return {boolean}
|
|
403
|
-
*/
|
|
404
|
-
function isDate(obj) {
|
|
405
|
-
return typeof obj === 'object' && Date.prototype.isPrototypeOf(obj);
|
|
406
|
-
}
|
|
407
|
-
greg.isDate = isDate;
|
|
408
|
-
/**
|
|
409
|
-
* @private
|
|
410
|
-
* @param abs - R.D. number of days
|
|
411
|
-
*/
|
|
412
|
-
function yearFromFixed(abs) {
|
|
413
|
-
const l0 = abs - 1;
|
|
414
|
-
const n400 = quotient(l0, 146097);
|
|
415
|
-
const d1 = mod$1(l0, 146097);
|
|
416
|
-
const n100 = quotient(d1, 36524);
|
|
417
|
-
const d2 = mod$1(d1, 36524);
|
|
418
|
-
const n4 = quotient(d2, 1461);
|
|
419
|
-
const d3 = mod$1(d2, 1461);
|
|
420
|
-
const n1 = quotient(d3, 365);
|
|
421
|
-
const year = 400 * n400 + 100 * n100 + 4 * n4 + n1;
|
|
422
|
-
return n100 != 4 && n1 != 4 ? year + 1 : year;
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* @private
|
|
426
|
-
* @param year
|
|
427
|
-
* @param month (1-12)
|
|
428
|
-
* @param day (1-31)
|
|
429
|
-
*/
|
|
430
|
-
function toFixed(year, month, day) {
|
|
431
|
-
const py = year - 1;
|
|
432
|
-
return 365 * py + quotient(py, 4) - quotient(py, 100) + quotient(py, 400) + quotient(367 * month - 362, 12) + (month <= 2 ? 0 : isLeapYear(year) ? -1 : -2) + day;
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* Converts Gregorian date to absolute R.D. (Rata Die) days
|
|
436
|
-
* @param {Date} date Gregorian date
|
|
437
|
-
* @return {number}
|
|
438
|
-
*/
|
|
439
|
-
function greg2abs(date) {
|
|
440
|
-
if (!isDate(date)) {
|
|
441
|
-
throw new TypeError(`Argument not a Date: ${date}`);
|
|
442
|
-
}
|
|
443
|
-
const abs = toFixed(date.getFullYear(), date.getMonth() + 1, date.getDate());
|
|
444
|
-
/*
|
|
445
|
-
if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
|
|
446
|
-
throw new RangeError(`Invalid Date: ${date}`);
|
|
447
|
-
}
|
|
448
|
-
*/
|
|
449
|
-
return abs;
|
|
450
|
-
}
|
|
451
|
-
greg.greg2abs = greg2abs;
|
|
109
|
+
greg.greg2abs = greg2abs;
|
|
452
110
|
/**
|
|
453
111
|
* Converts from Rata Die (R.D. number) to Gregorian date.
|
|
454
112
|
* See the footnote on page 384 of ``Calendrical Calculations, Part II:
|
|
@@ -497,7 +155,7 @@ const KISLEV$2 = 9;
|
|
|
497
155
|
const TEVET$2 = 10;
|
|
498
156
|
// const SHVAT = 11;
|
|
499
157
|
const ADAR_I$2 = 12;
|
|
500
|
-
const ADAR_II$
|
|
158
|
+
const ADAR_II$2 = 13;
|
|
501
159
|
/**
|
|
502
160
|
* Hebrew months of the year (NISAN=1, TISHREI=7)
|
|
503
161
|
* @readonly
|
|
@@ -643,7 +301,7 @@ function daysInMonth(month, year) {
|
|
|
643
301
|
case TAMUZ$1:
|
|
644
302
|
case ELUL$2:
|
|
645
303
|
case TEVET$2:
|
|
646
|
-
case ADAR_II$
|
|
304
|
+
case ADAR_II$2:
|
|
647
305
|
return 29;
|
|
648
306
|
}
|
|
649
307
|
if (month === ADAR_I$2 && !isLeapYear(year) || month === CHESHVAN$1 && !longCheshvan(year) || month === KISLEV$2 && shortKislev(year)) {
|
|
@@ -849,104 +507,441 @@ function monthFromName(monthName) {
|
|
|
849
507
|
}
|
|
850
508
|
break;
|
|
851
509
|
}
|
|
852
|
-
throw new RangeError(`Unable to parse month name: ${monthName}`);
|
|
853
|
-
}
|
|
510
|
+
throw new RangeError(`Unable to parse month name: ${monthName}`);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const NISAN$3 = months.NISAN;
|
|
514
|
+
const CHESHVAN = months.CHESHVAN;
|
|
515
|
+
const KISLEV$1 = months.KISLEV;
|
|
516
|
+
const TEVET$1 = months.TEVET;
|
|
517
|
+
const SHVAT = months.SHVAT;
|
|
518
|
+
const ADAR_I$1 = months.ADAR_I;
|
|
519
|
+
const ADAR_II$1 = months.ADAR_II;
|
|
520
|
+
/**
|
|
521
|
+
* Returns true if the object is a Javascript Date
|
|
522
|
+
* @private
|
|
523
|
+
* @param {Object} obj
|
|
524
|
+
*/
|
|
525
|
+
function isSimpleHebrewDate(obj) {
|
|
526
|
+
return typeof obj === 'object' && obj !== null && typeof obj.yy === 'number' && typeof obj.mm === 'number' && typeof obj.dd === 'number';
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* @private
|
|
530
|
+
*/
|
|
531
|
+
function toSimpleHebrewDate(obj) {
|
|
532
|
+
if (isSimpleHebrewDate(obj)) {
|
|
533
|
+
return obj;
|
|
534
|
+
} else if (typeof obj === 'number') {
|
|
535
|
+
return abs2hebrew(obj);
|
|
536
|
+
} else if (exports.greg.isDate(obj)) {
|
|
537
|
+
const abs = exports.greg.greg2abs(obj);
|
|
538
|
+
return abs2hebrew(abs);
|
|
539
|
+
} else {
|
|
540
|
+
throw new TypeError(`Argument not a Date: ${obj}`);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function getYahrzeitHD(hyear, date) {
|
|
544
|
+
let hDeath = toSimpleHebrewDate(date);
|
|
545
|
+
if (hyear <= hDeath.yy) {
|
|
546
|
+
// Hebrew year ${hyear} occurs on or before original date in ${hDeath.yy}
|
|
547
|
+
return undefined;
|
|
548
|
+
}
|
|
549
|
+
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !longCheshvan(hDeath.yy + 1)) {
|
|
550
|
+
// If it's Heshvan 30 it depends on the first anniversary;
|
|
551
|
+
// if that was not Heshvan 30, use the day before Kislev 1.
|
|
552
|
+
hDeath = abs2hebrew(hebrew2abs(hyear, KISLEV$1, 1) - 1);
|
|
553
|
+
} else if (hDeath.mm == KISLEV$1 && hDeath.dd == 30 && shortKislev(hDeath.yy + 1)) {
|
|
554
|
+
// If it's Kislev 30 it depends on the first anniversary;
|
|
555
|
+
// if that was not Kislev 30, use the day before Teveth 1.
|
|
556
|
+
hDeath = abs2hebrew(hebrew2abs(hyear, TEVET$1, 1) - 1);
|
|
557
|
+
} else if (hDeath.mm == ADAR_II$1) {
|
|
558
|
+
// If it's Adar II, use the same day in last month of year (Adar or Adar II).
|
|
559
|
+
hDeath.mm = monthsInYear(hyear);
|
|
560
|
+
} else if (hDeath.mm == ADAR_I$1 && hDeath.dd == 30 && !isLeapYear(hyear)) {
|
|
561
|
+
// If it's the 30th in Adar I and year is not a leap year
|
|
562
|
+
// (so Adar has only 29 days), use the last day in Shevat.
|
|
563
|
+
hDeath.dd = 30;
|
|
564
|
+
hDeath.mm = SHVAT;
|
|
565
|
+
}
|
|
566
|
+
// In all other cases, use the normal anniversary of the date of death.
|
|
567
|
+
// advance day to rosh chodesh if needed
|
|
568
|
+
if (hDeath.mm == CHESHVAN && hDeath.dd == 30 && !longCheshvan(hyear)) {
|
|
569
|
+
hDeath.mm = KISLEV$1;
|
|
570
|
+
hDeath.dd = 1;
|
|
571
|
+
} else if (hDeath.mm == KISLEV$1 && hDeath.dd == 30 && shortKislev(hyear)) {
|
|
572
|
+
hDeath.mm = TEVET$1;
|
|
573
|
+
hDeath.dd = 1;
|
|
574
|
+
}
|
|
575
|
+
hDeath.yy = hyear;
|
|
576
|
+
return hDeath;
|
|
577
|
+
}
|
|
578
|
+
function getBirthdayHD(hyear, date) {
|
|
579
|
+
const orig = toSimpleHebrewDate(date);
|
|
580
|
+
const origYear = orig.yy;
|
|
581
|
+
if (hyear === origYear) {
|
|
582
|
+
return orig;
|
|
583
|
+
} else if (hyear < origYear) {
|
|
584
|
+
// Hebrew year ${hyear} occurs on or before original date in ${origYear}
|
|
585
|
+
return undefined;
|
|
586
|
+
}
|
|
587
|
+
const isOrigLeap = isLeapYear(origYear);
|
|
588
|
+
let month = orig.mm;
|
|
589
|
+
let day = orig.dd;
|
|
590
|
+
if (month == ADAR_I$1 && !isOrigLeap || month == ADAR_II$1 && isOrigLeap) {
|
|
591
|
+
month = monthsInYear(hyear);
|
|
592
|
+
} else if (month == CHESHVAN && day == 30 && !longCheshvan(hyear)) {
|
|
593
|
+
month = KISLEV$1;
|
|
594
|
+
day = 1;
|
|
595
|
+
} else if (month == KISLEV$1 && day == 30 && shortKislev(hyear)) {
|
|
596
|
+
month = TEVET$1;
|
|
597
|
+
day = 1;
|
|
598
|
+
} else if (month == ADAR_I$1 && day == 30 && isOrigLeap && !isLeapYear(hyear)) {
|
|
599
|
+
month = NISAN$3;
|
|
600
|
+
day = 1;
|
|
601
|
+
}
|
|
602
|
+
return {
|
|
603
|
+
yy: hyear,
|
|
604
|
+
mm: month,
|
|
605
|
+
dd: day
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
const GERESH = '׳';
|
|
610
|
+
const GERSHAYIM = '״';
|
|
611
|
+
const alefbet = {
|
|
612
|
+
'א': 1,
|
|
613
|
+
'ב': 2,
|
|
614
|
+
'ג': 3,
|
|
615
|
+
'ד': 4,
|
|
616
|
+
'ה': 5,
|
|
617
|
+
'ו': 6,
|
|
618
|
+
'ז': 7,
|
|
619
|
+
'ח': 8,
|
|
620
|
+
'ט': 9,
|
|
621
|
+
'י': 10,
|
|
622
|
+
'כ': 20,
|
|
623
|
+
'ל': 30,
|
|
624
|
+
'מ': 40,
|
|
625
|
+
'נ': 50,
|
|
626
|
+
'ס': 60,
|
|
627
|
+
'ע': 70,
|
|
628
|
+
'פ': 80,
|
|
629
|
+
'צ': 90,
|
|
630
|
+
'ק': 100,
|
|
631
|
+
'ר': 200,
|
|
632
|
+
'ש': 300,
|
|
633
|
+
'ת': 400
|
|
634
|
+
};
|
|
635
|
+
const heb2num = new Map();
|
|
636
|
+
const num2heb = new Map();
|
|
637
|
+
for (const [key, val] of Object.entries(alefbet)) {
|
|
638
|
+
heb2num.set(key, val);
|
|
639
|
+
num2heb.set(val, key);
|
|
640
|
+
}
|
|
641
|
+
function num2digits(num) {
|
|
642
|
+
const digits = [];
|
|
643
|
+
while (num > 0) {
|
|
644
|
+
if (num === 15 || num === 16) {
|
|
645
|
+
digits.push(9);
|
|
646
|
+
digits.push(num - 9);
|
|
647
|
+
break;
|
|
648
|
+
}
|
|
649
|
+
let incr = 100;
|
|
650
|
+
let i;
|
|
651
|
+
for (i = 400; i > num; i -= incr) {
|
|
652
|
+
if (i === incr) {
|
|
653
|
+
incr = incr / 10;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
digits.push(i);
|
|
657
|
+
num -= i;
|
|
658
|
+
}
|
|
659
|
+
return digits;
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Converts a numerical value to a string of Hebrew letters.
|
|
663
|
+
*
|
|
664
|
+
* When specifying years of the Hebrew calendar in the present millennium,
|
|
665
|
+
* we omit the thousands (which is presently 5 [ה]).
|
|
666
|
+
* @example
|
|
667
|
+
* gematriya(5774) // 'תשע״ד' - cropped to 774
|
|
668
|
+
* gematriya(25) // 'כ״ה'
|
|
669
|
+
* gematriya(60) // 'ס׳'
|
|
670
|
+
* gematriya(3761) // 'ג׳תשס״א'
|
|
671
|
+
* gematriya(1123) // 'א׳קכ״ג'
|
|
672
|
+
* @param {number} num
|
|
673
|
+
* @return {string}
|
|
674
|
+
*/
|
|
675
|
+
function gematriya(num) {
|
|
676
|
+
const num0 = num;
|
|
677
|
+
const num1 = parseInt(num0, 10);
|
|
678
|
+
if (!num1) {
|
|
679
|
+
throw new TypeError(`invalid parameter to gematriya ${num}`);
|
|
680
|
+
}
|
|
681
|
+
let str = '';
|
|
682
|
+
const thousands = Math.floor(num1 / 1000);
|
|
683
|
+
if (thousands > 0 && thousands !== 5) {
|
|
684
|
+
const tdigits = num2digits(thousands);
|
|
685
|
+
for (const tdig of tdigits) {
|
|
686
|
+
str += num2heb.get(tdig);
|
|
687
|
+
}
|
|
688
|
+
str += GERESH;
|
|
689
|
+
}
|
|
690
|
+
const digits = num2digits(num1 % 1000);
|
|
691
|
+
if (digits.length == 1) {
|
|
692
|
+
return str + num2heb.get(digits[0]) + GERESH;
|
|
693
|
+
}
|
|
694
|
+
for (let i = 0; i < digits.length; i++) {
|
|
695
|
+
if (i + 1 === digits.length) {
|
|
696
|
+
str += GERSHAYIM;
|
|
697
|
+
}
|
|
698
|
+
str += num2heb.get(digits[i]);
|
|
699
|
+
}
|
|
700
|
+
return str;
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Converts a string of Hebrew letters to a numerical value.
|
|
704
|
+
*
|
|
705
|
+
* Only considers the value of Hebrew letters `א` through `ת`.
|
|
706
|
+
* Ignores final Hebrew letters such as `ך` (kaf sofit) or `ם` (mem sofit)
|
|
707
|
+
* and vowels (nekudot).
|
|
708
|
+
*
|
|
709
|
+
* @param {string} str
|
|
710
|
+
* @return {number}
|
|
711
|
+
*/
|
|
712
|
+
function gematriyaStrToNum(str) {
|
|
713
|
+
let num = 0;
|
|
714
|
+
const gereshIdx = str.indexOf(GERESH);
|
|
715
|
+
if (gereshIdx !== -1 && gereshIdx !== str.length - 1) {
|
|
716
|
+
const thousands = str.substring(0, gereshIdx);
|
|
717
|
+
num += gematriyaStrToNum(thousands) * 1000;
|
|
718
|
+
str = str.substring(gereshIdx);
|
|
719
|
+
}
|
|
720
|
+
for (const ch of str) {
|
|
721
|
+
const n = heb2num.get(ch);
|
|
722
|
+
if (typeof n === 'number') {
|
|
723
|
+
num += n;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
return num;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
const noopLocale = {
|
|
730
|
+
headers: {
|
|
731
|
+
'plural-forms': 'nplurals=2; plural=(n!=1);'
|
|
732
|
+
},
|
|
733
|
+
contexts: {
|
|
734
|
+
'': {}
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
const alias = {
|
|
738
|
+
'h': 'he',
|
|
739
|
+
'a': 'ashkenazi',
|
|
740
|
+
's': 'en',
|
|
741
|
+
'': 'en'
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
/** @private */
|
|
745
|
+
const locales = new Map();
|
|
746
|
+
/** @private */
|
|
747
|
+
let activeLocale = null;
|
|
748
|
+
/** @private */
|
|
749
|
+
let activeName = null;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* A locale in Hebcal is used for translations/transliterations of
|
|
753
|
+
* holidays. `@hebcal/core` supports four locales by default
|
|
754
|
+
* * `en` - default, Sephardic transliterations (e.g. "Shabbat")
|
|
755
|
+
* * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
|
|
756
|
+
* * `he` - Hebrew (e.g. "שַׁבָּת")
|
|
757
|
+
* * `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
|
|
758
|
+
*/
|
|
759
|
+
class Locale {
|
|
760
|
+
/**
|
|
761
|
+
* Returns translation only if `locale` offers a non-empty translation for `id`.
|
|
762
|
+
* Otherwise, returns `undefined`.
|
|
763
|
+
* @param {string} id Message ID to translate
|
|
764
|
+
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
765
|
+
* @return {string}
|
|
766
|
+
*/
|
|
767
|
+
static lookupTranslation(id, locale) {
|
|
768
|
+
const locale0 = locale === null || locale === void 0 ? void 0 : locale.toLowerCase();
|
|
769
|
+
const loc = typeof locale == 'string' && locales.get(locale0) || activeLocale;
|
|
770
|
+
const array = loc[id];
|
|
771
|
+
if (array !== null && array !== void 0 && array.length && array[0].length) {
|
|
772
|
+
return array[0];
|
|
773
|
+
}
|
|
774
|
+
return undefined;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* By default, if no translation was found, returns `id`.
|
|
779
|
+
* @param {string} id Message ID to translate
|
|
780
|
+
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
781
|
+
* @return {string}
|
|
782
|
+
*/
|
|
783
|
+
static gettext(id, locale) {
|
|
784
|
+
const text = this.lookupTranslation(id, locale);
|
|
785
|
+
if (typeof text == 'undefined') {
|
|
786
|
+
return id;
|
|
787
|
+
}
|
|
788
|
+
return text;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Register locale translations.
|
|
793
|
+
* @param {string} locale Locale name (i.e.: `'he'`, `'fr'`)
|
|
794
|
+
* @param {LocaleData} data parsed data from a `.po` file.
|
|
795
|
+
*/
|
|
796
|
+
static addLocale(locale, data) {
|
|
797
|
+
if (typeof locale !== 'string') {
|
|
798
|
+
throw new TypeError(`Invalid locale name: ${locale}`);
|
|
799
|
+
}
|
|
800
|
+
if (typeof data.contexts !== 'object' || typeof data.contexts[''] !== 'object') {
|
|
801
|
+
throw new TypeError(`Locale '${locale}' invalid compact format`);
|
|
802
|
+
}
|
|
803
|
+
locales.set(locale.toLowerCase(), data.contexts['']);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Adds a translation to `locale`, replacing any previous translation.
|
|
808
|
+
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`).
|
|
809
|
+
* @param {string} id Message ID to translate
|
|
810
|
+
* @param {string} translation Translation text
|
|
811
|
+
*/
|
|
812
|
+
static addTranslation(locale, id, translation) {
|
|
813
|
+
if (typeof locale !== 'string') {
|
|
814
|
+
throw new TypeError(`Invalid locale name: ${locale}`);
|
|
815
|
+
}
|
|
816
|
+
const locale0 = locale.toLowerCase();
|
|
817
|
+
const loc = locales.get(locale0);
|
|
818
|
+
if (!loc) {
|
|
819
|
+
throw new TypeError(`Unknown locale: ${locale}`);
|
|
820
|
+
}
|
|
821
|
+
if (typeof id !== 'string' || id.length === 0) {
|
|
822
|
+
throw new TypeError(`Invalid id: ${id}`);
|
|
823
|
+
}
|
|
824
|
+
const isArray = Array.isArray(translation);
|
|
825
|
+
if (isArray) {
|
|
826
|
+
const t0 = translation[0];
|
|
827
|
+
if (typeof t0 !== 'string' || t0.length === 0) {
|
|
828
|
+
throw new TypeError(`Invalid translation array: ${translation}`);
|
|
829
|
+
}
|
|
830
|
+
} else if (typeof translation !== 'string') {
|
|
831
|
+
throw new TypeError(`Invalid translation: ${translation}`);
|
|
832
|
+
}
|
|
833
|
+
loc[id] = isArray ? translation : [translation];
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Adds multiple translations to `locale`, replacing any previous translations.
|
|
837
|
+
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`).
|
|
838
|
+
* @param {LocaleData} data parsed data from a `.po` file.
|
|
839
|
+
*/
|
|
840
|
+
static addTranslations(locale, data) {
|
|
841
|
+
if (typeof locale !== 'string') {
|
|
842
|
+
throw new TypeError(`Invalid locale name: ${locale}`);
|
|
843
|
+
}
|
|
844
|
+
const locale0 = locale.toLowerCase();
|
|
845
|
+
const loc = locales.get(locale0);
|
|
846
|
+
if (!loc) {
|
|
847
|
+
throw new TypeError(`Unknown locale: ${locale}`);
|
|
848
|
+
}
|
|
849
|
+
if (typeof data.contexts !== 'object' || typeof data.contexts[''] !== 'object') {
|
|
850
|
+
throw new TypeError(`Locale '${locale}' invalid compact format`);
|
|
851
|
+
}
|
|
852
|
+
const ctx = data.contexts[''];
|
|
853
|
+
Object.assign(loc, ctx);
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Activates a locale. Throws an error if the locale has not been previously added.
|
|
857
|
+
* After setting the locale to be used, all strings marked for translations
|
|
858
|
+
* will be represented by the corresponding translation in the specified locale.
|
|
859
|
+
* @param {string} locale Locale name (i.e: `'he'`, `'fr'`)
|
|
860
|
+
* @return {LocaleData}
|
|
861
|
+
*/
|
|
862
|
+
static useLocale(locale) {
|
|
863
|
+
const locale0 = locale.toLowerCase();
|
|
864
|
+
const obj = locales.get(locale0);
|
|
865
|
+
if (!obj) {
|
|
866
|
+
throw new RangeError(`Locale '${locale}' not found`);
|
|
867
|
+
}
|
|
868
|
+
activeName = alias[locale0] || locale0;
|
|
869
|
+
activeLocale = obj;
|
|
870
|
+
return activeLocale;
|
|
871
|
+
}
|
|
854
872
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
const ADAR_II = months.ADAR_II;
|
|
862
|
-
/**
|
|
863
|
-
* Returns true if the object is a Javascript Date
|
|
864
|
-
* @private
|
|
865
|
-
* @param {Object} obj
|
|
866
|
-
*/
|
|
867
|
-
function isSimpleHebrewDate(obj) {
|
|
868
|
-
return typeof obj === 'object' && obj !== null && typeof obj.yy === 'number' && typeof obj.mm === 'number' && typeof obj.dd === 'number';
|
|
869
|
-
}
|
|
870
|
-
/**
|
|
871
|
-
* @private
|
|
872
|
-
*/
|
|
873
|
-
function toSimpleHebrewDate(obj) {
|
|
874
|
-
if (isSimpleHebrewDate(obj)) {
|
|
875
|
-
return obj;
|
|
876
|
-
} else if (typeof obj === 'number') {
|
|
877
|
-
return abs2hebrew(obj);
|
|
878
|
-
} else if (exports.greg.isDate(obj)) {
|
|
879
|
-
const abs = exports.greg.greg2abs(obj);
|
|
880
|
-
return abs2hebrew(abs);
|
|
881
|
-
} else {
|
|
882
|
-
throw new TypeError(`Argument not a Date: ${obj}`);
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
function getYahrzeitHD(hyear, date) {
|
|
886
|
-
let hDeath = toSimpleHebrewDate(date);
|
|
887
|
-
if (hyear <= hDeath.yy) {
|
|
888
|
-
// Hebrew year ${hyear} occurs on or before original date in ${hDeath.yy}
|
|
889
|
-
return undefined;
|
|
873
|
+
/**
|
|
874
|
+
* Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
|
|
875
|
+
* @return {string}
|
|
876
|
+
*/
|
|
877
|
+
static getLocaleName() {
|
|
878
|
+
return activeName;
|
|
890
879
|
}
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
} else if (hDeath.mm == ADAR_II) {
|
|
900
|
-
// If it's Adar II, use the same day in last month of year (Adar or Adar II).
|
|
901
|
-
hDeath.mm = monthsInYear(hyear);
|
|
902
|
-
} else if (hDeath.mm == ADAR_I$1 && hDeath.dd == 30 && !isLeapYear(hyear)) {
|
|
903
|
-
// If it's the 30th in Adar I and year is not a leap year
|
|
904
|
-
// (so Adar has only 29 days), use the last day in Shevat.
|
|
905
|
-
hDeath.dd = 30;
|
|
906
|
-
hDeath.mm = SHVAT;
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Returns the names of registered locales
|
|
883
|
+
* @return {string[]}
|
|
884
|
+
*/
|
|
885
|
+
static getLocaleNames() {
|
|
886
|
+
const keys = Array.from(locales.keys());
|
|
887
|
+
return keys.sort((a, b) => a.localeCompare(b));
|
|
907
888
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* @param {number} n
|
|
892
|
+
* @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
893
|
+
* @return {string}
|
|
894
|
+
*/
|
|
895
|
+
static ordinal(n, locale) {
|
|
896
|
+
const locale1 = locale === null || locale === void 0 ? void 0 : locale.toLowerCase();
|
|
897
|
+
const locale0 = locale1 || activeName;
|
|
898
|
+
if (!locale0) {
|
|
899
|
+
return this.getEnOrdinal(n);
|
|
900
|
+
}
|
|
901
|
+
switch (locale0) {
|
|
902
|
+
case 'en':
|
|
903
|
+
case 's':
|
|
904
|
+
case 'a':
|
|
905
|
+
case 'ashkenazi':
|
|
906
|
+
case 'ashkenazi_litvish':
|
|
907
|
+
case 'ashkenazi_poylish':
|
|
908
|
+
case 'ashkenazi_standard':
|
|
909
|
+
return this.getEnOrdinal(n);
|
|
910
|
+
case 'es':
|
|
911
|
+
return n + 'º';
|
|
912
|
+
case 'h':
|
|
913
|
+
case 'he':
|
|
914
|
+
case 'he-x-nonikud':
|
|
915
|
+
return String(n);
|
|
916
|
+
default:
|
|
917
|
+
return n + '.';
|
|
918
|
+
}
|
|
916
919
|
}
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
return undefined;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* @private
|
|
923
|
+
* @param {number} n
|
|
924
|
+
* @return {string}
|
|
925
|
+
*/
|
|
926
|
+
static getEnOrdinal(n) {
|
|
927
|
+
const s = ['th', 'st', 'nd', 'rd'];
|
|
928
|
+
const v = n % 100;
|
|
929
|
+
return n + (s[(v - 20) % 10] || s[v] || s[0]);
|
|
928
930
|
}
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
} else if (month == KISLEV$1 && day == 30 && shortKislev(hyear)) {
|
|
938
|
-
month = TEVET$1;
|
|
939
|
-
day = 1;
|
|
940
|
-
} else if (month == ADAR_I$1 && day == 30 && isOrigLeap && !isLeapYear(hyear)) {
|
|
941
|
-
month = NISAN$3;
|
|
942
|
-
day = 1;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Removes nekudot from Hebrew string
|
|
934
|
+
* @param {string} str
|
|
935
|
+
* @return {string}
|
|
936
|
+
*/
|
|
937
|
+
static hebrewStripNikkud(str) {
|
|
938
|
+
return str.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
|
|
943
939
|
}
|
|
944
|
-
return {
|
|
945
|
-
yy: hyear,
|
|
946
|
-
mm: month,
|
|
947
|
-
dd: day
|
|
948
|
-
};
|
|
949
940
|
}
|
|
941
|
+
Locale.addLocale('en', noopLocale);
|
|
942
|
+
Locale.addLocale('s', noopLocale);
|
|
943
|
+
Locale.addLocale('', noopLocale);
|
|
944
|
+
Locale.useLocale('en');
|
|
950
945
|
|
|
951
946
|
/**
|
|
952
947
|
* @private
|
|
@@ -1946,15 +1941,24 @@ class HebrewDateEvent extends Event {
|
|
|
1946
1941
|
switch (locale0) {
|
|
1947
1942
|
case 'h':
|
|
1948
1943
|
case 'he':
|
|
1944
|
+
return hd.renderGematriya(false);
|
|
1949
1945
|
case 'he-x-nonikud':
|
|
1950
|
-
|
|
1951
|
-
const mm = Locale.gettext(hd.getMonthName(), locale0);
|
|
1952
|
-
const yy = hd.getFullYear();
|
|
1953
|
-
return gematriya(dd) + ' ' + mm + ' ' + gematriya(yy);
|
|
1946
|
+
return hd.renderGematriya(true);
|
|
1954
1947
|
default:
|
|
1955
1948
|
return hd.render(locale0, true);
|
|
1956
1949
|
}
|
|
1957
1950
|
}
|
|
1951
|
+
/**
|
|
1952
|
+
* @private
|
|
1953
|
+
* @param {string} locale
|
|
1954
|
+
* @return {string}
|
|
1955
|
+
*/
|
|
1956
|
+
renderBriefHebrew(locale) {
|
|
1957
|
+
const hd = this.getDate();
|
|
1958
|
+
const dd = hd.getDate();
|
|
1959
|
+
const mm = Locale.gettext(hd.getMonthName(), locale);
|
|
1960
|
+
return gematriya(dd) + ' ' + mm;
|
|
1961
|
+
}
|
|
1958
1962
|
/**
|
|
1959
1963
|
* @param {string} [locale] Optional locale name (defaults to active locale).
|
|
1960
1964
|
* @example
|
|
@@ -1977,9 +1981,7 @@ class HebrewDateEvent extends Event {
|
|
|
1977
1981
|
case 'h':
|
|
1978
1982
|
case 'he':
|
|
1979
1983
|
case 'he-x-nonikud':
|
|
1980
|
-
|
|
1981
|
-
const mm = Locale.gettext(hd.getMonthName(), locale0);
|
|
1982
|
-
return gematriya(dd) + ' ' + mm;
|
|
1984
|
+
return this.renderBriefHebrew(locale0);
|
|
1983
1985
|
default:
|
|
1984
1986
|
return hd.render(locale0, false);
|
|
1985
1987
|
}
|
|
@@ -7049,10 +7051,8 @@ class Zmanim {
|
|
|
7049
7051
|
}
|
|
7050
7052
|
|
|
7051
7053
|
/* eslint-disable max-len */
|
|
7052
|
-
const
|
|
7053
|
-
|
|
7054
|
-
SAT: 6
|
|
7055
|
-
};
|
|
7054
|
+
const FRI$3 = 5;
|
|
7055
|
+
const SAT$3 = 6;
|
|
7056
7056
|
|
|
7057
7057
|
/**
|
|
7058
7058
|
* @private
|
|
@@ -7065,11 +7065,11 @@ const days = {
|
|
|
7065
7065
|
*/
|
|
7066
7066
|
function makeCandleEvent(e, hd, dow, location, options) {
|
|
7067
7067
|
let havdalahTitle = false;
|
|
7068
|
-
let useHavdalahOffset = dow
|
|
7068
|
+
let useHavdalahOffset = dow === SAT$3;
|
|
7069
7069
|
let mask = e ? e.getFlags() : flags.LIGHT_CANDLES;
|
|
7070
7070
|
if (typeof e !== 'undefined') {
|
|
7071
7071
|
// if linked event && dow == FRI, use Candle lighting time & title
|
|
7072
|
-
if (dow
|
|
7072
|
+
if (dow !== FRI$3) {
|
|
7073
7073
|
if (mask & (flags.LIGHT_CANDLES_TZEIS | flags.CHANUKAH_CANDLES)) {
|
|
7074
7074
|
useHavdalahOffset = true;
|
|
7075
7075
|
} else if (mask & flags.YOM_TOV_ENDS) {
|
|
@@ -7077,7 +7077,7 @@ function makeCandleEvent(e, hd, dow, location, options) {
|
|
|
7077
7077
|
useHavdalahOffset = true;
|
|
7078
7078
|
}
|
|
7079
7079
|
}
|
|
7080
|
-
} else if (dow
|
|
7080
|
+
} else if (dow === SAT$3) {
|
|
7081
7081
|
havdalahTitle = true;
|
|
7082
7082
|
mask = flags.LIGHT_CANDLES_TZEIS;
|
|
7083
7083
|
}
|
|
@@ -7425,24 +7425,40 @@ class OmerEvent extends Event {
|
|
|
7425
7425
|
*/
|
|
7426
7426
|
sefira() {
|
|
7427
7427
|
let lang = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
case 'translit':
|
|
7437
|
-
const translitWeek = sefirotTranslit[this.weekNumber];
|
|
7438
|
-
const translitDayWithinWeek = sefirotTranslit[this.daysWithinWeeks];
|
|
7439
|
-
const translitPrefix = this.weekNumber === 2 || this.weekNumber === 6 ? 'shebi' : `sheb'`;
|
|
7440
|
-
return `${translitDayWithinWeek} ${translitPrefix}${translitWeek}`;
|
|
7441
|
-
case 'en':
|
|
7442
|
-
default:
|
|
7443
|
-
return `${dayWithinWeek} within ${week}`;
|
|
7428
|
+
if (lang === 'he') {
|
|
7429
|
+
return this.sefiraHe();
|
|
7430
|
+
} else if (lang === 'translit') {
|
|
7431
|
+
return this.sefiraTranslit();
|
|
7432
|
+
} else {
|
|
7433
|
+
const week = sefirot[this.weekNumber];
|
|
7434
|
+
const dayWithinWeek = sefirot[this.daysWithinWeeks];
|
|
7435
|
+
return `${dayWithinWeek} within ${week}`;
|
|
7444
7436
|
}
|
|
7445
7437
|
}
|
|
7438
|
+
/**
|
|
7439
|
+
* @private
|
|
7440
|
+
* @return {string}
|
|
7441
|
+
*/
|
|
7442
|
+
sefiraTranslit() {
|
|
7443
|
+
const weekNum = this.weekNumber;
|
|
7444
|
+
const translitWeek = sefirotTranslit[weekNum];
|
|
7445
|
+
const translitDayWithinWeek = sefirotTranslit[this.daysWithinWeeks];
|
|
7446
|
+
const translitPrefix = weekNum === 2 || weekNum === 6 ? 'shebi' : `sheb'`;
|
|
7447
|
+
return `${translitDayWithinWeek} ${translitPrefix}${translitWeek}`;
|
|
7448
|
+
}
|
|
7449
|
+
/**
|
|
7450
|
+
* @private
|
|
7451
|
+
* @return {string}
|
|
7452
|
+
*/
|
|
7453
|
+
sefiraHe() {
|
|
7454
|
+
const weekNum = this.weekNumber;
|
|
7455
|
+
const week = sefirot[weekNum];
|
|
7456
|
+
const dayWithinWeek = sefirot[this.daysWithinWeeks];
|
|
7457
|
+
const heWeek = Locale.gettext(week, 'he');
|
|
7458
|
+
const heDayWithinWeek = Locale.gettext(dayWithinWeek, 'he');
|
|
7459
|
+
const hePrefix = weekNum === 2 || weekNum === 6 ? 'שֶׁבִּ' : 'שֶׁבְּ';
|
|
7460
|
+
return `${heDayWithinWeek} ${hePrefix}${heWeek}`.normalize();
|
|
7461
|
+
}
|
|
7446
7462
|
/**
|
|
7447
7463
|
* @todo use gettext()
|
|
7448
7464
|
* @param {string} [locale] Optional locale name (defaults to active locale).
|
|
@@ -8853,18 +8869,15 @@ const Elul = months.ELUL;
|
|
|
8853
8869
|
const Tishrei = months.TISHREI;
|
|
8854
8870
|
const Cheshvan = months.CHESHVAN;
|
|
8855
8871
|
const Kislev = months.KISLEV;
|
|
8856
|
-
// const Tevet = months.TEVET;
|
|
8857
8872
|
const Shvat = months.SHVAT;
|
|
8858
|
-
// const Adar1 = months.ADAR_I;
|
|
8859
8873
|
const Adar2 = months.ADAR_II;
|
|
8860
8874
|
const CHAG$1 = flags.CHAG;
|
|
8861
8875
|
const LIGHT_CANDLES$1 = flags.LIGHT_CANDLES;
|
|
8862
8876
|
const YOM_TOV_ENDS$1 = flags.YOM_TOV_ENDS;
|
|
8863
8877
|
const CHUL_ONLY$1 = flags.CHUL_ONLY;
|
|
8864
|
-
const IL_ONLY$
|
|
8878
|
+
const IL_ONLY$2 = flags.IL_ONLY;
|
|
8865
8879
|
const LIGHT_CANDLES_TZEIS$2 = flags.LIGHT_CANDLES_TZEIS;
|
|
8866
8880
|
const CHANUKAH_CANDLES$2 = flags.CHANUKAH_CANDLES;
|
|
8867
|
-
// const MINOR_FAST = flags.MINOR_FAST;
|
|
8868
8881
|
const MAJOR_FAST$2 = flags.MAJOR_FAST;
|
|
8869
8882
|
const MINOR_HOLIDAY$2 = flags.MINOR_HOLIDAY;
|
|
8870
8883
|
const EREV$2 = flags.EREV;
|
|
@@ -8947,54 +8960,54 @@ const staticHolidays = [{
|
|
|
8947
8960
|
mm: Tishrei,
|
|
8948
8961
|
dd: 14,
|
|
8949
8962
|
desc: 'Erev Sukkot',
|
|
8950
|
-
flags: IL_ONLY$
|
|
8963
|
+
flags: IL_ONLY$2 | EREV$2 | LIGHT_CANDLES$1,
|
|
8951
8964
|
emoji: emojiSukkot
|
|
8952
8965
|
}, {
|
|
8953
8966
|
mm: Tishrei,
|
|
8954
8967
|
dd: 15,
|
|
8955
8968
|
desc: 'Sukkot I',
|
|
8956
|
-
flags: IL_ONLY$
|
|
8969
|
+
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
8957
8970
|
emoji: emojiSukkot
|
|
8958
8971
|
}, {
|
|
8959
8972
|
mm: Tishrei,
|
|
8960
8973
|
dd: 16,
|
|
8961
8974
|
desc: 'Sukkot II (CH\'\'M)',
|
|
8962
|
-
flags: IL_ONLY$
|
|
8975
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
8963
8976
|
chmDay: 1,
|
|
8964
8977
|
emoji: emojiSukkot
|
|
8965
8978
|
}, {
|
|
8966
8979
|
mm: Tishrei,
|
|
8967
8980
|
dd: 17,
|
|
8968
8981
|
desc: 'Sukkot III (CH\'\'M)',
|
|
8969
|
-
flags: IL_ONLY$
|
|
8982
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
8970
8983
|
chmDay: 2,
|
|
8971
8984
|
emoji: emojiSukkot
|
|
8972
8985
|
}, {
|
|
8973
8986
|
mm: Tishrei,
|
|
8974
8987
|
dd: 18,
|
|
8975
8988
|
desc: 'Sukkot IV (CH\'\'M)',
|
|
8976
|
-
flags: IL_ONLY$
|
|
8989
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
8977
8990
|
chmDay: 3,
|
|
8978
8991
|
emoji: emojiSukkot
|
|
8979
8992
|
}, {
|
|
8980
8993
|
mm: Tishrei,
|
|
8981
8994
|
dd: 19,
|
|
8982
8995
|
desc: 'Sukkot V (CH\'\'M)',
|
|
8983
|
-
flags: IL_ONLY$
|
|
8996
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
8984
8997
|
chmDay: 4,
|
|
8985
8998
|
emoji: emojiSukkot
|
|
8986
8999
|
}, {
|
|
8987
9000
|
mm: Tishrei,
|
|
8988
9001
|
dd: 20,
|
|
8989
9002
|
desc: 'Sukkot VI (CH\'\'M)',
|
|
8990
|
-
flags: IL_ONLY$
|
|
9003
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
8991
9004
|
chmDay: 5,
|
|
8992
9005
|
emoji: emojiSukkot
|
|
8993
9006
|
}, {
|
|
8994
9007
|
mm: Tishrei,
|
|
8995
9008
|
dd: 22,
|
|
8996
9009
|
desc: 'Shmini Atzeret',
|
|
8997
|
-
flags: IL_ONLY$
|
|
9010
|
+
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1
|
|
8998
9011
|
}, {
|
|
8999
9012
|
mm: Tishrei,
|
|
9000
9013
|
dd: 21,
|
|
@@ -9038,54 +9051,54 @@ const staticHolidays = [{
|
|
|
9038
9051
|
mm: Nisan,
|
|
9039
9052
|
dd: 14,
|
|
9040
9053
|
desc: 'Erev Pesach',
|
|
9041
|
-
flags: IL_ONLY$
|
|
9054
|
+
flags: IL_ONLY$2 | EREV$2 | LIGHT_CANDLES$1,
|
|
9042
9055
|
emoji: '🫓🍷'
|
|
9043
9056
|
}, {
|
|
9044
9057
|
mm: Nisan,
|
|
9045
9058
|
dd: 15,
|
|
9046
9059
|
desc: 'Pesach I',
|
|
9047
|
-
flags: IL_ONLY$
|
|
9060
|
+
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
9048
9061
|
emoji: emojiPesach
|
|
9049
9062
|
}, {
|
|
9050
9063
|
mm: Nisan,
|
|
9051
9064
|
dd: 16,
|
|
9052
9065
|
desc: 'Pesach II (CH\'\'M)',
|
|
9053
|
-
flags: IL_ONLY$
|
|
9066
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
9054
9067
|
chmDay: 1,
|
|
9055
9068
|
emoji: emojiPesach
|
|
9056
9069
|
}, {
|
|
9057
9070
|
mm: Nisan,
|
|
9058
9071
|
dd: 17,
|
|
9059
9072
|
desc: 'Pesach III (CH\'\'M)',
|
|
9060
|
-
flags: IL_ONLY$
|
|
9073
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
9061
9074
|
chmDay: 2,
|
|
9062
9075
|
emoji: emojiPesach
|
|
9063
9076
|
}, {
|
|
9064
9077
|
mm: Nisan,
|
|
9065
9078
|
dd: 18,
|
|
9066
9079
|
desc: 'Pesach IV (CH\'\'M)',
|
|
9067
|
-
flags: IL_ONLY$
|
|
9080
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
9068
9081
|
chmDay: 3,
|
|
9069
9082
|
emoji: emojiPesach
|
|
9070
9083
|
}, {
|
|
9071
9084
|
mm: Nisan,
|
|
9072
9085
|
dd: 19,
|
|
9073
9086
|
desc: 'Pesach V (CH\'\'M)',
|
|
9074
|
-
flags: IL_ONLY$
|
|
9087
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1,
|
|
9075
9088
|
chmDay: 4,
|
|
9076
9089
|
emoji: emojiPesach
|
|
9077
9090
|
}, {
|
|
9078
9091
|
mm: Nisan,
|
|
9079
9092
|
dd: 20,
|
|
9080
9093
|
desc: 'Pesach VI (CH\'\'M)',
|
|
9081
|
-
flags: IL_ONLY$
|
|
9094
|
+
flags: IL_ONLY$2 | CHOL_HAMOED$1 | LIGHT_CANDLES$1,
|
|
9082
9095
|
chmDay: 5,
|
|
9083
9096
|
emoji: emojiPesach
|
|
9084
9097
|
}, {
|
|
9085
9098
|
mm: Nisan,
|
|
9086
9099
|
dd: 21,
|
|
9087
9100
|
desc: 'Pesach VII',
|
|
9088
|
-
flags: IL_ONLY$
|
|
9101
|
+
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
9089
9102
|
emoji: emojiPesach
|
|
9090
9103
|
},
|
|
9091
9104
|
// Pesach chutz l'aretz
|
|
@@ -9168,7 +9181,7 @@ const staticHolidays = [{
|
|
|
9168
9181
|
mm: Sivan,
|
|
9169
9182
|
dd: 6,
|
|
9170
9183
|
desc: 'Shavuot',
|
|
9171
|
-
flags: IL_ONLY$
|
|
9184
|
+
flags: IL_ONLY$2 | CHAG$1 | YOM_TOV_ENDS$1,
|
|
9172
9185
|
emoji: '⛰️🌸'
|
|
9173
9186
|
}, {
|
|
9174
9187
|
mm: Sivan,
|
|
@@ -9257,6 +9270,17 @@ const staticModernHolidays = [{
|
|
|
9257
9270
|
desc: 'Yom HaAliyah School Observance'
|
|
9258
9271
|
}];
|
|
9259
9272
|
|
|
9273
|
+
const CHAG = flags.CHAG;
|
|
9274
|
+
const IL_ONLY$1 = flags.IL_ONLY;
|
|
9275
|
+
const LIGHT_CANDLES_TZEIS$1 = flags.LIGHT_CANDLES_TZEIS;
|
|
9276
|
+
const CHANUKAH_CANDLES$1 = flags.CHANUKAH_CANDLES;
|
|
9277
|
+
const MINOR_FAST$1 = flags.MINOR_FAST;
|
|
9278
|
+
const SPECIAL_SHABBAT$1 = flags.SPECIAL_SHABBAT;
|
|
9279
|
+
const MODERN_HOLIDAY$1 = flags.MODERN_HOLIDAY;
|
|
9280
|
+
const MAJOR_FAST$1 = flags.MAJOR_FAST;
|
|
9281
|
+
const MINOR_HOLIDAY$1 = flags.MINOR_HOLIDAY;
|
|
9282
|
+
const EREV$1 = flags.EREV;
|
|
9283
|
+
|
|
9260
9284
|
/** Represents a built-in holiday like Pesach, Purim or Tu BiShvat */
|
|
9261
9285
|
class HolidayEvent extends Event {
|
|
9262
9286
|
/** @return {string} */
|
|
@@ -9270,7 +9294,7 @@ class HolidayEvent extends Event {
|
|
|
9270
9294
|
return undefined;
|
|
9271
9295
|
}
|
|
9272
9296
|
const url = 'https://www.hebcal.com/holidays/' + this.basename().toLowerCase().replace(/'/g, '').replace(/ /g, '-') + '-' + this.urlDateSuffix();
|
|
9273
|
-
return this.getFlags() &
|
|
9297
|
+
return this.getFlags() & IL_ONLY$1 ? url + '?i=on' : url;
|
|
9274
9298
|
}
|
|
9275
9299
|
/** @return {string} */
|
|
9276
9300
|
urlDateSuffix() {
|
|
@@ -9281,7 +9305,7 @@ class HolidayEvent extends Event {
|
|
|
9281
9305
|
getEmoji() {
|
|
9282
9306
|
if (this.emoji) {
|
|
9283
9307
|
return this.emoji;
|
|
9284
|
-
} else if (this.getFlags() &
|
|
9308
|
+
} else if (this.getFlags() & SPECIAL_SHABBAT$1) {
|
|
9285
9309
|
return '🕍';
|
|
9286
9310
|
} else {
|
|
9287
9311
|
return '✡️';
|
|
@@ -9371,7 +9395,7 @@ class MevarchimChodeshEvent extends Event {
|
|
|
9371
9395
|
this.monthName = monthName;
|
|
9372
9396
|
const hyear = date.getFullYear();
|
|
9373
9397
|
const hmonth = date.getMonth();
|
|
9374
|
-
const monNext = hmonth == HDate.monthsInYear(hyear) ?
|
|
9398
|
+
const monNext = hmonth == HDate.monthsInYear(hyear) ? NISAN$1 : hmonth + 1;
|
|
9375
9399
|
const molad = new MoladEvent(date, hyear, monNext);
|
|
9376
9400
|
this.memo = molad.render('en');
|
|
9377
9401
|
}
|
|
@@ -9452,41 +9476,19 @@ class YomKippurKatanEvent extends HolidayEvent {
|
|
|
9452
9476
|
}
|
|
9453
9477
|
}
|
|
9454
9478
|
const SUN = 0;
|
|
9455
|
-
// const MON = 1;
|
|
9456
9479
|
const TUE = 2;
|
|
9457
|
-
// const WED = 3;
|
|
9458
9480
|
const THU = 4;
|
|
9459
9481
|
const FRI$1 = 5;
|
|
9460
9482
|
const SAT$1 = 6;
|
|
9461
9483
|
const NISAN$1 = months.NISAN;
|
|
9462
|
-
// const IYYAR = months.IYYAR;
|
|
9463
|
-
// const SIVAN = months.SIVAN;
|
|
9464
9484
|
const TAMUZ = months.TAMUZ;
|
|
9465
9485
|
const AV = months.AV;
|
|
9466
9486
|
const ELUL$1 = months.ELUL;
|
|
9467
9487
|
const TISHREI$1 = months.TISHREI;
|
|
9468
|
-
// const CHESHVAN = months.CHESHVAN;
|
|
9469
9488
|
const KISLEV = months.KISLEV;
|
|
9470
9489
|
const TEVET = months.TEVET;
|
|
9471
|
-
// const SHVAT = months.SHVAT;
|
|
9472
9490
|
const ADAR_I = months.ADAR_I;
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
const CHAG = flags.CHAG;
|
|
9476
|
-
// const LIGHT_CANDLES = flags.LIGHT_CANDLES;
|
|
9477
|
-
// const YOM_TOV_ENDS = flags.YOM_TOV_ENDS;
|
|
9478
|
-
// const CHUL_ONLY = flags.CHUL_ONLY;
|
|
9479
|
-
// const IL_ONLY = flags.IL_ONLY;
|
|
9480
|
-
const LIGHT_CANDLES_TZEIS$1 = flags.LIGHT_CANDLES_TZEIS;
|
|
9481
|
-
const CHANUKAH_CANDLES$1 = flags.CHANUKAH_CANDLES;
|
|
9482
|
-
const MINOR_FAST$1 = flags.MINOR_FAST;
|
|
9483
|
-
const SPECIAL_SHABBAT$1 = flags.SPECIAL_SHABBAT;
|
|
9484
|
-
const MODERN_HOLIDAY$1 = flags.MODERN_HOLIDAY;
|
|
9485
|
-
const MAJOR_FAST$1 = flags.MAJOR_FAST;
|
|
9486
|
-
const MINOR_HOLIDAY$1 = flags.MINOR_HOLIDAY;
|
|
9487
|
-
const EREV$1 = flags.EREV;
|
|
9488
|
-
// const CHOL_HAMOED = flags.CHOL_HAMOED;
|
|
9489
|
-
|
|
9491
|
+
const ADAR_II = months.ADAR_II;
|
|
9490
9492
|
const sedraCache = new Map();
|
|
9491
9493
|
|
|
9492
9494
|
/**
|
|
@@ -9541,7 +9543,7 @@ function getHolidaysForYear_(year) {
|
|
|
9541
9543
|
const key = ev.date.toString();
|
|
9542
9544
|
const arr = map.get(key);
|
|
9543
9545
|
if (typeof arr === 'object') {
|
|
9544
|
-
if (arr[0].getFlags() &
|
|
9546
|
+
if (arr[0].getFlags() & EREV$1) {
|
|
9545
9547
|
arr.unshift(ev);
|
|
9546
9548
|
} else {
|
|
9547
9549
|
arr.push(ev);
|
|
@@ -9591,7 +9593,7 @@ function getHolidaysForYear_(year) {
|
|
|
9591
9593
|
emoji: '🕍'
|
|
9592
9594
|
}));
|
|
9593
9595
|
if (pesach.getDay() == SUN) {
|
|
9594
|
-
add(new HolidayEvent(new HDate(16,
|
|
9596
|
+
add(new HolidayEvent(new HDate(16, ADAR_II, year), 'Purim Meshulash', MINOR_HOLIDAY$1));
|
|
9595
9597
|
}
|
|
9596
9598
|
if (HDate.isLeapYear(year)) {
|
|
9597
9599
|
add(new HolidayEvent(new HDate(14, ADAR_I, year), 'Purim Katan', MINOR_HOLIDAY$1, {
|
|
@@ -9620,7 +9622,7 @@ function getHolidaysForYear_(year) {
|
|
|
9620
9622
|
} else if (h.satPostponeToSun && dow === SAT$1) {
|
|
9621
9623
|
hd = hd.next();
|
|
9622
9624
|
}
|
|
9623
|
-
const mask = h.chul ? MODERN_HOLIDAY$1 : MODERN_HOLIDAY$1 |
|
|
9625
|
+
const mask = h.chul ? MODERN_HOLIDAY$1 : MODERN_HOLIDAY$1 | IL_ONLY$1;
|
|
9624
9626
|
const ev = new HolidayEvent(hd, h.desc, mask);
|
|
9625
9627
|
if (!h.suppressEmoji) {
|
|
9626
9628
|
ev.emoji = '🇮🇱';
|
|
@@ -9674,7 +9676,7 @@ function getHolidaysForYear_(year) {
|
|
|
9674
9676
|
// Yom Kippur Katan is not observed on the day before Rosh Hashanah.
|
|
9675
9677
|
// Not observed prior to Rosh Chodesh Cheshvan because Yom Kippur has just passed.
|
|
9676
9678
|
// Not observed before Rosh Chodesh Tevet, because that day is Hanukkah.
|
|
9677
|
-
if (nextMonth ===
|
|
9679
|
+
if (nextMonth === TISHREI$1 || nextMonth === months.CHESHVAN || nextMonth === TEVET) {
|
|
9678
9680
|
continue;
|
|
9679
9681
|
}
|
|
9680
9682
|
let ykk = new HDate(29, month, year);
|
|
@@ -9716,7 +9718,7 @@ function getHolidaysForYear_(year) {
|
|
|
9716
9718
|
*/
|
|
9717
9719
|
function getBirkatHaChama(year) {
|
|
9718
9720
|
const leap = HDate.isLeapYear(year);
|
|
9719
|
-
const startMonth = leap ?
|
|
9721
|
+
const startMonth = leap ? ADAR_II : NISAN$1;
|
|
9720
9722
|
const startDay = leap ? 20 : 1;
|
|
9721
9723
|
const baseRd = HDate.hebrew2abs(year, startMonth, startDay);
|
|
9722
9724
|
for (let day = 0; day <= 40; day++) {
|
|
@@ -9766,29 +9768,8 @@ class DailyLearning {
|
|
|
9766
9768
|
}
|
|
9767
9769
|
}
|
|
9768
9770
|
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
const headers$1={"plural-forms":"nplurals=2; plural=(n > 1);"};const contexts$1={"":{Shabbat:["Shabbos"],"Achrei Mot":["Achrei Mos"],Bechukotai:["Bechukosai"],"Beha'alotcha":["Beha'aloscha"],Bereshit:["Bereshis"],Chukat:["Chukas"],"Erev Shavuot":["Erev Shavuos"],"Erev Sukkot":["Erev Sukkos"],"Ki Tavo":["Ki Savo"],"Ki Teitzei":["Ki Seitzei"],"Ki Tisa":["Ki Sisa"],Matot:["Matos"],"Purim Katan":["Purim Koton"],"Shabbat Chazon":["Shabbos Chazon"],"Shabbat HaChodesh":["Shabbos HaChodesh"],"Shabbat HaGadol":["Shabbos HaGadol"],"Shabbat Nachamu":["Shabbos Nachamu"],"Shabbat Parah":["Shabbos Parah"],"Shabbat Shekalim":["Shabbos Shekalim"],"Shabbat Shuva":["Shabbos Shuvah"],"Shabbat Zachor":["Shabbos Zachor"],Shavuot:["Shavuos"],"Shavuot I":["Shavuos I"],"Shavuot II":["Shavuos II"],Shemot:["Shemos"],"Shmini Atzeret":["Shmini Atzeres"],"Simchat Torah":["Simchas Torah"],Sukkot:["Sukkos"],"Sukkot I":["Sukkos I"],"Sukkot II":["Sukkos II"],"Sukkot II (CH''M)":["Sukkos II (CH''M)"],"Sukkot III (CH''M)":["Sukkos III (CH''M)"],"Sukkot IV (CH''M)":["Sukkos IV (CH''M)"],"Sukkot V (CH''M)":["Sukkos V (CH''M)"],"Sukkot VI (CH''M)":["Sukkos VI (CH''M)"],"Sukkot VII (Hoshana Raba)":["Sukkos VII (Hoshana Raba)"],"Ta'anit Bechorot":["Ta'anis Bechoros"],"Ta'anit Esther":["Ta'anis Esther"],Toldot:["Toldos"],Vaetchanan:["Vaeschanan"],Yitro:["Yisro"],"Vezot Haberakhah":["Vezos Haberakhah"],Parashat:["Parshas"],"Leil Selichot":["Leil Selichos"],"Shabbat Mevarchim Chodesh":["Shabbos Mevorchim Chodesh"],"Shabbat Shirah":["Shabbos Shirah"],Tevet:["Teves"],"Asara B'Tevet":["Asara B'Teves"],"Alot HaShachar":["Alos HaShachar"],"Kriat Shema, sof zeman":["Krias Shema, sof zman"],"Tefilah, sof zeman":["Tefilah, sof zman"],"Kriat Shema, sof zeman (MGA)":["Krias Shema, sof zman (MGA)"],"Tefilah, sof zeman (MGA)":["Tefilah, sof zman (MGA)"],"Chatzot HaLailah":["Chatzos HaLailah"],"Chatzot hayom":["Chatzos"],"Tzeit HaKochavim":["Tzeis HaKochavim"],"Birkat Hachamah":["Birkas Hachamah"],"Shushan Purim Katan":["Shushan Purim Koton"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
|
|
9772
|
-
|
|
9773
|
-
Locale.addLocale('ashkenazi', poAshkenazi);
|
|
9774
|
-
Locale.addLocale('a', poAshkenazi);
|
|
9775
|
-
|
|
9776
|
-
const headers={"plural-forms":"nplurals=2; plural=(n > 1);"};const contexts={"":{Shabbat:["שַׁבָּת"],"Daf Yomi":["דַף יוֹמִי"],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":["פֶּסַח ח׳"],Purim:["פּוּרִים"],"Purim Katan":["פּוּרִים קָטָן"],"Rosh Chodesh %s":["רֹאשׁ חוֹדֶשׁ %s"],"Rosh Chodesh":["רֹאשׁ חוֹדֶשׁ"],Adar:["אַדָר"],"Adar I":["אַדָר א׳"],"Adar II":["אַדָר ב׳"],Av:["אָב"],Cheshvan:["חֶשְׁוָן"],Elul:["אֱלוּל"],Iyyar:["אִיָיר"],Kislev:["כִּסְלֵו"],Nisan:["נִיסָן"],"Sh'vat":["שְׁבָט"],Sivan:["סִיוָן"],Tamuz:["תַּמּוּז"],Tevet:["טֵבֵת"],Tishrei:["תִּשְׁרֵי"],"Rosh Hashana":["רֹאשׁ הַשָּׁנָה"],"Rosh Hashana I":["רֹאשׁ הַשָּׁנָה א׳"],"Rosh Hashana II":["רֹאשׁ הַשָּׁנָה ב׳"],"Shabbat Chazon":["שַׁבָּת חֲזוֹן"],"Shabbat HaChodesh":["שַׁבָּת הַחֹדֶשׁ"],"Shabbat HaGadol":["שַׁבָּת הַגָּדוֹל"],"Shabbat Machar Chodesh":["שַׁבָּת מָחָר חוֹדֶשׁ"],"Shabbat Nachamu":["שַׁבָּת נַחֲמוּ"],"Shabbat Parah":["שַׁבָּת פּרה"],"Shabbat Rosh Chodesh":["שַׁבָּת רֹאשׁ חוֹדֶשׁ"],"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)":["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],"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":["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"],"Pesach I (on Shabbat)":["פֶּסַח יוֹם א׳ (בְּשַׁבָּת)"],"Pesach Chol ha-Moed Day 1":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם א׳"],"Pesach Chol ha-Moed Day 2":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ב׳"],"Pesach Chol ha-Moed Day 3":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ג׳"],"Pesach Chol ha-Moed Day 4":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ד׳"],"Pesach Chol ha-Moed Day 5":["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ה׳"],"Pesach Shabbat Chol ha-Moed":["פֶּסַח שַׁבָּת חוֹל הַמּוֹעֵד"],"Shavuot II (on Shabbat)":["שָׁבוּעוֹת יוֹם ב׳ (בְּשַׁבָּת)"],"Rosh Hashana I (on Shabbat)":["רֹאשׁ הַשָּׁנָה יוֹם א׳ (בְּשַׁבָּת)"],"Yom Kippur (on Shabbat)":["יוֹם כִּפּוּר (בְּשַׁבָּת)"],"Yom Kippur (Mincha, Traditional)":["יוֹם כִּפּוּר מִנחָה"],"Yom Kippur (Mincha, Alternate)":["יוֹם כִּפּוּר מִנחָה"],"Sukkot I (on Shabbat)":["סוּכּוֹת יוֹם א׳ (בְּשַׁבָּת)"],"Sukkot Chol ha-Moed Day 1":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם א׳"],"Sukkot Chol ha-Moed Day 2":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ב׳"],"Sukkot Chol ha-Moed Day 3":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ג׳"],"Sukkot Chol ha-Moed Day 4":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ד׳"],"Sukkot Chol ha-Moed Day 5":["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ה׳"],"Sukkot Shabbat Chol ha-Moed":["סוּכּוֹת שַׁבָּת חוֹל הַמּוֹעֵד"],"Sukkot Final Day (Hoshana Raba)":["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],"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 Tevet":["רֹאשׁ חוֹדֶשׁ טֵבֵת"],min:["דַּקּוֹת"],"Fast begins":["תחילת הַצוֹם"],"Fast ends":["סִיּוּם הַצוֹם"],"Rosh Hashana LaBehemot":["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"],"Tish'a B'Av (observed)":["תִּשְׁעָה בְּאָב נִדחֶה"],"Shabbat Mevarchim Chodesh":["שַׁבָּת מְבָרְכִים חוֹדֶשׁ"],"Shabbat Shirah":["שַׁבָּת שִׁירָה"],"Chatzot HaLailah":["חֲצוֹת הַלַיְלָה"],"Alot haShachar":["עֲלוֹת הַשַּׁחַר"],Misheyakir:["מִשֶּׁיַּכִּיר"],"Misheyakir Machmir":["מִשֶּׁיַּכִּיר מַחמִיר"],Dawn:["דִּימְדּוּמֵי בּוֹקֵר"],Sunrise:["הַנֵץ הַחַמָּה"],"Kriat Shema, sof zeman":["סוֹף זְמַן קְרִיאַת שְׁמַע גר״א"],"Tefilah, sof zeman":["סוֹף זְמַן תְּפִלָּה גר״א"],"Kriat Shema, sof zeman (MGA)":["סוֹף זְמַן קְרִיאַת שְׁמַע מג״א"],"Tefilah, sof zeman (MGA)":["סוֹף זְמַן תְּפִלָּה מג״א"],"Chatzot hayom":["חֲצוֹת הַיּוֹם"],"Mincha Gedolah":["מִנְחָה גְּדוֹלָה"],"Mincha Ketanah":["מִנְחָה קְטַנָּה"],"Plag HaMincha":["פְּלַג הַמִּנְחָה"],Dusk:["דִּימְדּוּמֵי עֶרֶב"],Sunset:["שְׁקִיעָה"],"Nightfall - End of ordained fasts":["לַיְלָה - גמר תעניות דרבנן"],"Tzeit HaKochavim":["צֵאת הַכּוֹכָבִים"],Lovingkindness:["חֶֽסֶד"],Might:["גְבוּרָה"],Beauty:["תִּפאֶרֶת"],Eternity:["נֶּֽצַח"],Splendor:["הוֹד"],Foundation:["יְּסוֹד"],Majesty:["מַּלְכוּת"],day:["יוֹם"],"Chanukah Day 1":["חֲנוּכָּה יוֹם א׳"],"Chanukah Day 2":["חֲנוּכָּה יוֹם ב׳"],"Chanukah Day 3":["חֲנוּכָּה יוֹם ג׳"],"Chanukah Day 4":["חֲנוּכָּה יוֹם ד׳"],"Chanukah Day 5":["חֲנוּכָּה יוֹם ה׳"],"Chanukah Day 6":["חֲנוּכָּה יוֹם ו׳"],"Chanukah Day 7":["חֲנוּכָּה יוֹם ז׳"],"Chanukah Day 7 (on Rosh Chodesh)":["חֲנוּכָּה יוֹם ז׳ (רֹאשׁ חוֹדֶשׁ)"],"Chanukah Day 8":["חֲנוּכָּה יוֹם ח׳"],"Chanukah Day 1 (on Shabbat)":["חֲנוּכָּה יוֹם א׳ (בְּשַׁבָּת)"],"Chanukah Day 2 (on Shabbat)":["חֲנוּכָּה יוֹם ב׳ (בְּשַׁבָּת)"],"Chanukah Day 3 (on Shabbat)":["חֲנוּכָּה יוֹם ג׳ (בְּשַׁבָּת)"],"Chanukah Day 4 (on Shabbat)":["חֲנוּכָּה יוֹם ד׳ (בְּשַׁבָּת)"],"Chanukah Day 5 (on Shabbat)":["חֲנוּכָּה יוֹם ה׳ (בְּשַׁבָּת)"],"Chanukah Day 7 (on Shabbat)":["חֲנוּכָּה יוֹם ז׳ (בְּשַׁבָּת)"],"Chanukah Day 8 (on Shabbat)":["חֲנוּכָּה יוֹם ח׳ (בְּשַׁבָּת)"],"Shabbat Rosh Chodesh Chanukah":["שַׁבָּת רֹאשׁ חוֹדֶשׁ חֲנוּכָּה"],"Yom Kippur Katan":["יוֹם כִּפּוּר קָטָן"],"Family Day":["יוֹם הַמִּשׁפָּחָה"],"Yitzhak Rabin Memorial Day":["יוֹם הַזִּכָּרוֹן ליצחק רבין"],"Jabotinsky Day":["יוֹם ז׳בוטינסקי"],"Herzl Day":["יוֹם הרצל"],"Ben-Gurion Day":["יוֹם בן־גוריון"],"Birkat Hachamah":["בִרְכַּת הַחַמָּה"],"Shushan Purim Katan":["שׁוּשָׁן פּוּרִים קָטָן"],"Purim Meshulash":["פּוּרִים מְשׁוּלָּשׁ"],"after sunset":["אחרי השקיעה"],Yerushalmi:["יְרוּשַׁלְמִי"],"Chag HaBanot":["חַג הַבָּנוֹת"],Joshua:["יְהוֹשׁוּעַ"],Judges:["שׁוֹפְטִים"],"I Samuel":["שְׁמוּאֵל רִאשׁוֹן"],"II Samuel":["שְׁמוּאֵל שֵׁנִי"],"I Kings":["מְלָכִים רִאשׁוֹן"],"II Kings":["מְלָכִים שֵׁנִי"],Isaiah:["יְשַׁעְיָהוּ"],Jeremiah:["יִרְמְיָהוּ"],Ezekiel:["יְחֶזְקֵאל"],Hosea:["הוֹשֵׁעַ"],Joel:["יוֹאֵל"],Amos:["עָמוּס"],Obadiah:["עוֹבַדְיָה"],Jonah:["יוֹנָה"],Micah:["מִיכָה"],Nachum:["נַחוּם"],Habakkuk:["חֲבַקּוּק"],Zephaniah:["צְפַנְיָה"],Haggai:["חַגַּי"],Zechariah:["זְכַרְיָה"],Malachi:["מַלְאָכִי"],Psalms:["תְּהִלִּים"],Proverbs:["מִשְׁלֵי"],Job:["אִיּוֹב"],"Song of Songs":["שִׁיר הַשִּׁירִים"],Ruth:["רוּת"],Lamentations:["אֵיכָה"],Ecclesiastes:["קֹהֶלֶת"],Esther:["אֶסְתֵּר"],Daniel:["דָּנִיֵּאל"],Ezra:["עֶזְרָא"],Nehemiah:["נְחֶמְיָה"],"I Chronicles":["דִברֵי הַיָמִים רִאשׁוֹן"],"II Chronicles":["דִברֵי הַיָמִים שֵׁנִי"],"Yom Kippur (Mincha)":["יוֹם כִּפּוּר מִנחָה"],"Tish'a B'Av (Mincha)":["תִּשְׁעָה בְּאָב מִנחָה"],"Asara B'Tevet (Mincha)":["עֲשָׂרָה בְּטֵבֵת מִנחָה"],"Ta'anit Bechorot (Mincha)":["תַּעֲנִית בְּכוֹרוֹת מִנחָה"],"Ta'anit Esther (Mincha)":["תַּעֲנִית אֶסְתֵּר מִנחָה"],"Tzom Gedaliah (Mincha)":["צוֹם גְּדַלְיָה מִנחָה"],"Tzom Tammuz (Mincha)":["צוֹם תָּמוּז מִנחָה"],Molad:["מוֹלָד הָלְּבָנָה"],chalakim:["חֲלָקִים"]}};var poHe = {headers:headers,contexts:contexts};
|
|
9777
|
-
|
|
9778
|
-
Locale.addLocale('he', poHe);
|
|
9779
|
-
Locale.addLocale('h', poHe);
|
|
9780
|
-
const heStrs = poHe.contexts[''];
|
|
9781
|
-
const heNoNikud = {};
|
|
9782
|
-
for (const [key, val] of Object.entries(heStrs)) {
|
|
9783
|
-
heNoNikud[key] = [Locale.hebrewStripNikkud(val[0])];
|
|
9784
|
-
}
|
|
9785
|
-
const poHeNoNikud = {
|
|
9786
|
-
headers: poHe.headers,
|
|
9787
|
-
contexts: {
|
|
9788
|
-
'': heNoNikud
|
|
9789
|
-
}
|
|
9790
|
-
};
|
|
9791
|
-
Locale.addLocale('he-x-NoNikud', poHeNoNikud);
|
|
9771
|
+
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
9772
|
+
const version = '5.0.3';
|
|
9792
9773
|
|
|
9793
9774
|
var objectGetOwnPropertyDescriptor = {};
|
|
9794
9775
|
|
|
@@ -10342,6 +10323,396 @@ function hallel_(events, hdate) {
|
|
|
10342
10323
|
return NONE$1;
|
|
10343
10324
|
}
|
|
10344
10325
|
|
|
10326
|
+
var poAshkenazi = {
|
|
10327
|
+
"headers": {
|
|
10328
|
+
"plural-forms": "nplurals=2; plural=(n > 1);"
|
|
10329
|
+
},
|
|
10330
|
+
"contexts": {
|
|
10331
|
+
"": {
|
|
10332
|
+
"Shabbat": ["Shabbos"],
|
|
10333
|
+
"Achrei Mot": ["Achrei Mos"],
|
|
10334
|
+
"Bechukotai": ["Bechukosai"],
|
|
10335
|
+
"Beha'alotcha": ["Beha'aloscha"],
|
|
10336
|
+
"Bereshit": ["Bereshis"],
|
|
10337
|
+
"Chukat": ["Chukas"],
|
|
10338
|
+
"Erev Shavuot": ["Erev Shavuos"],
|
|
10339
|
+
"Erev Sukkot": ["Erev Sukkos"],
|
|
10340
|
+
"Ki Tavo": ["Ki Savo"],
|
|
10341
|
+
"Ki Teitzei": ["Ki Seitzei"],
|
|
10342
|
+
"Ki Tisa": ["Ki Sisa"],
|
|
10343
|
+
"Matot": ["Matos"],
|
|
10344
|
+
"Purim Katan": ["Purim Koton"],
|
|
10345
|
+
"Shabbat Chazon": ["Shabbos Chazon"],
|
|
10346
|
+
"Shabbat HaChodesh": ["Shabbos HaChodesh"],
|
|
10347
|
+
"Shabbat HaGadol": ["Shabbos HaGadol"],
|
|
10348
|
+
"Shabbat Nachamu": ["Shabbos Nachamu"],
|
|
10349
|
+
"Shabbat Parah": ["Shabbos Parah"],
|
|
10350
|
+
"Shabbat Shekalim": ["Shabbos Shekalim"],
|
|
10351
|
+
"Shabbat Shuva": ["Shabbos Shuvah"],
|
|
10352
|
+
"Shabbat Zachor": ["Shabbos Zachor"],
|
|
10353
|
+
"Shavuot": ["Shavuos"],
|
|
10354
|
+
"Shavuot I": ["Shavuos I"],
|
|
10355
|
+
"Shavuot II": ["Shavuos II"],
|
|
10356
|
+
"Shemot": ["Shemos"],
|
|
10357
|
+
"Shmini Atzeret": ["Shmini Atzeres"],
|
|
10358
|
+
"Simchat Torah": ["Simchas Torah"],
|
|
10359
|
+
"Sukkot": ["Sukkos"],
|
|
10360
|
+
"Sukkot I": ["Sukkos I"],
|
|
10361
|
+
"Sukkot II": ["Sukkos II"],
|
|
10362
|
+
"Sukkot II (CH''M)": ["Sukkos II (CH''M)"],
|
|
10363
|
+
"Sukkot III (CH''M)": ["Sukkos III (CH''M)"],
|
|
10364
|
+
"Sukkot IV (CH''M)": ["Sukkos IV (CH''M)"],
|
|
10365
|
+
"Sukkot V (CH''M)": ["Sukkos V (CH''M)"],
|
|
10366
|
+
"Sukkot VI (CH''M)": ["Sukkos VI (CH''M)"],
|
|
10367
|
+
"Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"],
|
|
10368
|
+
"Ta'anit Bechorot": ["Ta'anis Bechoros"],
|
|
10369
|
+
"Ta'anit Esther": ["Ta'anis Esther"],
|
|
10370
|
+
"Toldot": ["Toldos"],
|
|
10371
|
+
"Vaetchanan": ["Vaeschanan"],
|
|
10372
|
+
"Yitro": ["Yisro"],
|
|
10373
|
+
"Vezot Haberakhah": ["Vezos Haberakhah"],
|
|
10374
|
+
"Parashat": ["Parshas"],
|
|
10375
|
+
"Leil Selichot": ["Leil Selichos"],
|
|
10376
|
+
"Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"],
|
|
10377
|
+
"Shabbat Shirah": ["Shabbos Shirah"],
|
|
10378
|
+
"Tevet": ["Teves"],
|
|
10379
|
+
"Asara B'Tevet": ["Asara B'Teves"],
|
|
10380
|
+
"Alot HaShachar": ["Alos HaShachar"],
|
|
10381
|
+
"Kriat Shema, sof zeman": ["Krias Shema, sof zman"],
|
|
10382
|
+
"Tefilah, sof zeman": ["Tefilah, sof zman"],
|
|
10383
|
+
"Kriat Shema, sof zeman (MGA)": ["Krias Shema, sof zman (MGA)"],
|
|
10384
|
+
"Tefilah, sof zeman (MGA)": ["Tefilah, sof zman (MGA)"],
|
|
10385
|
+
"Chatzot HaLailah": ["Chatzos HaLailah"],
|
|
10386
|
+
"Chatzot hayom": ["Chatzos"],
|
|
10387
|
+
"Tzeit HaKochavim": ["Tzeis HaKochavim"],
|
|
10388
|
+
"Birkat Hachamah": ["Birkas Hachamah"],
|
|
10389
|
+
"Shushan Purim Katan": ["Shushan Purim Koton"]
|
|
10390
|
+
}
|
|
10391
|
+
}
|
|
10392
|
+
};
|
|
10393
|
+
|
|
10394
|
+
Locale.addLocale('ashkenazi', poAshkenazi);
|
|
10395
|
+
Locale.addLocale('a', poAshkenazi);
|
|
10396
|
+
|
|
10397
|
+
var poHe = {
|
|
10398
|
+
"headers": {
|
|
10399
|
+
"plural-forms": "nplurals=2; plural=(n > 1);"
|
|
10400
|
+
},
|
|
10401
|
+
"contexts": {
|
|
10402
|
+
"": {
|
|
10403
|
+
"Shabbat": ["שַׁבָּת"],
|
|
10404
|
+
"Daf Yomi": ["דַף יוֹמִי"],
|
|
10405
|
+
"Parashat": ["פָּרָשַׁת"],
|
|
10406
|
+
"Achrei Mot": ["אַחֲרֵי מוֹת"],
|
|
10407
|
+
"Balak": ["בָּלָק"],
|
|
10408
|
+
"Bamidbar": ["בְּמִדְבַּר"],
|
|
10409
|
+
"Bechukotai": ["בְּחֻקֹּתַי"],
|
|
10410
|
+
"Beha'alotcha": ["בְּהַעֲלֹתְךָ"],
|
|
10411
|
+
"Behar": ["בְּהַר"],
|
|
10412
|
+
"Bereshit": ["בְּרֵאשִׁית"],
|
|
10413
|
+
"Beshalach": ["בְּשַׁלַּח"],
|
|
10414
|
+
"Bo": ["בֹּא"],
|
|
10415
|
+
"Chayei Sara": ["חַיֵּי שָֹרָה"],
|
|
10416
|
+
"Chukat": ["חֻקַּת"],
|
|
10417
|
+
"Devarim": ["דְּבָרִים"],
|
|
10418
|
+
"Eikev": ["עֵקֶב"],
|
|
10419
|
+
"Emor": ["אֱמוֹר"],
|
|
10420
|
+
"Ha'azinu": ["הַאֲזִינוּ"],
|
|
10421
|
+
"Kedoshim": ["קְדשִׁים"],
|
|
10422
|
+
"Ki Tavo": ["כִּי־תָבוֹא"],
|
|
10423
|
+
"Ki Teitzei": ["כִּי־תֵצֵא"],
|
|
10424
|
+
"Ki Tisa": ["כִּי תִשָּׂא"],
|
|
10425
|
+
"Korach": ["קוֹרַח"],
|
|
10426
|
+
"Lech-Lecha": ["לֶךְ־לְךָ"],
|
|
10427
|
+
"Masei": ["מַסְעֵי"],
|
|
10428
|
+
"Matot": ["מַּטּוֹת"],
|
|
10429
|
+
"Metzora": ["מְּצֹרָע"],
|
|
10430
|
+
"Miketz": ["מִקֵּץ"],
|
|
10431
|
+
"Mishpatim": ["מִּשְׁפָּטִים"],
|
|
10432
|
+
"Nasso": ["נָשׂא"],
|
|
10433
|
+
"Nitzavim": ["נִצָּבִים"],
|
|
10434
|
+
"Noach": ["נֹחַ"],
|
|
10435
|
+
"Pekudei": ["פְקוּדֵי"],
|
|
10436
|
+
"Pinchas": ["פִּינְחָס"],
|
|
10437
|
+
"Re'eh": ["רְאֵה"],
|
|
10438
|
+
"Sh'lach": ["שְׁלַח־לְךָ"],
|
|
10439
|
+
"Shemot": ["שְׁמוֹת"],
|
|
10440
|
+
"Shmini": ["שְּׁמִינִי"],
|
|
10441
|
+
"Shoftim": ["שׁוֹפְטִים"],
|
|
10442
|
+
"Tazria": ["תַזְרִיעַ"],
|
|
10443
|
+
"Terumah": ["תְּרוּמָה"],
|
|
10444
|
+
"Tetzaveh": ["תְּצַוֶּה"],
|
|
10445
|
+
"Toldot": ["תּוֹלְדוֹת"],
|
|
10446
|
+
"Tzav": ["צַו"],
|
|
10447
|
+
"Vaera": ["וָאֵרָא"],
|
|
10448
|
+
"Vaetchanan": ["וָאֶתְחַנַּן"],
|
|
10449
|
+
"Vayakhel": ["וַיַּקְהֵל"],
|
|
10450
|
+
"Vayechi": ["וַיְחִי"],
|
|
10451
|
+
"Vayeilech": ["וַיֵּלֶךְ"],
|
|
10452
|
+
"Vayera": ["וַיֵּרָא"],
|
|
10453
|
+
"Vayeshev": ["וַיֵּשֶׁב"],
|
|
10454
|
+
"Vayetzei": ["וַיֵּצֵא"],
|
|
10455
|
+
"Vayigash": ["וַיִּגַּשׁ"],
|
|
10456
|
+
"Vayikra": ["וַיִּקְרָא"],
|
|
10457
|
+
"Vayishlach": ["וַיִּשְׁלַח"],
|
|
10458
|
+
"Vezot Haberakhah": ["וְזֹאת הַבְּרָכָה"],
|
|
10459
|
+
"Yitro": ["יִתְרוֹ"],
|
|
10460
|
+
"Asara B'Tevet": ["עֲשָׂרָה בְּטֵבֵת"],
|
|
10461
|
+
"Candle lighting": ["הַדְלָקַת נֵרוֹת"],
|
|
10462
|
+
"Chanukah": ["חֲנוּכָּה"],
|
|
10463
|
+
"Chanukah: 1 Candle": ["חֲנוּכָּה: א׳ נֵר"],
|
|
10464
|
+
"Chanukah: 2 Candles": ["חֲנוּכָּה: ב׳ נֵרוֹת"],
|
|
10465
|
+
"Chanukah: 3 Candles": ["חֲנוּכָּה: ג׳ נֵרוֹת"],
|
|
10466
|
+
"Chanukah: 4 Candles": ["חֲנוּכָּה: ד׳ נֵרוֹת"],
|
|
10467
|
+
"Chanukah: 5 Candles": ["חֲנוּכָּה: ה׳ נֵרוֹת"],
|
|
10468
|
+
"Chanukah: 6 Candles": ["חֲנוּכָּה: ו׳ נֵרוֹת"],
|
|
10469
|
+
"Chanukah: 7 Candles": ["חֲנוּכָּה: ז׳ נֵרוֹת"],
|
|
10470
|
+
"Chanukah: 8 Candles": ["חֲנוּכָּה: ח׳ נֵרוֹת"],
|
|
10471
|
+
"Chanukah: 8th Day": ["חֲנוּכָּה: יוֹם ח׳"],
|
|
10472
|
+
"Days of the Omer": ["סְפִירַת הָעוֹמֶר"],
|
|
10473
|
+
"Omer": ["עוֹמֶר"],
|
|
10474
|
+
"day of the Omer": ["בָּעוֹמֶר"],
|
|
10475
|
+
"Erev Pesach": ["עֶרֶב פֶּסַח"],
|
|
10476
|
+
"Erev Purim": ["עֶרֶב פּוּרִים"],
|
|
10477
|
+
"Erev Rosh Hashana": ["עֶרֶב רֹאשׁ הַשָּׁנָה"],
|
|
10478
|
+
"Erev Shavuot": ["עֶרֶב שָׁבוּעוֹת"],
|
|
10479
|
+
"Erev Simchat Torah": ["עֶרֶב שִׂמְחַת תּוֹרָה"],
|
|
10480
|
+
"Erev Sukkot": ["עֶרֶב סוּכּוֹת"],
|
|
10481
|
+
"Erev Tish'a B'Av": ["עֶרֶב תִּשְׁעָה בְּאָב"],
|
|
10482
|
+
"Erev Yom Kippur": ["עֶרֶב יוֹם כִּפּוּר"],
|
|
10483
|
+
"Havdalah": ["הַבְדָּלָה"],
|
|
10484
|
+
"Lag BaOmer": ["ל״ג בָּעוֹמֶר"],
|
|
10485
|
+
"Leil Selichot": ["סליחות"],
|
|
10486
|
+
"Pesach": ["פֶּסַח"],
|
|
10487
|
+
"Pesach I": ["פֶּסַח א׳"],
|
|
10488
|
+
"Pesach II": ["פֶּסַח ב׳"],
|
|
10489
|
+
"Pesach II (CH''M)": ["פֶּסַח ב׳ (חוה״מ)"],
|
|
10490
|
+
"Pesach III (CH''M)": ["פֶּסַח ג׳ (חוה״מ)"],
|
|
10491
|
+
"Pesach IV (CH''M)": ["פֶּסַח ד׳ (חוה״מ)"],
|
|
10492
|
+
"Pesach Sheni": ["פֶּסַח שני"],
|
|
10493
|
+
"Pesach V (CH''M)": ["פֶּסַח ה׳ (חוה״מ)"],
|
|
10494
|
+
"Pesach VI (CH''M)": ["פֶּסַח ו׳ (חוה״מ)"],
|
|
10495
|
+
"Pesach VII": ["פֶּסַח ז׳"],
|
|
10496
|
+
"Pesach VIII": ["פֶּסַח ח׳"],
|
|
10497
|
+
"Purim": ["פּוּרִים"],
|
|
10498
|
+
"Purim Katan": ["פּוּרִים קָטָן"],
|
|
10499
|
+
"Rosh Chodesh %s": ["רֹאשׁ חוֹדֶשׁ %s"],
|
|
10500
|
+
"Rosh Chodesh": ["רֹאשׁ חוֹדֶשׁ"],
|
|
10501
|
+
"Adar": ["אַדָר"],
|
|
10502
|
+
"Adar I": ["אַדָר א׳"],
|
|
10503
|
+
"Adar II": ["אַדָר ב׳"],
|
|
10504
|
+
"Av": ["אָב"],
|
|
10505
|
+
"Cheshvan": ["חֶשְׁוָן"],
|
|
10506
|
+
"Elul": ["אֱלוּל"],
|
|
10507
|
+
"Iyyar": ["אִיָיר"],
|
|
10508
|
+
"Kislev": ["כִּסְלֵו"],
|
|
10509
|
+
"Nisan": ["נִיסָן"],
|
|
10510
|
+
"Sh'vat": ["שְׁבָט"],
|
|
10511
|
+
"Sivan": ["סִיוָן"],
|
|
10512
|
+
"Tamuz": ["תַּמּוּז"],
|
|
10513
|
+
"Tevet": ["טֵבֵת"],
|
|
10514
|
+
"Tishrei": ["תִּשְׁרֵי"],
|
|
10515
|
+
"Rosh Hashana": ["רֹאשׁ הַשָּׁנָה"],
|
|
10516
|
+
"Rosh Hashana I": ["רֹאשׁ הַשָּׁנָה א׳"],
|
|
10517
|
+
"Rosh Hashana II": ["רֹאשׁ הַשָּׁנָה ב׳"],
|
|
10518
|
+
"Shabbat Chazon": ["שַׁבָּת חֲזוֹן"],
|
|
10519
|
+
"Shabbat HaChodesh": ["שַׁבָּת הַחֹדֶשׁ"],
|
|
10520
|
+
"Shabbat HaGadol": ["שַׁבָּת הַגָּדוֹל"],
|
|
10521
|
+
"Shabbat Machar Chodesh": ["שַׁבָּת מָחָר חוֹדֶשׁ"],
|
|
10522
|
+
"Shabbat Nachamu": ["שַׁבָּת נַחֲמוּ"],
|
|
10523
|
+
"Shabbat Parah": ["שַׁבָּת פּרה"],
|
|
10524
|
+
"Shabbat Rosh Chodesh": ["שַׁבָּת רֹאשׁ חוֹדֶשׁ"],
|
|
10525
|
+
"Shabbat Shekalim": ["שַׁבָּת שְׁקָלִים"],
|
|
10526
|
+
"Shabbat Shuva": ["שַׁבָּת שׁוּבָה"],
|
|
10527
|
+
"Shabbat Zachor": ["שַׁבָּת זָכוֹר"],
|
|
10528
|
+
"Shavuot": ["שָׁבוּעוֹת"],
|
|
10529
|
+
"Shavuot I": ["שָׁבוּעוֹת א׳"],
|
|
10530
|
+
"Shavuot II": ["שָׁבוּעוֹת ב׳"],
|
|
10531
|
+
"Shmini Atzeret": ["שְׁמִינִי עֲצֶרֶת"],
|
|
10532
|
+
"Shushan Purim": ["שׁוּשָׁן פּוּרִים"],
|
|
10533
|
+
"Sigd": ["סיגד"],
|
|
10534
|
+
"Simchat Torah": ["שִׂמְחַת תּוֹרָה"],
|
|
10535
|
+
"Sukkot": ["סוּכּוֹת"],
|
|
10536
|
+
"Sukkot I": ["סוּכּוֹת א׳"],
|
|
10537
|
+
"Sukkot II": ["סוּכּוֹת ב׳"],
|
|
10538
|
+
"Sukkot II (CH''M)": ["סוּכּוֹת ב׳ (חוה״מ)"],
|
|
10539
|
+
"Sukkot III (CH''M)": ["סוּכּוֹת ג׳ (חוה״מ)"],
|
|
10540
|
+
"Sukkot IV (CH''M)": ["סוּכּוֹת ד׳ (חוה״מ)"],
|
|
10541
|
+
"Sukkot V (CH''M)": ["סוּכּוֹת ה׳ (חוה״מ)"],
|
|
10542
|
+
"Sukkot VI (CH''M)": ["סוּכּוֹת ו׳ (חוה״מ)"],
|
|
10543
|
+
"Sukkot VII (Hoshana Raba)": ["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],
|
|
10544
|
+
"Ta'anit Bechorot": ["תַּעֲנִית בְּכוֹרוֹת"],
|
|
10545
|
+
"Ta'anit Esther": ["תַּעֲנִית אֶסְתֵּר"],
|
|
10546
|
+
"Tish'a B'Av": ["תִּשְׁעָה בְּאָב"],
|
|
10547
|
+
"Tu B'Av": ["טוּ בְּאָב"],
|
|
10548
|
+
"Tu BiShvat": ["טוּ בִּשְׁבָט"],
|
|
10549
|
+
"Tu B'Shvat": ["טוּ בִּשְׁבָט"],
|
|
10550
|
+
"Tzom Gedaliah": ["צוֹם גְּדַלְיָה"],
|
|
10551
|
+
"Tzom Tammuz": ["צוֹם תָּמוּז"],
|
|
10552
|
+
"Yom HaAtzma'ut": ["יוֹם הָעַצְמָאוּת"],
|
|
10553
|
+
"Yom HaShoah": ["יוֹם הַשּׁוֹאָה"],
|
|
10554
|
+
"Yom HaZikaron": ["יוֹם הַזִּכָּרוֹן"],
|
|
10555
|
+
"Yom Kippur": ["יוֹם כִּפּוּר"],
|
|
10556
|
+
"Yom Yerushalayim": ["יוֹם יְרוּשָׁלַיִם"],
|
|
10557
|
+
"Yom HaAliyah": ["יוֹם הַעֲלִיָּה"],
|
|
10558
|
+
"Yom HaAliyah School Observance": ["שְׁמִירָת בֵּית הַסֵפֶר לְיוֹם הַעֲלִיָּה"],
|
|
10559
|
+
"Pesach I (on Shabbat)": ["פֶּסַח יוֹם א׳ (בְּשַׁבָּת)"],
|
|
10560
|
+
"Pesach Chol ha-Moed Day 1": ["פֶּסַח חוֹל הַמּוֹעֵד יוֹם א׳"],
|
|
10561
|
+
"Pesach Chol ha-Moed Day 2": ["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ב׳"],
|
|
10562
|
+
"Pesach Chol ha-Moed Day 3": ["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ג׳"],
|
|
10563
|
+
"Pesach Chol ha-Moed Day 4": ["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ד׳"],
|
|
10564
|
+
"Pesach Chol ha-Moed Day 5": ["פֶּסַח חוֹל הַמּוֹעֵד יוֹם ה׳"],
|
|
10565
|
+
"Pesach Shabbat Chol ha-Moed": ["פֶּסַח שַׁבָּת חוֹל הַמּוֹעֵד"],
|
|
10566
|
+
"Shavuot II (on Shabbat)": ["שָׁבוּעוֹת יוֹם ב׳ (בְּשַׁבָּת)"],
|
|
10567
|
+
"Rosh Hashana I (on Shabbat)": ["רֹאשׁ הַשָּׁנָה יוֹם א׳ (בְּשַׁבָּת)"],
|
|
10568
|
+
"Yom Kippur (on Shabbat)": ["יוֹם כִּפּוּר (בְּשַׁבָּת)"],
|
|
10569
|
+
"Yom Kippur (Mincha, Traditional)": ["יוֹם כִּפּוּר מִנחָה"],
|
|
10570
|
+
"Yom Kippur (Mincha, Alternate)": ["יוֹם כִּפּוּר מִנחָה"],
|
|
10571
|
+
"Sukkot I (on Shabbat)": ["סוּכּוֹת יוֹם א׳ (בְּשַׁבָּת)"],
|
|
10572
|
+
"Sukkot Chol ha-Moed Day 1": ["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם א׳"],
|
|
10573
|
+
"Sukkot Chol ha-Moed Day 2": ["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ב׳"],
|
|
10574
|
+
"Sukkot Chol ha-Moed Day 3": ["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ג׳"],
|
|
10575
|
+
"Sukkot Chol ha-Moed Day 4": ["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ד׳"],
|
|
10576
|
+
"Sukkot Chol ha-Moed Day 5": ["סוּכּוֹת חוֹל הַמּוֹעֵד יוֹם ה׳"],
|
|
10577
|
+
"Sukkot Shabbat Chol ha-Moed": ["סוּכּוֹת שַׁבָּת חוֹל הַמּוֹעֵד"],
|
|
10578
|
+
"Sukkot Final Day (Hoshana Raba)": ["סוּכּוֹת ז׳ (הוֹשַׁעְנָא רַבָּה)"],
|
|
10579
|
+
"Rosh Chodesh Adar": ["רֹאשׁ חוֹדֶשׁ אַדָר"],
|
|
10580
|
+
"Rosh Chodesh Adar I": ["רֹאשׁ חוֹדֶשׁ אַדָר א׳"],
|
|
10581
|
+
"Rosh Chodesh Adar II": ["רֹאשׁ חוֹדֶשׁ אַדָר ב׳"],
|
|
10582
|
+
"Rosh Chodesh Av": ["רֹאשׁ חוֹדֶשׁ אָב"],
|
|
10583
|
+
"Rosh Chodesh Cheshvan": ["רֹאשׁ חוֹדֶשׁ חֶשְׁוָן"],
|
|
10584
|
+
"Rosh Chodesh Elul": ["רֹאשׁ חוֹדֶשׁ אֱלוּל"],
|
|
10585
|
+
"Rosh Chodesh Iyyar": ["רֹאשׁ חוֹדֶשׁ אִיָיר"],
|
|
10586
|
+
"Rosh Chodesh Kislev": ["רֹאשׁ חוֹדֶשׁ כִּסְלֵו"],
|
|
10587
|
+
"Rosh Chodesh Nisan": ["רֹאשׁ חוֹדֶשׁ נִיסָן"],
|
|
10588
|
+
"Rosh Chodesh Sh'vat": ["רֹאשׁ חוֹדֶשׁ שְׁבָט"],
|
|
10589
|
+
"Rosh Chodesh Sivan": ["רֹאשׁ חוֹדֶשׁ סִיוָן"],
|
|
10590
|
+
"Rosh Chodesh Tamuz": ["רֹאשׁ חוֹדֶשׁ תָּמוּז"],
|
|
10591
|
+
"Rosh Chodesh Tevet": ["רֹאשׁ חוֹדֶשׁ טֵבֵת"],
|
|
10592
|
+
"min": ["דַּקּוֹת"],
|
|
10593
|
+
"Fast begins": ["תחילת הַצוֹם"],
|
|
10594
|
+
"Fast ends": ["סִיּוּם הַצוֹם"],
|
|
10595
|
+
"Rosh Hashana LaBehemot": ["רֹאשׁ הַשָּׁנָה לְמַעְשַׂר בְּהֵמָה"],
|
|
10596
|
+
"Tish'a B'Av (observed)": ["תִּשְׁעָה בְּאָב נִדחֶה"],
|
|
10597
|
+
"Shabbat Mevarchim Chodesh": ["שַׁבָּת מְבָרְכִים חוֹדֶשׁ"],
|
|
10598
|
+
"Shabbat Shirah": ["שַׁבָּת שִׁירָה"],
|
|
10599
|
+
"Chatzot HaLailah": ["חֲצוֹת הַלַיְלָה"],
|
|
10600
|
+
"Alot haShachar": ["עֲלוֹת הַשַּׁחַר"],
|
|
10601
|
+
"Misheyakir": ["מִשֶּׁיַּכִּיר"],
|
|
10602
|
+
"Misheyakir Machmir": ["מִשֶּׁיַּכִּיר מַחמִיר"],
|
|
10603
|
+
"Dawn": ["דִּימְדּוּמֵי בּוֹקֵר"],
|
|
10604
|
+
"Sunrise": ["הַנֵץ הַחַמָּה"],
|
|
10605
|
+
"Kriat Shema, sof zeman": ["סוֹף זְמַן קְרִיאַת שְׁמַע גר״א"],
|
|
10606
|
+
"Tefilah, sof zeman": ["סוֹף זְמַן תְּפִלָּה גר״א"],
|
|
10607
|
+
"Kriat Shema, sof zeman (MGA)": ["סוֹף זְמַן קְרִיאַת שְׁמַע מג״א"],
|
|
10608
|
+
"Tefilah, sof zeman (MGA)": ["סוֹף זְמַן תְּפִלָּה מג״א"],
|
|
10609
|
+
"Chatzot hayom": ["חֲצוֹת הַיּוֹם"],
|
|
10610
|
+
"Mincha Gedolah": ["מִנְחָה גְּדוֹלָה"],
|
|
10611
|
+
"Mincha Ketanah": ["מִנְחָה קְטַנָּה"],
|
|
10612
|
+
"Plag HaMincha": ["פְּלַג הַמִּנְחָה"],
|
|
10613
|
+
"Dusk": ["דִּימְדּוּמֵי עֶרֶב"],
|
|
10614
|
+
"Sunset": ["שְׁקִיעָה"],
|
|
10615
|
+
"Nightfall - End of ordained fasts": ["לַיְלָה - גמר תעניות דרבנן"],
|
|
10616
|
+
"Tzeit HaKochavim": ["צֵאת הַכּוֹכָבִים"],
|
|
10617
|
+
"Lovingkindness": ["חֶֽסֶד"],
|
|
10618
|
+
"Might": ["גְבוּרָה"],
|
|
10619
|
+
"Beauty": ["תִּפאֶרֶת"],
|
|
10620
|
+
"Eternity": ["נֶּֽצַח"],
|
|
10621
|
+
"Splendor": ["הוֹד"],
|
|
10622
|
+
"Foundation": ["יְּסוֹד"],
|
|
10623
|
+
"Majesty": ["מַּלְכוּת"],
|
|
10624
|
+
"day": ["יוֹם"],
|
|
10625
|
+
"Chanukah Day 1": ["חֲנוּכָּה יוֹם א׳"],
|
|
10626
|
+
"Chanukah Day 2": ["חֲנוּכָּה יוֹם ב׳"],
|
|
10627
|
+
"Chanukah Day 3": ["חֲנוּכָּה יוֹם ג׳"],
|
|
10628
|
+
"Chanukah Day 4": ["חֲנוּכָּה יוֹם ד׳"],
|
|
10629
|
+
"Chanukah Day 5": ["חֲנוּכָּה יוֹם ה׳"],
|
|
10630
|
+
"Chanukah Day 6": ["חֲנוּכָּה יוֹם ו׳"],
|
|
10631
|
+
"Chanukah Day 7": ["חֲנוּכָּה יוֹם ז׳"],
|
|
10632
|
+
"Chanukah Day 7 (on Rosh Chodesh)": ["חֲנוּכָּה יוֹם ז׳ (רֹאשׁ חוֹדֶשׁ)"],
|
|
10633
|
+
"Chanukah Day 8": ["חֲנוּכָּה יוֹם ח׳"],
|
|
10634
|
+
"Chanukah Day 1 (on Shabbat)": ["חֲנוּכָּה יוֹם א׳ (בְּשַׁבָּת)"],
|
|
10635
|
+
"Chanukah Day 2 (on Shabbat)": ["חֲנוּכָּה יוֹם ב׳ (בְּשַׁבָּת)"],
|
|
10636
|
+
"Chanukah Day 3 (on Shabbat)": ["חֲנוּכָּה יוֹם ג׳ (בְּשַׁבָּת)"],
|
|
10637
|
+
"Chanukah Day 4 (on Shabbat)": ["חֲנוּכָּה יוֹם ד׳ (בְּשַׁבָּת)"],
|
|
10638
|
+
"Chanukah Day 5 (on Shabbat)": ["חֲנוּכָּה יוֹם ה׳ (בְּשַׁבָּת)"],
|
|
10639
|
+
"Chanukah Day 7 (on Shabbat)": ["חֲנוּכָּה יוֹם ז׳ (בְּשַׁבָּת)"],
|
|
10640
|
+
"Chanukah Day 8 (on Shabbat)": ["חֲנוּכָּה יוֹם ח׳ (בְּשַׁבָּת)"],
|
|
10641
|
+
"Shabbat Rosh Chodesh Chanukah": ["שַׁבָּת רֹאשׁ חוֹדֶשׁ חֲנוּכָּה"],
|
|
10642
|
+
"Yom Kippur Katan": ["יוֹם כִּפּוּר קָטָן"],
|
|
10643
|
+
"Family Day": ["יוֹם הַמִּשׁפָּחָה"],
|
|
10644
|
+
"Yitzhak Rabin Memorial Day": ["יוֹם הַזִּכָּרוֹן ליצחק רבין"],
|
|
10645
|
+
"Jabotinsky Day": ["יוֹם ז׳בוטינסקי"],
|
|
10646
|
+
"Herzl Day": ["יוֹם הרצל"],
|
|
10647
|
+
"Ben-Gurion Day": ["יוֹם בן־גוריון"],
|
|
10648
|
+
"Birkat Hachamah": ["בִרְכַּת הַחַמָּה"],
|
|
10649
|
+
"Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"],
|
|
10650
|
+
"Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"],
|
|
10651
|
+
"after sunset": ["אחרי השקיעה"],
|
|
10652
|
+
"Yerushalmi": ["יְרוּשַׁלְמִי"],
|
|
10653
|
+
"Chag HaBanot": ["חַג הַבָּנוֹת"],
|
|
10654
|
+
"Joshua": ["יְהוֹשׁוּעַ"],
|
|
10655
|
+
"Judges": ["שׁוֹפְטִים"],
|
|
10656
|
+
"I Samuel": ["שְׁמוּאֵל רִאשׁוֹן"],
|
|
10657
|
+
"II Samuel": ["שְׁמוּאֵל שֵׁנִי"],
|
|
10658
|
+
"I Kings": ["מְלָכִים רִאשׁוֹן"],
|
|
10659
|
+
"II Kings": ["מְלָכִים שֵׁנִי"],
|
|
10660
|
+
"Isaiah": ["יְשַׁעְיָהוּ"],
|
|
10661
|
+
"Jeremiah": ["יִרְמְיָהוּ"],
|
|
10662
|
+
"Ezekiel": ["יְחֶזְקֵאל"],
|
|
10663
|
+
"Hosea": ["הוֹשֵׁעַ"],
|
|
10664
|
+
"Joel": ["יוֹאֵל"],
|
|
10665
|
+
"Amos": ["עָמוּס"],
|
|
10666
|
+
"Obadiah": ["עוֹבַדְיָה"],
|
|
10667
|
+
"Jonah": ["יוֹנָה"],
|
|
10668
|
+
"Micah": ["מִיכָה"],
|
|
10669
|
+
"Nachum": ["נַחוּם"],
|
|
10670
|
+
"Habakkuk": ["חֲבַקּוּק"],
|
|
10671
|
+
"Zephaniah": ["צְפַנְיָה"],
|
|
10672
|
+
"Haggai": ["חַגַּי"],
|
|
10673
|
+
"Zechariah": ["זְכַרְיָה"],
|
|
10674
|
+
"Malachi": ["מַלְאָכִי"],
|
|
10675
|
+
"Psalms": ["תְּהִלִּים"],
|
|
10676
|
+
"Proverbs": ["מִשְׁלֵי"],
|
|
10677
|
+
"Job": ["אִיּוֹב"],
|
|
10678
|
+
"Song of Songs": ["שִׁיר הַשִּׁירִים"],
|
|
10679
|
+
"Ruth": ["רוּת"],
|
|
10680
|
+
"Lamentations": ["אֵיכָה"],
|
|
10681
|
+
"Ecclesiastes": ["קֹהֶלֶת"],
|
|
10682
|
+
"Esther": ["אֶסְתֵּר"],
|
|
10683
|
+
"Daniel": ["דָּנִיֵּאל"],
|
|
10684
|
+
"Ezra": ["עֶזְרָא"],
|
|
10685
|
+
"Nehemiah": ["נְחֶמְיָה"],
|
|
10686
|
+
"I Chronicles": ["דִברֵי הַיָמִים רִאשׁוֹן"],
|
|
10687
|
+
"II Chronicles": ["דִברֵי הַיָמִים שֵׁנִי"],
|
|
10688
|
+
"Yom Kippur (Mincha)": ["יוֹם כִּפּוּר מִנחָה"],
|
|
10689
|
+
"Tish'a B'Av (Mincha)": ["תִּשְׁעָה בְּאָב מִנחָה"],
|
|
10690
|
+
"Asara B'Tevet (Mincha)": ["עֲשָׂרָה בְּטֵבֵת מִנחָה"],
|
|
10691
|
+
"Ta'anit Bechorot (Mincha)": ["תַּעֲנִית בְּכוֹרוֹת מִנחָה"],
|
|
10692
|
+
"Ta'anit Esther (Mincha)": ["תַּעֲנִית אֶסְתֵּר מִנחָה"],
|
|
10693
|
+
"Tzom Gedaliah (Mincha)": ["צוֹם גְּדַלְיָה מִנחָה"],
|
|
10694
|
+
"Tzom Tammuz (Mincha)": ["צוֹם תָּמוּז מִנחָה"],
|
|
10695
|
+
"Molad": ["מוֹלָד הָלְּבָנָה"],
|
|
10696
|
+
"chalakim": ["חֲלָקִים"]
|
|
10697
|
+
}
|
|
10698
|
+
}
|
|
10699
|
+
};
|
|
10700
|
+
|
|
10701
|
+
Locale.addLocale('he', poHe);
|
|
10702
|
+
Locale.addLocale('h', poHe);
|
|
10703
|
+
const heStrs = poHe.contexts[''];
|
|
10704
|
+
const heNoNikud = {};
|
|
10705
|
+
for (const [key, val] of Object.entries(heStrs)) {
|
|
10706
|
+
heNoNikud[key] = [Locale.hebrewStripNikkud(val[0])];
|
|
10707
|
+
}
|
|
10708
|
+
const poHeNoNikud = {
|
|
10709
|
+
headers: poHe.headers,
|
|
10710
|
+
contexts: {
|
|
10711
|
+
'': heNoNikud
|
|
10712
|
+
}
|
|
10713
|
+
};
|
|
10714
|
+
Locale.addLocale('he-x-NoNikud', poHeNoNikud);
|
|
10715
|
+
|
|
10345
10716
|
/**
|
|
10346
10717
|
* @private
|
|
10347
10718
|
* @param {number} start
|
|
@@ -10504,10 +10875,7 @@ function tachanunYear(year, il) {
|
|
|
10504
10875
|
const FRI = 5;
|
|
10505
10876
|
const SAT = 6;
|
|
10506
10877
|
const NISAN = months.NISAN;
|
|
10507
|
-
// const IYYAR = months.IYYAR;
|
|
10508
10878
|
const SIVAN = months.SIVAN;
|
|
10509
|
-
// const TAMUZ = months.TAMUZ;
|
|
10510
|
-
// const AV = months.AV;
|
|
10511
10879
|
const ELUL = months.ELUL;
|
|
10512
10880
|
const TISHREI = months.TISHREI;
|
|
10513
10881
|
const LIGHT_CANDLES = flags.LIGHT_CANDLES;
|
|
@@ -10940,6 +11308,7 @@ function observedInDiaspora(ev) {
|
|
|
10940
11308
|
return ev.observedInDiaspora();
|
|
10941
11309
|
}
|
|
10942
11310
|
const yearArrayCache = new Map();
|
|
11311
|
+
const holidaysOnDate = new Map();
|
|
10943
11312
|
|
|
10944
11313
|
/**
|
|
10945
11314
|
* HebrewCalendar is the main interface to the `@hebcal/core` library.
|
|
@@ -11288,20 +11657,29 @@ class HebrewCalendar {
|
|
|
11288
11657
|
}
|
|
11289
11658
|
|
|
11290
11659
|
/**
|
|
11291
|
-
* Returns an array of Events on this date (or undefined if no events)
|
|
11660
|
+
* Returns an array of Events on this date (or `undefined` if no events)
|
|
11292
11661
|
* @param {HDate|Date|number} date Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
11293
11662
|
* @param {boolean} [il] use the Israeli schedule for holidays
|
|
11294
11663
|
* @return {Event[]}
|
|
11295
11664
|
*/
|
|
11296
11665
|
static getHolidaysOnDate(date, il) {
|
|
11297
11666
|
const hd = HDate.isHDate(date) ? date : new HDate(date);
|
|
11667
|
+
const hdStr = hd.toString();
|
|
11668
|
+
const cacheKey = hdStr + '/' + (typeof il === 'undefined' ? 2 : il ? 1 : 0);
|
|
11669
|
+
if (holidaysOnDate.has(cacheKey)) {
|
|
11670
|
+
return holidaysOnDate.get(cacheKey);
|
|
11671
|
+
}
|
|
11298
11672
|
const yearMap = getHolidaysForYear_(hd.getFullYear());
|
|
11299
|
-
const events = yearMap.get(
|
|
11673
|
+
const events = yearMap.get(hdStr);
|
|
11674
|
+
// if il isn't a boolean return both diaspora + IL for day
|
|
11300
11675
|
if (typeof il === 'undefined' || typeof events === 'undefined') {
|
|
11676
|
+
holidaysOnDate.set(cacheKey, events);
|
|
11301
11677
|
return events;
|
|
11302
11678
|
}
|
|
11303
11679
|
const myFilter = il ? observedInIsrael : observedInDiaspora;
|
|
11304
|
-
|
|
11680
|
+
const filtered = events.filter(myFilter);
|
|
11681
|
+
holidaysOnDate.set(cacheKey, filtered);
|
|
11682
|
+
return filtered;
|
|
11305
11683
|
}
|
|
11306
11684
|
|
|
11307
11685
|
/**
|