@hebcal/rest-api 5.2.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,703 +1,19 @@
1
- /*! @hebcal/rest-api v5.2.0 */
2
- import { parshiot, HDate, flags, HebrewCalendar, version, Zmanim, Locale as Locale$1, gematriya } from '@hebcal/core';
3
- import { getLeyningForParshaHaShavua, getLeyningForHoliday, formatAliyahWithBook } from '@hebcal/leyning';
4
- import { getTriennialForParshaHaShavua } from '@hebcal/triennial';
1
+ /*! @hebcal/rest-api v6.0.1 */
2
+ import { flags } from '@hebcal/core/dist/esm/event';
3
+ import { reformatTimeStr } from '@hebcal/core/dist/esm/reformatTimeStr';
4
+ import { HDate, isoDateString, gematriya } from '@hebcal/hdate';
5
+ export { pad2, pad4 } from '@hebcal/hdate';
6
+ import { getLeyningForParshaHaShavua } from '@hebcal/leyning/dist/esm/leyning';
7
+ import { getLeyningForHoliday } from '@hebcal/leyning/dist/esm/getLeyningForHoliday';
8
+ import { parshiot } from '@hebcal/core/dist/esm/sedra';
9
+ import { Zmanim } from '@hebcal/core/dist/esm/zmanim';
10
+ import { version } from '@hebcal/core/dist/esm/pkgVersion';
11
+ import { Locale } from '@hebcal/core/dist/esm/locale';
12
+ import { formatAliyahWithBook } from '@hebcal/leyning/dist/esm/common';
5
13
 
6
- /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
7
- /** @private */
8
- const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
9
- /** @private */
10
- const monthLengths = [lengths, lengths.slice()];
11
- monthLengths[1][2] = 29;
12
- /**
13
- * @private
14
- */
15
- function mod(x, y) {
16
- return x - y * Math.floor(x / y);
17
- }
18
- /**
19
- * @private
20
- */
21
- function quotient(x, y) {
22
- return Math.floor(x / y);
23
- }
24
- /**
25
- * @private
26
- * @param abs - R.D. number of days
27
- */
28
- function yearFromFixed(abs) {
29
- const l0 = abs - 1;
30
- const n400 = quotient(l0, 146097);
31
- const d1 = mod(l0, 146097);
32
- const n100 = quotient(d1, 36524);
33
- const d2 = mod(d1, 36524);
34
- const n4 = quotient(d2, 1461);
35
- const d3 = mod(d2, 1461);
36
- const n1 = quotient(d3, 365);
37
- const year = 400 * n400 + 100 * n100 + 4 * n4 + n1;
38
- return n100 !== 4 && n1 !== 4 ? year + 1 : year;
39
- }
40
- /*
41
- const ABS_14SEP1752 = 639797;
42
- const ABS_2SEP1752 = 639785;
43
- */
44
- /*
45
- * Formerly in namespace, now top-level
46
- */
47
- /**
48
- * Returns true if the Gregorian year is a leap year
49
- * @param year Gregorian year
50
- */
51
- function isGregLeapYear(year) {
52
- return !(year % 4) && (!!(year % 100) || !(year % 400));
53
- }
54
- /**
55
- * Number of days in the Gregorian month for given year
56
- * @param month Gregorian month (1=January, 12=December)
57
- * @param year Gregorian year
58
- */
59
- function daysInGregMonth(month, year) {
60
- // 1 based months
61
- return monthLengths[+isGregLeapYear(year)][month];
62
- }
63
- /**
64
- * Returns true if the object is a Javascript Date
65
- */
66
- function isDate(obj) {
67
- // eslint-disable-next-line no-prototype-builtins
68
- return typeof obj === 'object' && Date.prototype.isPrototypeOf(obj);
69
- }
70
- /**
71
- * @private
72
- * @param year
73
- * @param month (1-12)
74
- * @param day (1-31)
75
- */
76
- function toFixed(year, month, day) {
77
- const py = year - 1;
78
- return (365 * py +
79
- quotient(py, 4) -
80
- quotient(py, 100) +
81
- quotient(py, 400) +
82
- quotient(367 * month - 362, 12) +
83
- (month <= 2 ? 0 : isGregLeapYear(year) ? -1 : -2) +
84
- day);
85
- }
86
- /**
87
- * Converts Gregorian date to absolute R.D. (Rata Die) days
88
- * @param date Gregorian date
89
- */
90
- function greg2abs(date) {
91
- if (!isDate(date)) {
92
- throw new TypeError(`Argument not a Date: ${date}`);
93
- }
94
- const abs = toFixed(date.getFullYear(), date.getMonth() + 1, date.getDate());
95
- /*
96
- if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
97
- throw new RangeError(`Invalid Date: ${date}`);
98
- }
99
- */
100
- return abs;
101
- }
102
- /**
103
- * Converts from Rata Die (R.D. number) to Gregorian date.
104
- * See the footnote on page 384 of ``Calendrical Calculations, Part II:
105
- * Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
106
- * Clamen, Software--Practice and Experience, Volume 23, Number 4
107
- * (April, 1993), pages 383-404 for an explanation.
108
- * @param abs - R.D. number of days
109
- */
110
- function abs2greg(abs) {
111
- if (typeof abs !== 'number') {
112
- throw new TypeError(`Argument not a Number: ${abs}`);
113
- }
114
- abs = Math.trunc(abs);
115
- /*
116
- if (abs < ABS_14SEP1752 && abs > ABS_2SEP1752) {
117
- throw new RangeError(`Invalid Date: ${abs}`);
118
- }
119
- */
120
- const year = yearFromFixed(abs);
121
- const priorDays = abs - toFixed(year, 1, 1);
122
- const correction = abs < toFixed(year, 3, 1) ? 0 : isGregLeapYear(year) ? 1 : 2;
123
- const month = quotient(12 * (priorDays + correction) + 373, 367);
124
- const day = abs - toFixed(year, month, 1) + 1;
125
- const dt = new Date(year, month - 1, day);
126
- if (year < 100 && year >= 0) {
127
- dt.setFullYear(year);
128
- }
129
- return dt;
130
- }
131
-
132
- /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-namespace */
133
- /**
134
- * Gregorian date helper functions
135
- */
136
- var greg;
137
- (function (greg) {
138
- })(greg || (greg = {}));
139
- greg.abs2greg = abs2greg;
140
- greg.daysInMonth = daysInGregMonth;
141
- greg.greg2abs = greg2abs;
142
- greg.isDate = isDate;
143
- greg.isLeapYear = isGregLeapYear;
14
+ const AD="Andorra";const AE="United Arab Emirates";const AF="Afghanistan";const AI="Anguilla";const AL="Albania";const AM="Armenia";const AO="Angola";const AR="Argentina";const AS="American Samoa";const AT="Austria";const AU="Australia";const AW="Aruba";const AZ="Azerbaijan";const BA="Bosnia and Herzegovina";const BB="Barbados";const BD="Bangladesh";const BE="Belgium";const BF="Burkina Faso";const BG="Bulgaria";const BH="Bahrain";const BI="Burundi";const BJ="Benin";const BM="Bermuda";const BN="Brunei";const BO="Bolivia";const BR="Brazil";const BS="Bahamas";const BT="Bhutan";const BW="Botswana";const BY="Belarus";const BZ="Belize";const CA="Canada";const CD="Democratic Republic of the Congo";const CF="Central African Republic";const CG="Republic of the Congo";const CH="Switzerland";const CI="Ivory Coast";const CK="Cook Islands";const CL="Chile";const CM="Cameroon";const CN="China";const CO="Colombia";const CR="Costa Rica";const CU="Cuba";const CV="Cape Verde";const CW="Curacao";const CY="Cyprus";const CZ="Czech Republic";const DE="Germany";const DK="Denmark";const DM="Dominica";const DO="Dominican Republic";const DZ="Algeria";const EC="Ecuador";const EE="Estonia";const EG="Egypt";const ER="Eritrea";const ES="Spain";const ET="Ethiopia";const FI="Finland";const FJ="Fiji";const FK="Falkland Islands";const FO="Faroe Islands";const FR="France";const GA="Gabon";const GB="United Kingdom";const GE="Georgia";const GH="Ghana";const GI="Gibraltar";const GL="Greenland";const GM="Gambia";const GN="Guinea";const GQ="Equatorial Guinea";const GR="Greece";const GT="Guatemala";const GW="Guinea-Bissau";const GY="Guyana";const HK="Hong Kong";const HN="Honduras";const HR="Croatia";const HT="Haiti";const HU="Hungary";const ID="Indonesia";const IE="Ireland";const IL="Israel";const IM="Isle of Man";const IN="India";const IQ="Iraq";const IR="Iran";const IS="Iceland";const IT="Italy";const JM="Jamaica";const JO="Jordan";const JP="Japan";const KE="Kenya";const KG="Kyrgyzstan";const KH="Cambodia";const KM="Comoros";const KN="Saint Kitts and Nevis";const KP="North Korea";const KR="South Korea";const KW="Kuwait";const KY="Cayman Islands";const KZ="Kazakhstan";const LA="Laos";const LB="Lebanon";const LC="Saint Lucia";const LI="Liechtenstein";const LR="Liberia";const LS="Lesotho";const LT="Lithuania";const LU="Luxembourg";const LV="Latvia";const LY="Libya";const MA="Morocco";const MD="Moldova";const ME="Montenegro";const MG="Madagascar";const MK="Macedonia";const ML="Mali";const MM="Myanmar";const MN="Mongolia";const MP="Northern Mariana Islands";const MR="Mauritania";const MS="Montserrat";const MT="Malta";const MU="Mauritius";const MW="Malawi";const MX="Mexico";const MY="Malaysia";const MZ="Mozambique";const NA="Namibia";const NC="New Caledonia";const NE="Niger";const NG="Nigeria";const NI="Nicaragua";const NL="Netherlands";const NO="Norway";const NP="Nepal";const NU="Niue";const NZ="New Zealand";const OM="Oman";const PA="Panama";const PE="Peru";const PF="French Polynesia";const PG="Papua New Guinea";const PH="Philippines";const PK="Pakistan";const PL="Poland";const PR="Puerto Rico";const PT="Portugal";const PY="Paraguay";const QA="Qatar";const RO="Romania";const RS="Serbia";const RU="Russia";const RW="Rwanda";const SA="Saudi Arabia";const SB="Solomon Islands";const SC="Seychelles";const SD="Sudan";const SE="Sweden";const SG="Singapore";const SH="Saint Helena";const SI="Slovenia";const SK="Slovakia";const SL="Sierra Leone";const SN="Senegal";const SO="Somalia";const SR="Suriname";const ST="Sao Tome and Principe";const SV="El Salvador";const SY="Syria";const SZ="Swaziland";const TC="Turks and Caicos Islands";const TD="Chad";const TG="Togo";const TH="Thailand";const TJ="Tajikistan";const TM="Turkmenistan";const TN="Tunisia";const TR="Turkey";const TV="Tuvalu";const TW="Taiwan";const TZ="Tanzania";const UA="Ukraine";const UG="Uganda";const US="United States";const UY="Uruguay";const UZ="Uzbekistan";const VC="Saint Vincent and the Grenadines";const VE="Venezuela";const VG="British Virgin Islands";const VN="Vietnam";const WS="Samoa";const YE="Yemen";const YT="Mayotte";const ZA="South Africa";const ZM="Zambia";const ZW="Zimbabwe";var countryNames0 = {AD:AD,AE:AE,AF:AF,AI:AI,AL:AL,AM:AM,AO:AO,AR:AR,AS:AS,AT:AT,AU:AU,AW:AW,AZ:AZ,BA:BA,BB:BB,BD:BD,BE:BE,BF:BF,BG:BG,BH:BH,BI:BI,BJ:BJ,BM:BM,BN:BN,BO:BO,BR:BR,BS:BS,BT:BT,BW:BW,BY:BY,BZ:BZ,CA:CA,CD:CD,CF:CF,CG:CG,CH:CH,CI:CI,CK:CK,CL:CL,CM:CM,CN:CN,CO:CO,CR:CR,CU:CU,CV:CV,CW:CW,CY:CY,CZ:CZ,DE:DE,DK:DK,DM:DM,DO:DO,DZ:DZ,EC:EC,EE:EE,EG:EG,ER:ER,ES:ES,ET:ET,FI:FI,FJ:FJ,FK:FK,FO:FO,FR:FR,GA:GA,GB:GB,GE:GE,GH:GH,GI:GI,GL:GL,GM:GM,GN:GN,GQ:GQ,GR:GR,GT:GT,GW:GW,GY:GY,HK:HK,HN:HN,HR:HR,HT:HT,HU:HU,ID:ID,IE:IE,IL:IL,IM:IM,IN:IN,IQ:IQ,IR:IR,IS:IS,IT:IT,JM:JM,JO:JO,JP:JP,KE:KE,KG:KG,KH:KH,KM:KM,KN:KN,KP:KP,KR:KR,KW:KW,KY:KY,KZ:KZ,LA:LA,LB:LB,LC:LC,LI:LI,LR:LR,LS:LS,LT:LT,LU:LU,LV:LV,LY:LY,MA:MA,MD:MD,ME:ME,MG:MG,MK:MK,ML:ML,MM:MM,MN:MN,MP:MP,MR:MR,MS:MS,MT:MT,MU:MU,MW:MW,MX:MX,MY:MY,MZ:MZ,NA:NA,NC:NC,NE:NE,NG:NG,NI:NI,NL:NL,NO:NO,NP:NP,NU:NU,NZ:NZ,OM:OM,PA:PA,PE:PE,PF:PF,PG:PG,PH:PH,PK:PK,PL:PL,PR:PR,PT:PT,PY:PY,QA:QA,RO:RO,RS:RS,RU:RU,RW:RW,SA:SA,SB:SB,SC:SC,SD:SD,SE:SE,SG:SG,SH:SH,SI:SI,SK:SK,SL:SL,SN:SN,SO:SO,SR:SR,ST:ST,SV:SV,SY:SY,SZ:SZ,TC:TC,TD:TD,TG:TG,TH:TH,TJ:TJ,TM:TM,TN:TN,TR:TR,TV:TV,TW:TW,TZ:TZ,UA:UA,UG:UG,US:US,UY:UY,UZ:UZ,VC:VC,VE:VE,VG:VG,VN:VN,WS:WS,YE:YE,YT:YT,ZA:ZA,ZM:ZM,ZW:ZW};
144
15
 
145
- const alefbet = {
146
- א: 1,
147
- ב: 2,
148
- ג: 3,
149
- ד: 4,
150
- ה: 5,
151
- ו: 6,
152
- ז: 7,
153
- ח: 8,
154
- ט: 9,
155
- י: 10,
156
- כ: 20,
157
- ל: 30,
158
- מ: 40,
159
- נ: 50,
160
- ס: 60,
161
- ע: 70,
162
- פ: 80,
163
- צ: 90,
164
- ק: 100,
165
- ר: 200,
166
- ש: 300,
167
- ת: 400,
168
- };
169
- const heb2num = new Map();
170
- const num2heb = new Map();
171
- for (const [key, val] of Object.entries(alefbet)) {
172
- heb2num.set(key, val);
173
- num2heb.set(val, key);
174
- }
175
-
176
- /**
177
- * Formats a number with leading zeros so the resulting string is 4 digits long.
178
- * Similar to `string.padStart(4, '0')` but will also format
179
- * negative numbers similar to how the JavaScript date formats
180
- * negative year numbers (e.g. `-37` is formatted as `-000037`).
181
- */
182
- function pad4(num) {
183
- if (num < 0) {
184
- return '-00' + pad4(-num);
185
- }
186
- else if (num < 10) {
187
- return '000' + num;
188
- }
189
- else if (num < 100) {
190
- return '00' + num;
191
- }
192
- else if (num < 1000) {
193
- return '0' + num;
194
- }
195
- return String(num);
196
- }
197
- /**
198
- * Formats a number with leading zeros so the resulting string is 2 digits long.
199
- * Similar to `string.padStart(2, '0')`.
200
- */
201
- function pad2(num) {
202
- if (num >= 0 && num < 10) {
203
- return '0' + num;
204
- }
205
- return String(num);
206
- }
207
-
208
- /**
209
- * Returns YYYY-MM-DD in the local timezone
210
- */
211
- function isoDateString(dt) {
212
- return (pad4(dt.getFullYear()) +
213
- '-' +
214
- pad2(dt.getMonth() + 1) +
215
- '-' +
216
- pad2(dt.getDate()));
217
- }
218
-
219
- var poAshkenazi = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);" }, "contexts": { "": { "Tevet": ["Teves"] } } };
220
-
221
- var poHe = { "headers": { "plural-forms": "nplurals=2; plural=(n > 1);" }, "contexts": { "": { "Adar": ["אַדָר"], "Adar I": ["אַדָר א׳"], "Adar II": ["אַדָר ב׳"], "Av": ["אָב"], "Cheshvan": ["חֶשְׁוָן"], "Elul": ["אֱלוּל"], "Iyyar": ["אִיָיר"], "Kislev": ["כִּסְלֵו"], "Nisan": ["נִיסָן"], "Sh'vat": ["שְׁבָט"], "Sivan": ["סִיוָן"], "Tamuz": ["תַּמּוּז"], "Tevet": ["טֵבֵת"], "Tishrei": ["תִּשְׁרֵי"] } } };
222
-
223
- const noopLocale = {
224
- headers: { 'plural-forms': 'nplurals=2; plural=(n!=1);' },
225
- contexts: { '': {} },
226
- };
227
- const alias = {
228
- h: 'he',
229
- a: 'ashkenazi',
230
- s: 'en',
231
- '': 'en',
232
- };
233
- /** @private */
234
- const locales = new Map();
235
- /** @private */
236
- let activeLocale;
237
- /** @private */
238
- let activeName;
239
- /** @private */
240
- function getEnOrdinal(n) {
241
- const s = ['th', 'st', 'nd', 'rd'];
242
- const v = n % 100;
243
- return n + (s[(v - 20) % 10] || s[v] || s[0]);
244
- }
245
- /** @private */
246
- function checkLocale(locale) {
247
- if (typeof locale !== 'string') {
248
- throw new TypeError(`Invalid locale name: ${locale}`);
249
- }
250
- return locale.toLowerCase();
251
- }
252
- /** @private */
253
- function getExistingLocale(locale) {
254
- const locale1 = checkLocale(locale);
255
- const loc = locales.get(locale1);
256
- if (!loc) {
257
- throw new RangeError(`Locale '${locale}' not found`);
258
- }
259
- return loc;
260
- }
261
- /**
262
- * A locale in Hebcal is used for translations/transliterations of
263
- * holidays. `@hebcal/hdate` supports four locales by default
264
- * * `en` - default, Sephardic transliterations (e.g. "Shabbat")
265
- * * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
266
- * * `he` - Hebrew (e.g. "שַׁבָּת")
267
- * * `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
268
- */
269
- class Locale {
270
- /**
271
- * Returns translation only if `locale` offers a non-empty translation for `id`.
272
- * Otherwise, returns `undefined`.
273
- * @param id Message ID to translate
274
- * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
275
- */
276
- static lookupTranslation(id, locale) {
277
- const loc = (typeof locale === 'string' && locales.get(locale.toLowerCase())) ||
278
- activeLocale;
279
- const array = loc[id];
280
- if ((array === null || array === void 0 ? void 0 : array.length) && array[0].length) {
281
- return array[0];
282
- }
283
- return undefined;
284
- }
285
- /**
286
- * By default, if no translation was found, returns `id`.
287
- * @param id Message ID to translate
288
- * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
289
- */
290
- static gettext(id, locale) {
291
- const text = this.lookupTranslation(id, locale);
292
- if (typeof text === 'undefined') {
293
- return id;
294
- }
295
- return text;
296
- }
297
- /**
298
- * Register locale translations.
299
- * @param locale Locale name (i.e.: `'he'`, `'fr'`)
300
- * @param data parsed data from a `.po` file.
301
- */
302
- static addLocale(locale, data) {
303
- locale = checkLocale(locale);
304
- if (typeof data.contexts !== 'object' ||
305
- typeof data.contexts[''] !== 'object') {
306
- throw new TypeError(`Locale '${locale}' invalid compact format`);
307
- }
308
- locales.set(locale, data.contexts['']);
309
- }
310
- /**
311
- * Adds a translation to `locale`, replacing any previous translation.
312
- * @param locale Locale name (i.e: `'he'`, `'fr'`).
313
- * @param id Message ID to translate
314
- * @param translation Translation text
315
- */
316
- static addTranslation(locale, id, translation) {
317
- const loc = getExistingLocale(locale);
318
- if (typeof id !== 'string' || id.length === 0) {
319
- throw new TypeError(`Invalid id string: ${id}`);
320
- }
321
- const isArray = Array.isArray(translation);
322
- if (isArray) {
323
- const t0 = translation[0];
324
- if (typeof t0 !== 'string' || t0.length === 0) {
325
- throw new TypeError(`Invalid translation array: ${translation}`);
326
- }
327
- }
328
- else if (typeof translation !== 'string') {
329
- throw new TypeError(`Invalid translation string: ${translation}`);
330
- }
331
- loc[id] = isArray ? translation : [translation];
332
- }
333
- /**
334
- * Adds multiple translations to `locale`, replacing any previous translations.
335
- * @param locale Locale name (i.e: `'he'`, `'fr'`).
336
- * @param data parsed data from a `.po` file.
337
- */
338
- static addTranslations(locale, data) {
339
- const loc = getExistingLocale(locale);
340
- if (typeof data.contexts !== 'object' ||
341
- typeof data.contexts[''] !== 'object') {
342
- throw new TypeError(`Locale '${locale}' invalid compact format`);
343
- }
344
- const ctx = data.contexts[''];
345
- Object.assign(loc, ctx);
346
- }
347
- /**
348
- * Activates a locale. Throws an error if the locale has not been previously added.
349
- * After setting the locale to be used, all strings marked for translations
350
- * will be represented by the corresponding translation in the specified locale.
351
- * @param locale Locale name (i.e: `'he'`, `'fr'`)
352
- */
353
- static useLocale(locale) {
354
- const locale0 = checkLocale(locale);
355
- const obj = getExistingLocale(locale0);
356
- activeName = alias[locale0] || locale0;
357
- activeLocale = obj;
358
- return activeLocale;
359
- }
360
- /**
361
- * Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
362
- */
363
- static getLocaleName() {
364
- return activeName;
365
- }
366
- /**
367
- * Returns the names of registered locales
368
- */
369
- static getLocaleNames() {
370
- const keys = Array.from(locales.keys());
371
- return keys.sort((a, b) => a.localeCompare(b));
372
- }
373
- /**
374
- * Renders a number in ordinal, such as 1st, 2nd or 3rd
375
- * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
376
- */
377
- static ordinal(n, locale) {
378
- const locale1 = locale === null || locale === void 0 ? void 0 : locale.toLowerCase();
379
- const locale0 = locale1 || activeName;
380
- if (!locale0) {
381
- return getEnOrdinal(n);
382
- }
383
- switch (locale0) {
384
- case 'en':
385
- case 's':
386
- case 'a':
387
- return getEnOrdinal(n);
388
- case 'es':
389
- return n + 'º';
390
- case 'h':
391
- case 'he':
392
- case 'he-x-nonikud':
393
- return String(n);
394
- }
395
- if (locale0.startsWith('ashkenazi')) {
396
- return getEnOrdinal(n);
397
- }
398
- return n + '.';
399
- }
400
- /**
401
- * Removes nekudot from Hebrew string
402
- */
403
- static hebrewStripNikkud(str) {
404
- return str.replace(/[\u0590-\u05bd]/g, '').replace(/[\u05bf-\u05c7]/g, '');
405
- }
406
- }
407
- Locale.addLocale('en', noopLocale);
408
- Locale.addLocale('s', noopLocale);
409
- Locale.addLocale('', noopLocale);
410
- Locale.useLocale('en');
411
- /* Ashkenazic transliterations */
412
- Locale.addLocale('ashkenazi', poAshkenazi);
413
- Locale.addLocale('a', poAshkenazi);
414
- /* Hebrew with nikkud */
415
- Locale.addLocale('he', poHe);
416
- Locale.addLocale('h', poHe);
417
- /* Hebrew without nikkud */
418
- const heStrs = poHe.contexts[''];
419
- const heNoNikud = {};
420
- for (const [key, val] of Object.entries(heStrs)) {
421
- heNoNikud[key] = [Locale.hebrewStripNikkud(val[0])];
422
- }
423
- const poHeNoNikud = {
424
- headers: poHe.headers,
425
- contexts: { '': heNoNikud },
426
- };
427
- Locale.addLocale('he-x-NoNikud', poHeNoNikud);
428
-
429
- var countryNames0 = {
430
- "AD": "Andorra",
431
- "AE": "United Arab Emirates",
432
- "AF": "Afghanistan",
433
- "AI": "Anguilla",
434
- "AL": "Albania",
435
- "AM": "Armenia",
436
- "AO": "Angola",
437
- "AR": "Argentina",
438
- "AS": "American Samoa",
439
- "AT": "Austria",
440
- "AU": "Australia",
441
- "AW": "Aruba",
442
- "AZ": "Azerbaijan",
443
- "BA": "Bosnia and Herzegovina",
444
- "BB": "Barbados",
445
- "BD": "Bangladesh",
446
- "BE": "Belgium",
447
- "BF": "Burkina Faso",
448
- "BG": "Bulgaria",
449
- "BH": "Bahrain",
450
- "BI": "Burundi",
451
- "BJ": "Benin",
452
- "BM": "Bermuda",
453
- "BN": "Brunei",
454
- "BO": "Bolivia",
455
- "BR": "Brazil",
456
- "BS": "Bahamas",
457
- "BT": "Bhutan",
458
- "BW": "Botswana",
459
- "BY": "Belarus",
460
- "BZ": "Belize",
461
- "CA": "Canada",
462
- "CD": "Democratic Republic of the Congo",
463
- "CF": "Central African Republic",
464
- "CG": "Republic of the Congo",
465
- "CH": "Switzerland",
466
- "CI": "Ivory Coast",
467
- "CK": "Cook Islands",
468
- "CL": "Chile",
469
- "CM": "Cameroon",
470
- "CN": "China",
471
- "CO": "Colombia",
472
- "CR": "Costa Rica",
473
- "CU": "Cuba",
474
- "CV": "Cape Verde",
475
- "CW": "Curacao",
476
- "CY": "Cyprus",
477
- "CZ": "Czech Republic",
478
- "DE": "Germany",
479
- "DK": "Denmark",
480
- "DM": "Dominica",
481
- "DO": "Dominican Republic",
482
- "DZ": "Algeria",
483
- "EC": "Ecuador",
484
- "EE": "Estonia",
485
- "EG": "Egypt",
486
- "ER": "Eritrea",
487
- "ES": "Spain",
488
- "ET": "Ethiopia",
489
- "FI": "Finland",
490
- "FJ": "Fiji",
491
- "FK": "Falkland Islands",
492
- "FO": "Faroe Islands",
493
- "FR": "France",
494
- "GA": "Gabon",
495
- "GB": "United Kingdom",
496
- "GE": "Georgia",
497
- "GH": "Ghana",
498
- "GI": "Gibraltar",
499
- "GL": "Greenland",
500
- "GM": "Gambia",
501
- "GN": "Guinea",
502
- "GQ": "Equatorial Guinea",
503
- "GR": "Greece",
504
- "GT": "Guatemala",
505
- "GW": "Guinea-Bissau",
506
- "GY": "Guyana",
507
- "HK": "Hong Kong",
508
- "HN": "Honduras",
509
- "HR": "Croatia",
510
- "HT": "Haiti",
511
- "HU": "Hungary",
512
- "ID": "Indonesia",
513
- "IE": "Ireland",
514
- "IL": "Israel",
515
- "IM": "Isle of Man",
516
- "IN": "India",
517
- "IQ": "Iraq",
518
- "IR": "Iran",
519
- "IS": "Iceland",
520
- "IT": "Italy",
521
- "JM": "Jamaica",
522
- "JO": "Jordan",
523
- "JP": "Japan",
524
- "KE": "Kenya",
525
- "KG": "Kyrgyzstan",
526
- "KH": "Cambodia",
527
- "KM": "Comoros",
528
- "KN": "Saint Kitts and Nevis",
529
- "KP": "North Korea",
530
- "KR": "South Korea",
531
- "KW": "Kuwait",
532
- "KY": "Cayman Islands",
533
- "KZ": "Kazakhstan",
534
- "LA": "Laos",
535
- "LB": "Lebanon",
536
- "LC": "Saint Lucia",
537
- "LI": "Liechtenstein",
538
- "LR": "Liberia",
539
- "LS": "Lesotho",
540
- "LT": "Lithuania",
541
- "LU": "Luxembourg",
542
- "LV": "Latvia",
543
- "LY": "Libya",
544
- "MA": "Morocco",
545
- "MD": "Moldova",
546
- "ME": "Montenegro",
547
- "MG": "Madagascar",
548
- "MK": "Macedonia",
549
- "ML": "Mali",
550
- "MM": "Myanmar",
551
- "MN": "Mongolia",
552
- "MP": "Northern Mariana Islands",
553
- "MR": "Mauritania",
554
- "MS": "Montserrat",
555
- "MT": "Malta",
556
- "MU": "Mauritius",
557
- "MW": "Malawi",
558
- "MX": "Mexico",
559
- "MY": "Malaysia",
560
- "MZ": "Mozambique",
561
- "NA": "Namibia",
562
- "NC": "New Caledonia",
563
- "NE": "Niger",
564
- "NG": "Nigeria",
565
- "NI": "Nicaragua",
566
- "NL": "Netherlands",
567
- "NO": "Norway",
568
- "NP": "Nepal",
569
- "NU": "Niue",
570
- "NZ": "New Zealand",
571
- "OM": "Oman",
572
- "PA": "Panama",
573
- "PE": "Peru",
574
- "PF": "French Polynesia",
575
- "PG": "Papua New Guinea",
576
- "PH": "Philippines",
577
- "PK": "Pakistan",
578
- "PL": "Poland",
579
- "PR": "Puerto Rico",
580
- "PT": "Portugal",
581
- "PY": "Paraguay",
582
- "QA": "Qatar",
583
- "RO": "Romania",
584
- "RS": "Serbia",
585
- "RU": "Russia",
586
- "RW": "Rwanda",
587
- "SA": "Saudi Arabia",
588
- "SB": "Solomon Islands",
589
- "SC": "Seychelles",
590
- "SD": "Sudan",
591
- "SE": "Sweden",
592
- "SG": "Singapore",
593
- "SH": "Saint Helena",
594
- "SI": "Slovenia",
595
- "SK": "Slovakia",
596
- "SL": "Sierra Leone",
597
- "SN": "Senegal",
598
- "SO": "Somalia",
599
- "SR": "Suriname",
600
- "ST": "Sao Tome and Principe",
601
- "SV": "El Salvador",
602
- "SY": "Syria",
603
- "SZ": "Swaziland",
604
- "TC": "Turks and Caicos Islands",
605
- "TD": "Chad",
606
- "TG": "Togo",
607
- "TH": "Thailand",
608
- "TJ": "Tajikistan",
609
- "TM": "Turkmenistan",
610
- "TN": "Tunisia",
611
- "TR": "Turkey",
612
- "TV": "Tuvalu",
613
- "TW": "Taiwan",
614
- "TZ": "Tanzania",
615
- "UA": "Ukraine",
616
- "UG": "Uganda",
617
- "US": "United States",
618
- "UY": "Uruguay",
619
- "UZ": "Uzbekistan",
620
- "VC": "Saint Vincent and the Grenadines",
621
- "VE": "Venezuela",
622
- "VG": "British Virgin Islands",
623
- "VN": "Vietnam",
624
- "WS": "Samoa",
625
- "YE": "Yemen",
626
- "YT": "Mayotte",
627
- "ZA": "South Africa",
628
- "ZM": "Zambia",
629
- "ZW": "Zimbabwe"
630
- };
631
-
632
- var holidayDescription0 = {
633
- "Asara B'Tevet": "Fast commemorating the siege of Jerusalem",
634
- "Ben-Gurion Day": "Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion",
635
- "Birkat Hachamah": "A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun",
636
- "Chag HaBanot": "North African Chanukah festival of daughters. Called Eid al-Banat in Arabic, the holiday was most preserved in Tunisia",
637
- "Chanukah": "Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights, the eight-day festival is observed by lighting the candles of a hanukkiah (menorah)",
638
- "Days of the Omer": "7 weeks from the second night of Pesach to the day before Shavuot. Also called Sefirat HaOmer, it is a practice that consists of a verbal counting of each of the forty-nine days between the two holidays",
639
- "Family Day": "Yom HaMishpacha, a day to honor the family unit",
640
- "Hebrew Language Day": "Promotes the Hebrew language in Israel and around the world. Occurs on the birthday of Eliezer Ben Yehuda, the father of modern spoken Hebrew",
641
- "Herzl Day": "Commemorates the life and vision of Zionist leader Theodor Herzl",
642
- "Jabotinsky Day": "Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky",
643
- "Lag BaOmer": "33rd day of counting the Omer. The holiday is a temporary break from the semi-mourning period the counting of the Omer. Practices include lighting bonfires, getting haircuts, and Jewish weddings",
644
- "Leil Selichot": "Prayers for forgiveness in preparation for the High Holidays",
645
- "Pesach Sheni": "Second Passover, one month after Passover",
646
- "Pesach": "Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt",
647
- "Purim Katan": "Minor Purim celebration during Adar I on leap years",
648
- "Purim": "Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination",
649
- "Purim Meshulash": "Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat",
650
- "Rosh Chodesh Nisan": "Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
651
- "Rosh Chodesh Iyyar": "Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
652
- "Rosh Chodesh Sivan": "Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
653
- "Rosh Chodesh Tamuz": "Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
654
- "Rosh Chodesh Av": "Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
655
- "Rosh Chodesh Elul": "Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
656
- "Rosh Chodesh Cheshvan": "Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
657
- "Rosh Chodesh Kislev": "Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
658
- "Rosh Chodesh Tevet": "Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
659
- "Rosh Chodesh Sh'vat": "Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
660
- "Rosh Chodesh Adar": "Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
661
- "Rosh Chodesh Adar I": "Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
662
- "Rosh Chodesh Adar II": "Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes \"Adar Bet\" or \"Adar Sheni\", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
663
- "Rosh Hashana": "The Jewish New Year. Also spelled Rosh Hashanah",
664
- "Rosh Hashana LaBehemot": "New Year for Tithing Animals",
665
- "Shabbat Chazon": "Shabbat of Prophecy/Shabbat of Vision. Shabbat before Tish'a B'Av",
666
- "Shabbat HaChodesh": "Shabbat before Rosh Chodesh Nissan. Read in preparation for Passover",
667
- "Shabbat HaGadol": "Shabbat before Pesach (The Great Shabbat)",
668
- "Shabbat Machar Chodesh": "When Shabbat falls the day before Rosh Chodesh",
669
- "Shabbat Mevarchim Chodesh": "Shabbat that precedes Rosh Chodesh. The congregation blesses the forthcoming new month",
670
- "Shabbat Nachamu": "Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")",
671
- "Shabbat Parah": "Shabbat of the Red Heifer. Shabbat before Shabbat HaChodesh, in preparation for Passover",
672
- "Shabbat Rosh Chodesh": "When Shabbat falls on Rosh Chodesh",
673
- "Shabbat Shekalim": "Shabbat before Rosh Chodesh Adar. Read in preparation for Purim",
674
- "Shabbat Shirah": "Shabbat of Song. Shabbat that includes Parashat Beshalach",
675
- "Shabbat Shuva": "Shabbat of Returning. Shabbat that occurs during the Ten Days of Repentance between Rosh Hashanah and Yom Kippur",
676
- "Shabbat Zachor": "Shabbat of Remembrance. Shabbat before Purim",
677
- "Shavuot": "Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai",
678
- "Shmini Atzeret": "Eighth Day of Assembly. Immediately following Sukkot, it is observed as a separate holiday in the Diaspora and is combined with Simchat Torah in Israel",
679
- "Shushan Purim": "Purim celebrated in Jerusalem and walled cities",
680
- "Shushan Purim Katan": "Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",
681
- "Sigd": "Ethiopian Jewish holiday occurring 50 days after Yom Kippur",
682
- "Simchat Torah": "Day of Celebrating the Torah. Celebration marking the conclusion of the annual cycle of public Torah readings, and the beginning of a new cycle",
683
- "Sukkot": "Feast of Booths. Also called the Feast of Tabernacles, the seven-day holiday is one of the Three Pilgrimage Festivals (Hebrew: שלוש רגלים, shalosh regalim)",
684
- "Ta'anit Bechorot": "Fast of the First Born",
685
- "Ta'anit Esther": "Fast of Esther",
686
- "Tish'a B'Av": "The Ninth of Av. Fast commemorating the destruction of the two Temples",
687
- "Tu B'Av": "Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av",
688
- "Tu BiShvat": "New Year for Trees. Tu BiShvat is one of four “New Years” mentioned in the Mishnah",
689
- "Tzom Gedaliah": "Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah",
690
- "Tzom Tammuz": "Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple",
691
- "Yitzhak Rabin Memorial Day": "Commemorates the life of Israeli Prime Minister Yitzhak Rabin",
692
- "Yom HaAliyah": "Recognizes Aliyah, immigration to the Jewish State of Israel",
693
- "Yom HaAliyah School Observance": "Aliyah Day observed in Israeli schools",
694
- "Yom HaAtzma'ut": "Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat",
695
- "Yom HaShoah": "Holocaust Memorial Day",
696
- "Yom HaZikaron": "Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat",
697
- "Yom Kippur": "Day of Atonement. The holiest day of the year in Judaism, traditionally observed with a 25-hour period of fasting and intensive prayer",
698
- "Yom Kippur Katan": "Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh",
699
- "Yom Yerushalayim": "Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"
700
- };
16
+ const Chanukah="Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights, the eight-day festival is observed by lighting the candles of a hanukkiah (menorah)";const Pesach="Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt";const Purim="Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination";const Shavuot="Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai";const Sigd="Ethiopian Jewish holiday occurring 50 days after Yom Kippur";const Sukkot="Feast of Booths. Also called the Feast of Tabernacles, the seven-day holiday is one of the Three Pilgrimage Festivals (Hebrew: שלוש רגלים, shalosh regalim)";var holidayDescription0 = {"Asara B'Tevet":"Fast commemorating the siege of Jerusalem","Ben-Gurion Day":"Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion","Birkat Hachamah":"A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun","Chag HaBanot":"North African Chanukah festival of daughters. Called Eid al-Banat in Arabic, the holiday was most preserved in Tunisia",Chanukah:Chanukah,"Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot. Also called Sefirat HaOmer, it is a practice that consists of a verbal counting of each of the forty-nine days between the two holidays","Family Day":"Yom HaMishpacha, a day to honor the family unit","Hebrew Language Day":"Promotes the Hebrew language in Israel and around the world. Occurs on the birthday of Eliezer Ben Yehuda, the father of modern spoken Hebrew","Herzl Day":"Commemorates the life and vision of Zionist leader Theodor Herzl","Jabotinsky Day":"Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky","Lag BaOmer":"33rd day of counting the Omer. The holiday is a temporary break from the semi-mourning period the counting of the Omer. Practices include lighting bonfires, getting haircuts, and Jewish weddings","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:Pesach,"Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:Purim,"Purim Meshulash":"Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat","Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":"Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes \"Adar Bet\" or \"Adar Sheni\", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat of Prophecy/Shabbat of Vision. Shabbat before Tish'a B'Av","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan. Read in preparation for Passover","Shabbat HaGadol":"Shabbat before Pesach (The Great Shabbat)","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Mevarchim Chodesh":"Shabbat that precedes Rosh Chodesh. The congregation blesses the forthcoming new month","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer. Shabbat before Shabbat HaChodesh, in preparation for Passover","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar. Read in preparation for Purim","Shabbat Shirah":"Shabbat of Song. Shabbat that includes Parashat Beshalach","Shabbat Shuva":"Shabbat of Returning. Shabbat that occurs during the Ten Days of Repentance between Rosh Hashanah and Yom Kippur","Shabbat Zachor":"Shabbat of Remembrance. Shabbat before Purim",Shavuot:Shavuot,"Shmini Atzeret":"Eighth Day of Assembly. Immediately following Sukkot, it is observed as a separate holiday in the Diaspora and is combined with Simchat Torah in Israel","Shushan Purim":"Purim celebrated in Jerusalem and walled cities","Shushan Purim Katan":"Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",Sigd:Sigd,"Simchat Torah":"Day of Celebrating the Torah. Celebration marking the conclusion of the annual cycle of public Torah readings, and the beginning of a new cycle",Sukkot:Sukkot,"Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees. Tu BiShvat is one of four “New Years” mentioned in the Mishnah","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yitzhak Rabin Memorial Day":"Commemorates the life of Israeli Prime Minister Yitzhak Rabin","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement. The holiest day of the year in Judaism, traditionally observed with a 25-hour period of fasting and intensive prayer","Yom Kippur Katan":"Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};
701
17
 
702
18
  /**
703
19
  * Helper function to transform a string to make it more usable in a URL or filename.
@@ -1122,7 +438,7 @@ function eventToCsv(ev, options) {
1122
438
  ? ev.renderBrief(options.locale)
1123
439
  : ev.render(options.locale);
1124
440
  if (timed) {
1125
- const timeStr = HebrewCalendar.reformatTimeStr(timedEv.eventTimeStr, ' PM', options);
441
+ const timeStr = reformatTimeStr(timedEv.eventTimeStr, ' PM', options);
1126
442
  endTime = startTime = `"${timeStr}"`;
1127
443
  endDate = date;
1128
444
  allDay = '"false"';
@@ -1171,6 +487,11 @@ function eventIsoDate(ev) {
1171
487
  * Formats a list events for the classic Hebcal.com JSON API response
1172
488
  */
1173
489
  function eventsToClassicApi(events, options, leyning = true) {
490
+ const result = eventsToClassicApiHeader(events, options);
491
+ result.items = events.map(ev => eventToClassicApiObject(ev, options, leyning));
492
+ return result;
493
+ }
494
+ function eventsToClassicApiHeader(events, options) {
1174
495
  const result = {
1175
496
  title: getCalendarTitle(events, options),
1176
497
  date: new Date().toISOString(),
@@ -1183,7 +504,6 @@ function eventsToClassicApi(events, options, leyning = true) {
1183
504
  end: eventIsoDate(events[events.length - 1]),
1184
505
  };
1185
506
  }
1186
- result.items = events.map(ev => eventToClassicApiObject(ev, options, leyning));
1187
507
  return result;
1188
508
  }
1189
509
  /**
@@ -1207,7 +527,7 @@ function eventToClassicApiObject(ev, options, leyning = true) {
1207
527
  const desc = ev.getDesc();
1208
528
  const candles = desc === 'Havdalah' || desc === 'Candle lighting';
1209
529
  if (candles) {
1210
- const time = HebrewCalendar.reformatTimeStr(timedEv.eventTimeStr, 'pm', options);
530
+ const time = reformatTimeStr(timedEv.eventTimeStr, 'pm', options);
1211
531
  title += ': ' + time;
1212
532
  }
1213
533
  const result = {
@@ -1229,7 +549,7 @@ function eventToClassicApiObject(ev, options, leyning = true) {
1229
549
  }
1230
550
  const hebrew = ev.renderBrief('he');
1231
551
  if (hebrew) {
1232
- result.hebrew = Locale$1.hebrewStripNikkud(hebrew);
552
+ result.hebrew = Locale.hebrewStripNikkud(hebrew);
1233
553
  }
1234
554
  if (!candles) {
1235
555
  if (leyning) {
@@ -1240,13 +560,6 @@ function eventToClassicApiObject(ev, options, leyning = true) {
1240
560
  : getLeyningForHoliday(ev, il);
1241
561
  if (reading) {
1242
562
  result.leyning = formatLeyningResult(reading);
1243
- const hyear = hd.getFullYear();
1244
- if (isParsha && hyear >= 5745) {
1245
- const triReading = getTriennialForParshaHaShavua(ev, il);
1246
- if (triReading === null || triReading === void 0 ? void 0 : triReading.aliyot) {
1247
- result.leyning.triennial = formatAliyot({}, triReading.aliyot);
1248
- }
1249
- }
1250
563
  }
1251
564
  }
1252
565
  const url = ev.url();
@@ -1291,7 +604,7 @@ function eventToClassicApiObject(ev, options, leyning = true) {
1291
604
  const dd = hd.getDate();
1292
605
  result.heDateParts = {
1293
606
  y: gematriya(yy),
1294
- m: Locale$1.gettext(mm, 'he-x-NoNikud'),
607
+ m: Locale.gettext(mm, 'he-x-NoNikud'),
1295
608
  d: gematriya(dd),
1296
609
  };
1297
610
  }
@@ -1448,8 +761,8 @@ function eventToRssItem2(ev, options) {
1448
761
  if (candles) {
1449
762
  const colon = subj.indexOf(': ');
1450
763
  if (colon !== -1) {
1451
- const options = { location, il, locale: Locale$1.getLocaleName() };
1452
- const time = HebrewCalendar.reformatTimeStr(ev.eventTimeStr, 'pm', options);
764
+ const options = { location, il, locale: Locale.getLocaleName() };
765
+ const time = reformatTimeStr(ev.eventTimeStr, 'pm', options);
1453
766
  subj = subj.substring(0, colon) + ': ' + time;
1454
767
  }
1455
768
  }
@@ -1497,7 +810,7 @@ function eventToFullCalendar(ev, tzid, il) {
1497
810
  };
1498
811
  const hebrew = ev.renderBrief('he');
1499
812
  if (hebrew) {
1500
- result.hebrew = Locale$1.hebrewStripNikkud(hebrew);
813
+ result.hebrew = Locale.hebrewStripNikkud(hebrew);
1501
814
  }
1502
815
  const url = ev.url();
1503
816
  if (url) {
@@ -1517,4 +830,4 @@ function eventToFullCalendar(ev, tzid, il) {
1517
830
  return result;
1518
831
  }
1519
832
 
1520
- export { appendIsraelAndTracking, countryNames, eventToClassicApiObject, eventToCsv, eventToFullCalendar, eventToRssItem2, eventsToClassicApi, eventsToCsv, eventsToRss2, getCalendarTitle, getDownloadFilename, getEventCategories, getHolidayDescription, holidayDescription, locationToPlainObj, makeAnchor, makeMemo, makeTorahMemoText, pad2, pad4, renderTitleWithoutTime, shouldRenderBrief, toISOString };
833
+ export { appendIsraelAndTracking, countryNames, eventToClassicApiObject, eventToCsv, eventToFullCalendar, eventToRssItem2, eventsToClassicApi, eventsToClassicApiHeader, eventsToCsv, eventsToRss2, getCalendarTitle, getDownloadFilename, getEventCategories, getHolidayDescription, holidayDescription, locationToPlainObj, makeAnchor, makeMemo, makeTorahMemoText, renderTitleWithoutTime, shouldRenderBrief, toISOString };