@hebcal/core 5.7.2 → 5.7.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.
Files changed (103) hide show
  1. package/dist/bundle.js +2 -2
  2. package/dist/bundle.js.map +1 -1
  3. package/dist/bundle.min.js +2 -2
  4. package/dist/bundle.min.js.map +1 -1
  5. package/dist/{es → esm}/DailyLearning.js +1 -1
  6. package/dist/{es → esm}/HebrewDateEvent.js +1 -1
  7. package/dist/{es → esm}/HolidayEvent.js +1 -1
  8. package/dist/{es → esm}/MevarchimChodeshEvent.js +1 -1
  9. package/dist/{es → esm}/ParshaEvent.js +1 -1
  10. package/dist/{es → esm}/TimedEvent.js +1 -1
  11. package/dist/{es → esm}/YomKippurKatanEvent.js +1 -1
  12. package/dist/{es → esm}/ashkenazi.po.js +1 -1
  13. package/dist/{es → esm}/calendar.js +2 -1
  14. package/dist/esm/calendar.js.map +1 -0
  15. package/dist/{es → esm}/candles.js +1 -1
  16. package/dist/{es → esm}/event.js +1 -1
  17. package/dist/{es → esm}/getStartAndEnd.js +1 -1
  18. package/dist/{es → esm}/hallel.js +1 -1
  19. package/dist/{es → esm}/he.po.js +1 -1
  20. package/dist/{es → esm}/hebcal.js +1 -1
  21. package/dist/{es → esm}/holidays.js +1 -1
  22. package/dist/{es → esm}/index.js +1 -1
  23. package/dist/esm/locale.d.ts +2 -0
  24. package/dist/{es → esm}/locale.js +2 -1
  25. package/dist/esm/locale.js.map +1 -0
  26. package/dist/{es → esm}/location.js +1 -1
  27. package/dist/{es → esm}/modern.js +1 -1
  28. package/dist/{es → esm}/molad.js +1 -1
  29. package/dist/{es → esm}/omer.js +1 -1
  30. package/dist/{es → esm}/parshaName.d.ts +0 -1
  31. package/dist/{es → esm}/parshaName.js +2 -2
  32. package/dist/esm/parshaName.js.map +1 -0
  33. package/dist/{es → esm}/pkgVersion.d.ts +1 -1
  34. package/dist/{es → esm}/pkgVersion.js +2 -2
  35. package/dist/{es → esm}/pkgVersion.js.map +1 -1
  36. package/dist/{es → esm}/reformatTimeStr.js +1 -1
  37. package/dist/{es → esm}/sedra.js +1 -1
  38. package/dist/{es → esm}/staticHolidays.js +1 -1
  39. package/dist/{es → esm}/tachanun.js +1 -1
  40. package/dist/{es → esm}/zmanim.js +1 -1
  41. package/dist/index.cjs +2 -2
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/locale.d.ts +2 -1
  44. package/dist/parshaName.d.ts +0 -1
  45. package/dist/pkgVersion.d.ts +1 -1
  46. package/package.json +6 -7
  47. package/dist/es/calendar.js.map +0 -1
  48. package/dist/es/locale.d.ts +0 -1
  49. package/dist/es/locale.js.map +0 -1
  50. package/dist/es/parshaName.js.map +0 -1
  51. package/dist/module.d.ts +0 -1618
  52. /package/dist/{es → esm}/CalOptions.d.ts +0 -0
  53. /package/dist/{es → esm}/DailyLearning.d.ts +0 -0
  54. /package/dist/{es → esm}/DailyLearning.js.map +0 -0
  55. /package/dist/{es → esm}/HebrewDateEvent.d.ts +0 -0
  56. /package/dist/{es → esm}/HebrewDateEvent.js.map +0 -0
  57. /package/dist/{es → esm}/HolidayEvent.d.ts +0 -0
  58. /package/dist/{es → esm}/HolidayEvent.js.map +0 -0
  59. /package/dist/{es → esm}/MevarchimChodeshEvent.d.ts +0 -0
  60. /package/dist/{es → esm}/MevarchimChodeshEvent.js.map +0 -0
  61. /package/dist/{es → esm}/ParshaEvent.d.ts +0 -0
  62. /package/dist/{es → esm}/ParshaEvent.js.map +0 -0
  63. /package/dist/{es → esm}/TimedEvent.d.ts +0 -0
  64. /package/dist/{es → esm}/TimedEvent.js.map +0 -0
  65. /package/dist/{es → esm}/YomKippurKatanEvent.d.ts +0 -0
  66. /package/dist/{es → esm}/YomKippurKatanEvent.js.map +0 -0
  67. /package/dist/{es → esm}/ashkenazi.po.d.ts +0 -0
  68. /package/dist/{es → esm}/ashkenazi.po.js.map +0 -0
  69. /package/dist/{es → esm}/calendar.d.ts +0 -0
  70. /package/dist/{es → esm}/candles.d.ts +0 -0
  71. /package/dist/{es → esm}/candles.js.map +0 -0
  72. /package/dist/{es → esm}/event.d.ts +0 -0
  73. /package/dist/{es → esm}/event.js.map +0 -0
  74. /package/dist/{es → esm}/getStartAndEnd.d.ts +0 -0
  75. /package/dist/{es → esm}/getStartAndEnd.js.map +0 -0
  76. /package/dist/{es → esm}/hallel.d.ts +0 -0
  77. /package/dist/{es → esm}/hallel.js.map +0 -0
  78. /package/dist/{es → esm}/he.po.d.ts +0 -0
  79. /package/dist/{es → esm}/he.po.js.map +0 -0
  80. /package/dist/{es → esm}/hebcal.d.ts +0 -0
  81. /package/dist/{es → esm}/hebcal.js.map +0 -0
  82. /package/dist/{es → esm}/holidays.d.ts +0 -0
  83. /package/dist/{es → esm}/holidays.js.map +0 -0
  84. /package/dist/{es → esm}/index.d.ts +0 -0
  85. /package/dist/{es → esm}/index.js.map +0 -0
  86. /package/dist/{es → esm}/location.d.ts +0 -0
  87. /package/dist/{es → esm}/location.js.map +0 -0
  88. /package/dist/{es → esm}/modern.d.ts +0 -0
  89. /package/dist/{es → esm}/modern.js.map +0 -0
  90. /package/dist/{es → esm}/molad.d.ts +0 -0
  91. /package/dist/{es → esm}/molad.js.map +0 -0
  92. /package/dist/{es → esm}/omer.d.ts +0 -0
  93. /package/dist/{es → esm}/omer.js.map +0 -0
  94. /package/dist/{es → esm}/reformatTimeStr.d.ts +0 -0
  95. /package/dist/{es → esm}/reformatTimeStr.js.map +0 -0
  96. /package/dist/{es → esm}/sedra.d.ts +0 -0
  97. /package/dist/{es → esm}/sedra.js.map +0 -0
  98. /package/dist/{es → esm}/staticHolidays.d.ts +0 -0
  99. /package/dist/{es → esm}/staticHolidays.js.map +0 -0
  100. /package/dist/{es → esm}/tachanun.d.ts +0 -0
  101. /package/dist/{es → esm}/tachanun.js.map +0 -0
  102. /package/dist/{es → esm}/zmanim.d.ts +0 -0
  103. /package/dist/{es → esm}/zmanim.js.map +0 -0
package/dist/module.d.ts DELETED
@@ -1,1618 +0,0 @@
1
- import { HDate } from '@hebcal/hdate';
2
- export { HDate, Headers, Locale, LocaleData, StringArrayMap, gematriya, gematriyaStrToNum, greg, months } from '@hebcal/hdate';
3
- import { GeoLocation } from '@hebcal/noaa';
4
- export { GeoLocation, NOAACalculator } from '@hebcal/noaa';
5
-
6
- /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
7
- declare const version = "5.7.2";
8
-
9
- /** Class representing Location */
10
- declare class Location extends GeoLocation {
11
- private readonly il;
12
- private readonly cc?;
13
- private readonly geoid?;
14
- /**
15
- * Initialize a Location instance
16
- * @param latitude - Latitude as a decimal, valid range -90 thru +90 (e.g. 41.85003)
17
- * @param longitude - Longitude as a decimal, valid range -180 thru +180 (e.g. -87.65005)
18
- * @param il - in Israel (true) or Diaspora (false)
19
- * @param tzid - Olson timezone ID, e.g. "America/Chicago"
20
- * @param [cityName] - optional descriptive city name
21
- * @param [countryCode] - ISO 3166 alpha-2 country code (e.g. "FR")
22
- * @param [geoid] - optional string or numeric geographic ID
23
- * @param [elevation] - in meters (default `0`)
24
- */
25
- constructor(latitude: number, longitude: number, il: boolean, tzid: string, cityName?: string, countryCode?: string, geoid?: string | number, elevation?: number);
26
- getIsrael(): boolean;
27
- getName(): string | null;
28
- /**
29
- * Returns the location name, up to the first comma
30
- */
31
- getShortName(): string | null;
32
- getCountryCode(): string | undefined;
33
- getTzid(): string;
34
- /**
35
- * Gets a 24-hour time formatter (e.g. 07:41 or 20:03) for this location
36
- */
37
- getTimeFormatter(): Intl.DateTimeFormat;
38
- getGeoId(): string | number | undefined;
39
- /**
40
- * Creates a location object from one of 60 "classic" Hebcal city names.
41
- * The following city names are supported:
42
- * 'Ashdod', 'Atlanta', 'Austin', 'Baghdad', 'Beer Sheva',
43
- * 'Berlin', 'Baltimore', 'Bogota', 'Boston', 'Budapest',
44
- * 'Buenos Aires', 'Buffalo', 'Chicago', 'Cincinnati', 'Cleveland',
45
- * 'Dallas', 'Denver', 'Detroit', 'Eilat', 'Gibraltar', 'Haifa',
46
- * 'Hawaii', 'Helsinki', 'Houston', 'Jerusalem', 'Johannesburg',
47
- * 'Kiev', 'La Paz', 'Livingston', 'Las Vegas', 'London', 'Los Angeles',
48
- * 'Marseilles', 'Miami', 'Minneapolis', 'Melbourne', 'Mexico City',
49
- * 'Montreal', 'Moscow', 'New York', 'Omaha', 'Ottawa', 'Panama City',
50
- * 'Paris', 'Pawtucket', 'Petach Tikvah', 'Philadelphia', 'Phoenix',
51
- * 'Pittsburgh', 'Providence', 'Portland', 'Saint Louis', 'Saint Petersburg',
52
- * 'San Diego', 'San Francisco', 'Sao Paulo', 'Seattle', 'Sydney',
53
- * 'Tel Aviv', 'Tiberias', 'Toronto', 'Vancouver', 'White Plains',
54
- * 'Washington DC', 'Worcester'
55
- * @param name
56
- */
57
- static lookup(name: string): Location | undefined;
58
- toString(): string;
59
- /**
60
- * Converts legacy Hebcal timezone to a standard Olson tzid.
61
- * @param tz integer, GMT offset in hours
62
- * @param dst 'none', 'eu', 'usa', or 'israel'
63
- */
64
- static legacyTzToTzid(tz: number, dst: string): string | undefined;
65
- /**
66
- * Converts timezone info from Zip-Codes.com to a standard Olson tzid.
67
- * @example
68
- * Location.getUsaTzid('AZ', 7, 'Y') // 'America/Denver'
69
- * @param state two-letter all-caps US state abbreviation like 'CA'
70
- * @param tz positive number, 5=America/New_York, 8=America/Los_Angeles
71
- * @param dst single char 'Y' or 'N'
72
- */
73
- static getUsaTzid(state: string, tz: number, dst: string): string;
74
- /**
75
- * Adds a location name for `Location.lookup()` only if the name isn't
76
- * already being used. Returns `false` if the name is already taken
77
- * and `true` if successfully added.
78
- */
79
- static addLocation(cityName: string, location: Location): boolean;
80
- }
81
-
82
- type DailyLearningValue = boolean | number | string;
83
- /**
84
- * Options to configure which events are returned
85
- */
86
- type CalOptions = {
87
- /**
88
- * latitude/longitude/tzid used for candle-lighting
89
- */
90
- location?: Location;
91
- /**
92
- * Gregorian or Hebrew year
93
- */
94
- year?: number;
95
- /**
96
- * to interpret year as Hebrew year
97
- */
98
- isHebrewYear?: boolean;
99
- /**
100
- * Gregorian or Hebrew month (to filter results to a single month)
101
- */
102
- month?: number | string;
103
- /**
104
- * generate calendar for multiple years (default 1)
105
- */
106
- numYears?: number;
107
- /**
108
- * use specific start date (requires end date)
109
- */
110
- start?: number | HDate | Date;
111
- /**
112
- * use specific end date (requires start date)
113
- */
114
- end?: number | HDate | Date;
115
- /**
116
- * calculate candle-lighting and havdalah times
117
- */
118
- candlelighting?: boolean;
119
- /**
120
- * minutes before sundown to light candles (default 18)
121
- */
122
- candleLightingMins?: number;
123
- /**
124
- * minutes after sundown for Havdalah (typical values are 42, 50, or 72).
125
- * If `undefined` (the default), calculate Havdalah according to Tzeit Hakochavim -
126
- * Nightfall (the point when 3 small stars are observable in the night time sky with
127
- * the naked eye). If `0`, Havdalah times are suppressed.
128
- */
129
- havdalahMins?: number;
130
- /**
131
- * degrees for solar depression for Havdalah.
132
- * Default is 8.5 degrees for 3 small stars. use 7.083 degrees for 3 medium-sized stars
133
- * (observed by Dr. Baruch (Berthold) Cohn in his luach published in France in 1899).
134
- * If `0`, Havdalah times are suppressed.
135
- */
136
- havdalahDeg?: number;
137
- /**
138
- * degrees for solar depression for end of fast days.
139
- * Default is 7.083 degrees for 3 medium-sized stars. Other commonly-used values include
140
- * 6.45 degrees, as calculated by Rabbi Yechiel Michel Tucazinsky.
141
- */
142
- fastEndDeg?: number;
143
- /**
144
- * use elevation for calculations (default `false`).
145
- * If `true`, use elevation to affect the calculation of all sunrise/sunset based zmanim.
146
- * Note: there are some zmanim such as degree-based zmanim that are driven by the amount
147
- * of light in the sky and are not impacted by elevation.
148
- * These zmanim intentionally do not support elevation adjustment.
149
- */
150
- useElevation?: boolean;
151
- /**
152
- * calculate parashah hashavua on Saturdays
153
- */
154
- sedrot?: boolean;
155
- /**
156
- * Israeli holiday and sedra schedule
157
- */
158
- il?: boolean;
159
- /**
160
- * suppress minor fasts
161
- */
162
- noMinorFast?: boolean;
163
- /**
164
- * suppress modern holidays
165
- */
166
- noModern?: boolean;
167
- /**
168
- * suppress Rosh Chodesh
169
- */
170
- noRoshChodesh?: boolean;
171
- /**
172
- * add Shabbat Mevarchim
173
- */
174
- shabbatMevarchim?: boolean;
175
- /**
176
- * suppress Special Shabbat
177
- */
178
- noSpecialShabbat?: boolean;
179
- /**
180
- * suppress regular holidays
181
- */
182
- noHolidays?: boolean;
183
- /**
184
- * include Days of the Omer
185
- */
186
- omer?: boolean;
187
- /**
188
- * include event announcing the molad
189
- */
190
- molad?: boolean;
191
- /**
192
- * use Ashkenazi transliterations for event titles (default Sephardi transliterations)
193
- */
194
- ashkenazi?: boolean;
195
- /**
196
- * translate event titles according to a locale
197
- * Default value is `en`, also built-in are `he` and `ashkenazi`.
198
- * Additional locales (such as `ru` or `fr`) are provided by the
199
- * {@link https://github.com/hebcal/hebcal-locales @hebcal/locales} package
200
- */
201
- locale?: string;
202
- /**
203
- * print the Hebrew date for the entire date range
204
- */
205
- addHebrewDates?: boolean;
206
- /**
207
- * print the Hebrew date for dates with some events
208
- */
209
- addHebrewDatesForEvents?: boolean;
210
- /**
211
- * use bitmask from `flags` to filter events
212
- */
213
- mask?: number;
214
- /**
215
- * include Yom Kippur Katan (default `false`).
216
- * יוֹם כִּפּוּר קָטָן is a minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh.
217
- * Yom Kippur Katan is omitted in Elul (on the day before Rosh Hashanah),
218
- * Tishrei (Yom Kippur has just passed), Kislev (due to Chanukah)
219
- * and Nisan (fasting not permitted during Nisan).
220
- * When Rosh Chodesh occurs on Shabbat or Sunday, Yom Kippur Katan is observed on the preceding Thursday.
221
- * See {@link https://en.wikipedia.org/wiki/Yom_Kippur_Katan#Practices Wikipedia Yom Kippur Katan practices}
222
- */
223
- yomKippurKatan?: boolean;
224
- /**
225
- * Whether to use 12-hour time (as opposed to 24-hour time).
226
- * Possible values are `true` and `false`; the default is locale dependent.
227
- */
228
- hour12?: boolean;
229
- /**
230
- * map of options to enable daily study calendars
231
- * such as `dafYomi`, `mishnaYomi`, `nachYomi` with value `true`. For `yerushalmi`
232
- * the value should be a `number` for edition (`1` for Vilna, `2` for Schottenstein).
233
- */
234
- dailyLearning?: {
235
- [x: string]: DailyLearningValue;
236
- };
237
- };
238
-
239
- /**
240
- * Holiday flags for Event. These flags are typically
241
- * combined using bitwise arithmetic to form a mask.
242
- * @readonly
243
- * @enum {number}
244
- */
245
- declare const flags: {
246
- /** Chag, yontiff, yom tov */
247
- readonly CHAG: 1;
248
- /** Light candles 18 minutes before sundown */
249
- readonly LIGHT_CANDLES: 2;
250
- /** End of holiday (end of Yom Tov) */
251
- readonly YOM_TOV_ENDS: 4;
252
- /** Observed only in the Diaspora (chutz l'aretz) */
253
- readonly CHUL_ONLY: 8;
254
- /** Observed only in Israel */
255
- readonly IL_ONLY: 16;
256
- /** Light candles in the evening at Tzeit time (3 small stars) */
257
- readonly LIGHT_CANDLES_TZEIS: 32;
258
- /** Candle-lighting for Chanukah */
259
- readonly CHANUKAH_CANDLES: 64;
260
- /** Rosh Chodesh, beginning of a new Hebrew month */
261
- readonly ROSH_CHODESH: 128;
262
- /** Minor fasts like Tzom Tammuz, Ta'anit Esther, ... */
263
- readonly MINOR_FAST: 256;
264
- /** Shabbat Shekalim, Zachor, ... */
265
- readonly SPECIAL_SHABBAT: 512;
266
- /** Weekly sedrot on Saturdays */
267
- readonly PARSHA_HASHAVUA: 1024;
268
- /** Daily page of Talmud (Bavli) */
269
- readonly DAF_YOMI: 2048;
270
- /** Days of the Omer */
271
- readonly OMER_COUNT: 4096;
272
- /** Yom HaShoah, Yom HaAtzma'ut, ... */
273
- readonly MODERN_HOLIDAY: 8192;
274
- /** Yom Kippur and Tish'a B'Av */
275
- readonly MAJOR_FAST: 16384;
276
- /** On the Saturday before Rosh Chodesh */
277
- readonly SHABBAT_MEVARCHIM: 32768;
278
- /** Molad */
279
- readonly MOLAD: 65536;
280
- /** Yahrzeit or Hebrew Anniversary */
281
- readonly USER_EVENT: 131072;
282
- /** Daily Hebrew date ("11th of Sivan, 5780") */
283
- readonly HEBREW_DATE: 262144;
284
- /** A holiday that's not major, modern, rosh chodesh, or a fast day */
285
- readonly MINOR_HOLIDAY: 524288;
286
- /** Evening before a major or minor holiday */
287
- readonly EREV: 1048576;
288
- /** Chol haMoed, intermediate days of Pesach or Sukkot */
289
- readonly CHOL_HAMOED: 2097152;
290
- /** Mishna Yomi */
291
- readonly MISHNA_YOMI: 4194304;
292
- /** Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh */
293
- readonly YOM_KIPPUR_KATAN: 8388608;
294
- /** Daily page of Jerusalem Talmud (Yerushalmi) */
295
- readonly YERUSHALMI_YOMI: 16777216;
296
- /** Nach Yomi */
297
- readonly NACH_YOMI: 33554432;
298
- /** Daily Learning */
299
- readonly DAILY_LEARNING: 67108864;
300
- };
301
- /**
302
- * Represents an Event with a title, date, and flags.
303
- *
304
- * Events are used to represent holidays, candle-lighting times,
305
- * Torah readings, and more.
306
- *
307
- * To get the title of the event a language other than English
308
- * with Sephardic transliterations, use the `render()` method.
309
- */
310
- declare class Event {
311
- /** Hebrew date of this event */
312
- readonly date: HDate;
313
- /**
314
- * Untranslated title of this event. Note that these description
315
- * strings are always in English and will remain stable across releases.
316
- * To get the title of the event in another language, use the
317
- * `render()` method.
318
- */
319
- readonly desc: string;
320
- /** Bitmask of optional event flags. See {@link flags} */
321
- readonly mask: number;
322
- /** Optional emoji character such as ✡️, 🕯️, 🕎, 🕍, 🌒 */
323
- emoji?: string;
324
- /** Optional longer description or memo text */
325
- memo?: string;
326
- /** Alarms are used by iCalendar feeds */
327
- alarm?: Date | string | boolean;
328
- /**
329
- * Constructs Event
330
- * @param date Hebrew date event occurs
331
- * @param desc Description (not translated)
332
- * @param [mask=0] optional bitmask of holiday flags (see {@link flags})
333
- * @param [attrs={}] optional additional attributes (e.g. `eventTimeStr`, `cholHaMoedDay`)
334
- */
335
- constructor(date: HDate, desc: string, mask?: number, attrs?: object);
336
- /**
337
- * Hebrew date of this event
338
- */
339
- getDate(): HDate;
340
- /**
341
- * Untranslated title of this event. Note that these description
342
- * strings are always in English and will remain stable across releases.
343
- * To get the title of the event in another language, use the
344
- * `render()` method.
345
- */
346
- getDesc(): string;
347
- /**
348
- * Bitmask of optional event flags. See {@link flags}
349
- */
350
- getFlags(): number;
351
- /**
352
- * Returns (translated) description of this event
353
- * @example
354
- * const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
355
- * ev.render('en'); // 'Shavuot'
356
- * ev.render('he'); // 'שָׁבוּעוֹת'
357
- * ev.render('ashkenazi'); // 'Shavuos'
358
- * @param [locale] Optional locale name (defaults to active locale).
359
- */
360
- render(locale?: string): string;
361
- /**
362
- * Returns a brief (translated) description of this event.
363
- * For most events, this is the same as render(). For some events, it procudes
364
- * a shorter text (e.g. without a time or added description).
365
- * @param [locale] Optional locale name (defaults to active locale).
366
- */
367
- renderBrief(locale?: string): string;
368
- /**
369
- * Optional holiday-specific Emoji or `null`.
370
- */
371
- getEmoji(): string | null;
372
- /**
373
- * Returns a simplified (untranslated) description for this event. For example,
374
- * the `HolidayEvent` class supports
375
- * "Erev Pesach" => "Pesach", and "Sukkot III (CH''M)" => "Sukkot".
376
- * For many holidays the basename and the event description are the same.
377
- */
378
- basename(): string;
379
- /**
380
- * Returns a URL to hebcal.com or sefaria.org for more detail on the event.
381
- * Returns `undefined` for events with no detail page.
382
- */
383
- url(): string | undefined;
384
- /**
385
- * Is this event observed in Israel?
386
- * @example
387
- * const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
388
- * ev1.observedInIsrael(); // false
389
- * const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
390
- * ev2.observedInIsrael(); // true
391
- */
392
- observedInIsrael(): boolean;
393
- /**
394
- * Is this event observed in the Diaspora?
395
- * @example
396
- * const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
397
- * ev1.observedInDiaspora(); // true
398
- * const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
399
- * ev2.observedInDiaspora(); // true
400
- */
401
- observedInDiaspora(): boolean;
402
- /**
403
- * Is this event observed in Israel/Diaspora?
404
- * @example
405
- * const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
406
- * ev1.observedIn(false); // true
407
- * ev1.observedIn(true); // false
408
- * const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
409
- * ev2.observedIn(false); // true
410
- * ev2.observedIn(true); // true
411
- * @param il
412
- */
413
- observedIn(il: boolean): boolean;
414
- /**
415
- * Makes a clone of this Event object
416
- * @deprecated
417
- */
418
- clone(): Event;
419
- /**
420
- * Returns a list of event categories
421
- */
422
- getCategories(): string[];
423
- }
424
-
425
- /** Daily Hebrew date ("11th of Sivan, 5780") */
426
- declare class HebrewDateEvent extends Event {
427
- /**
428
- * @param date
429
- */
430
- constructor(date: HDate);
431
- /**
432
- * @param [locale] Optional locale name (defaults to active locale).
433
- * @example
434
- * import {HDate, HebrewDateEvent, months} from '@hebcal/core';
435
- *
436
- * const hd = new HDate(15, months.CHESHVAN, 5769);
437
- * const ev = new HebrewDateEvent(hd);
438
- * console.log(ev.render('en')); // '15th of Cheshvan, 5769'
439
- * console.log(ev.render('he')); // 'ט״ו חֶשְׁוָן תשס״ט'
440
- */
441
- render(locale?: string): string;
442
- /**
443
- * @private
444
- * @param locale
445
- */
446
- private renderBriefHebrew;
447
- /**
448
- * @param [locale] Optional locale name (defaults to active locale).
449
- * @example
450
- * import {HDate, HebrewDateEvent, months} from '@hebcal/core';
451
- *
452
- * const hd = new HDate(15, months.CHESHVAN, 5769);
453
- * const ev = new HebrewDateEvent(hd);
454
- * console.log(ev.renderBrief()); // '15th of Cheshvan'
455
- * console.log(ev.renderBrief('he')); // 'ט״ו חֶשְׁוָן'
456
- */
457
- renderBrief(locale?: string): string;
458
- }
459
-
460
- /**
461
- * Calculate halachic times (zmanim / זְמַנִּים) for a given day and location.
462
- * Calculations are available for tzeit / tzais (nightfall),
463
- * shkiah (sunset) and more.
464
- *
465
- * Zmanim are estimated using an algorithm published by the US National Oceanic
466
- * and Atmospheric Administration. The NOAA solar calculator is based on equations
467
- * from _Astronomical Algorithms_ by Jean Meeus.
468
- *
469
- * The sunrise and sunset results are theoretically accurate to within a minute for
470
- * locations between +/- 72° latitude, and within 10 minutes outside of those latitudes.
471
- * However, due to variations in atmospheric composition, temperature, pressure and
472
- * conditions, observed values may vary from calculations.
473
- * https://gml.noaa.gov/grad/solcalc/calcdetails.html
474
- *
475
- * @example
476
- * const {GeoLocation, Zmanim} = require('@hebcal/core');
477
- * const latitude = 41.822232;
478
- * const longitude = -71.448292;
479
- * const tzid = 'America/New_York';
480
- * const friday = new Date(2023, 8, 8);
481
- * const gloc = new GeoLocation(null, latitude, longitude, 0, tzid);
482
- * const zmanim = new Zmanim(gloc, friday, false);
483
- * const candleLighting = zmanim.sunsetOffset(-18, true);
484
- * const timeStr = Zmanim.formatISOWithTimeZone(tzid, candleLighting);
485
- */
486
- declare class Zmanim {
487
- private readonly date;
488
- private readonly gloc;
489
- private readonly noaa;
490
- private useElevation;
491
- /**
492
- * Initialize a Zmanim instance.
493
- * @param gloc GeoLocation including latitude, longitude, and timezone
494
- * @param date Regular or Hebrew Date. If `date` is a regular `Date`,
495
- * hours, minutes, seconds and milliseconds are ignored.
496
- * @param useElevation use elevation for calculations (default `false`).
497
- * If `true`, use elevation to affect the calculation of all sunrise/sunset based
498
- * zmanim. Note: there are some zmanim such as degree-based zmanim that are driven
499
- * by the amount of light in the sky and are not impacted by elevation.
500
- * These zmanim intentionally do not support elevation adjustment.
501
- */
502
- constructor(gloc: GeoLocation, date: Date | HDate, useElevation: boolean);
503
- /**
504
- * Returns `true` if elevation adjustment is enabled
505
- * for zmanim support elevation adjustment
506
- */
507
- getUseElevation(): boolean;
508
- /**
509
- * Enables or disables elevation adjustment for zmanim support elevation adjustment
510
- * @param useElevation
511
- */
512
- setUseElevation(useElevation: boolean): void;
513
- /**
514
- * Convenience function to get the time when sun is above or below the horizon
515
- * for a certain angle (in degrees).
516
- * This function does not support elevation adjustment.
517
- * @param angle
518
- * @param rising
519
- */
520
- timeAtAngle(angle: number, rising: boolean): Date;
521
- /**
522
- * Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
523
- * If elevation is enabled, this function will include elevation in the calculation.
524
- */
525
- sunrise(): Date;
526
- /**
527
- * Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon).
528
- * This function does not support elevation adjustment.
529
- */
530
- seaLevelSunrise(): Date;
531
- /**
532
- * When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
533
- * If elevation is enabled, this function will include elevation in the calculation.
534
- */
535
- sunset(): Date;
536
- /**
537
- * When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
538
- * This function does not support elevation adjustment.
539
- */
540
- seaLevelSunset(): Date;
541
- /**
542
- * Civil dawn; Sun is 6° below the horizon in the morning.
543
- * Because degree-based functions estimate the amount of light in the sky,
544
- * the result is not impacted by elevation.
545
- */
546
- dawn(): Date;
547
- /**
548
- * Civil dusk; Sun is 6° below the horizon in the evening.
549
- * Because degree-based functions estimate the amount of light in the sky,
550
- * the result is not impacted by elevation.
551
- */
552
- dusk(): Date;
553
- /**
554
- * Returns sunset for the previous day.
555
- * If elevation is enabled, this function will include elevation in the calculation.
556
- */
557
- gregEve(): Date;
558
- /**
559
- * @private
560
- */
561
- nightHour(): number;
562
- /**
563
- * Midday – Chatzot; Sunrise plus 6 halachic hours
564
- */
565
- chatzot(): Date;
566
- /**
567
- * Midnight – Chatzot; Sunset plus 6 halachic hours.
568
- * If elevation is enabled, this function will include elevation in the calculation.
569
- */
570
- chatzotNight(): Date;
571
- /**
572
- * Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning.
573
- * Because degree-based functions estimate the amount of light in the sky,
574
- * the result is not impacted by elevation.
575
- */
576
- alotHaShachar(): Date;
577
- /**
578
- * Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning.
579
- * Because degree-based functions estimate the amount of light in the sky,
580
- * the result is not impacted by elevation.
581
- */
582
- misheyakir(): Date;
583
- /**
584
- * Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning.
585
- * Because degree-based functions estimate the amount of light in the sky,
586
- * the result is not impacted by elevation.
587
- */
588
- misheyakirMachmir(): Date;
589
- /**
590
- * Utility method for using elevation-aware sunrise/sunset
591
- * @private
592
- * @param hours
593
- */
594
- getShaahZmanisBasedZman(hours: number): Date;
595
- /**
596
- * Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra.
597
- * If elevation is enabled, this function will include elevation in the calculation.
598
- */
599
- sofZmanShma(): Date;
600
- /**
601
- * Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra.
602
- *
603
- * This method returns the latest *zman tfila* (time to recite shema in the morning)
604
- * that is 4 *shaos zmaniyos* (solar hours) after sunrise or sea level sunrise
605
- * (depending on the `useElevation` setting), according
606
- * to the [GRA](https://en.wikipedia.org/wiki/Vilna_Gaon).
607
- *
608
- * If elevation is enabled, this function will include elevation in the calculation.
609
- */
610
- sofZmanTfilla(): Date;
611
- /**
612
- * Returns an array with alot (Date) and ms in hour (number)
613
- * @private
614
- */
615
- getTemporalHour72(forceSeaLevel: boolean): [Date, number];
616
- /**
617
- * Returns an array with alot (Date) and ms in hour (number)
618
- * @private
619
- */
620
- getTemporalHourByDeg(angle: number): [Date, number];
621
- /**
622
- * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
623
- * Based on the opinion of the MGA that the day is calculated from
624
- * dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed
625
- * 72 minutes after sea-level sunset.
626
- */
627
- sofZmanShmaMGA(): Date;
628
- /**
629
- * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
630
- * Based on the opinion of the MGA that the day is calculated from
631
- * dawn to nightfall with both being 16.1° below the horizon.
632
- */
633
- sofZmanShmaMGA16Point1(): Date;
634
- /**
635
- * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
636
- * Based on the opinion of the MGA that the day is calculated from
637
- * dawn to nightfall with both being 19.8° below the horizon.
638
- *
639
- * This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
640
- * around the equinox / equilux which calculates to 19.8° below geometric zenith.
641
- * https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
642
- */
643
- sofZmanShmaMGA19Point8(): Date;
644
- /**
645
- * Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
646
- */
647
- sofZmanTfillaMGA(): Date;
648
- /**
649
- * Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
650
- * Based on the opinion of the MGA that the day is calculated from
651
- * dawn to nightfall with both being 16.1° below the horizon.
652
- */
653
- sofZmanTfillaMGA16Point1(): Date;
654
- /**
655
- * Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
656
- * Based on the opinion of the MGA that the day is calculated from
657
- * dawn to nightfall with both being 19.8° below the horizon.
658
- *
659
- * This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
660
- * around the equinox / equilux which calculates to 19.8° below geometric zenith.
661
- * https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
662
- */
663
- sofZmanTfillaMGA19Point8(): Date;
664
- /**
665
- * Earliest Mincha – Mincha Gedola (GRA); Sunrise plus 6.5 halachic hours.
666
- * If elevation is enabled, this function will include elevation in the calculation.
667
- *
668
- * This method returns the latest mincha gedola, the earliest time one can pray mincha
669
- * that is 6.5 shaos zmaniyos (solar hours) after sunrise or sea level sunrise
670
- * (depending on the `useElevation` setting), according
671
- * to the [GRA](https://en.wikipedia.org/wiki/Vilna_Gaon).
672
- *
673
- * The Ramba"m is of the opinion that it is better to delay *mincha* until
674
- * *mincha ketana* while the Ra"sh, Tur, GRA and others are of the
675
- * opinion that *mincha* can be prayed *lechatchila* starting at *mincha gedola*.
676
- */
677
- minchaGedola(): Date;
678
- /**
679
- * Earliest Mincha – Mincha Gedola (MGA); Sunrise plus 6.5 halachic hours.
680
- * If elevation is enabled, this function will include elevation in the calculation.
681
- *
682
- * This method returns the time of *mincha gedola* according to the Magen Avraham
683
- * with the day starting 72 minutes before sunrise and ending 72 minutes after sunset.
684
- * This is the earliest time to pray *mincha*.
685
- */
686
- minchaGedolaMGA(): Date;
687
- /**
688
- * Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours.
689
- * If elevation is enabled, this function will include elevation in the calculation.
690
- *
691
- * This method returns *mincha ketana*, the preferred earliest time to pray *mincha* in the
692
- * opinion of the [Rambam](https://en.wikipedia.org/wiki/Maimonides) and others,
693
- * that is 9.5 *shaos zmaniyos* (solar hours) after sunrise or sea level sunrise
694
- * (depending on the `useElevation` setting), according
695
- * to the [GRA](https://en.wikipedia.org/wiki/Vilna_Gaon).
696
- */
697
- minchaKetana(): Date;
698
- /**
699
- * This method returns the time of *mincha ketana* according to the Magen Avraham
700
- * with the day starting 72 minutes before sunrise and ending 72 minutes after sunset.
701
- * This is the preferred earliest time to pray *mincha* according to the opinion of
702
- * the [Rambam](https://en.wikipedia.org/wiki/Maimonides) and others.
703
- *
704
- * If elevation is enabled, this function will include elevation in the calculation.
705
- */
706
- minchaKetanaMGA(): Date;
707
- /**
708
- * Plag haMincha; Sunrise plus 10.75 halachic hours.
709
- * If elevation is enabled, this function will include elevation in the calculation.
710
- */
711
- plagHaMincha(): Date;
712
- /**
713
- * @param [angle=8.5] optional time for solar depression.
714
- * Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars.
715
- * Because degree-based functions estimate the amount of light in the sky,
716
- * the result is not impacted by elevation.
717
- */
718
- tzeit(angle?: number): Date;
719
- /**
720
- * Alias for sunrise
721
- */
722
- neitzHaChama(): Date;
723
- /**
724
- * Alias for sunset
725
- */
726
- shkiah(): Date;
727
- /**
728
- * Rabbeinu Tam holds that bein hashmashos is a specific time
729
- * between sunset and tzeis hakochavim.
730
- * One opinion on how to calculate this time is that
731
- * it is 13.5 minutes before tzies 7.083.
732
- * Because degree-based functions estimate the amount of light in the sky,
733
- * the result is not impacted by elevation.
734
- */
735
- beinHaShmashos(): Date;
736
- /**
737
- * Uses timeFormat to return a date like '20:34'
738
- */
739
- static formatTime(dt: Date, timeFormat: Intl.DateTimeFormat): string;
740
- /**
741
- * Discards seconds, rounding to nearest minute.
742
- * @param dt
743
- */
744
- static roundTime(dt: Date): Date;
745
- /**
746
- * Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
747
- * @param tzid
748
- * @param date
749
- */
750
- static timeZoneOffset(tzid: string, date: Date): string;
751
- /**
752
- * Returns a string like "2022-04-01T13:06:00-11:00"
753
- * @param tzid
754
- * @param date
755
- */
756
- static formatISOWithTimeZone(tzid: string, date: Date): string;
757
- /**
758
- * Returns sunrise + `offset` minutes (either positive or negative).
759
- * If elevation is enabled, this function will include elevation in the calculation
760
- * unless `forceSeaLevel` is `true`.
761
- * @param offset minutes
762
- * @param roundMinute round time to nearest minute (default true)
763
- * @param forceSeaLevel use sea-level sunrise (default false)
764
- */
765
- sunriseOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
766
- /**
767
- * Returns sunset + `offset` minutes (either positive or negative).
768
- * If elevation is enabled, this function will include elevation in the calculation
769
- * unless `forceSeaLevel` is `true`.
770
- * @param offset minutes
771
- * @param roundMinute round time to nearest minute (default true)
772
- * @param forceSeaLevel use sea-level sunset (default false)
773
- */
774
- sunsetOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
775
- /**
776
- * Returns the Hebrew date relative to the specified location and Gregorian date,
777
- * taking into consideration whether the time is before or after sunset.
778
- *
779
- * For example, if the given date and is `2024-09-22T10:35` (before sunset), and
780
- * sunset for the specified location is **19:04**, then this function would
781
- * return a Hebrew date of `19th of Elul, 5784`.
782
- * If the given date is the same Gregorian day after sunset
783
- * (for example `2024-09-22T20:07`), this function would return a
784
- * Hebrew date of `20th of Elul, 5784`.
785
- * @example
786
- * const {GeoLocation, Zmanim, HDate} = require('@hebcal/core');
787
- * const latitude = 48.85341;
788
- * const longitude = 2.3488;
789
- * const timezone = 'Europe/Paris';
790
- * const gloc = new GeoLocation(null, latitude, longitude, 0, timezone);
791
- * const before = Zmanim.makeSunsetAwareHDate(gloc, new Date('2024-09-22T17:38:46.123Z'), false);
792
- * console.log(before.toString()); // '19 Elul 5784'
793
- * const after = Zmanim.makeSunsetAwareHDate(gloc, new Date('2024-09-22T23:45:18.345Z'), false);
794
- * console.log(after.toString()); // '20 Elul 5784'
795
- */
796
- static makeSunsetAwareHDate(gloc: GeoLocation, date: Date, useElevation: boolean): HDate;
797
- }
798
-
799
- /** An event that has an `eventTime` and `eventTimeStr` */
800
- declare class TimedEvent extends Event {
801
- readonly eventTime: Date;
802
- readonly location: Location;
803
- readonly eventTimeStr: string;
804
- readonly fmtTime: string;
805
- readonly linkedEvent?: Event;
806
- /**
807
- * @param desc Description (not translated)
808
- */
809
- constructor(date: HDate, desc: string, mask: number, eventTime: Date, location: Location, linkedEvent?: Event, options?: CalOptions);
810
- /**
811
- * @param [locale] Optional locale name (defaults to active locale).
812
- */
813
- render(locale?: string): string;
814
- /**
815
- * Returns translation of "Candle lighting" without the time.
816
- * @param [locale] Optional locale name (defaults to active locale).
817
- */
818
- renderBrief(locale?: string): string;
819
- getCategories(): string[];
820
- }
821
- /** Candle lighting before Shabbat or holiday */
822
- declare class CandleLightingEvent extends TimedEvent {
823
- constructor(date: HDate, mask: number, eventTime: Date, location: Location, linkedEvent?: Event, options?: CalOptions);
824
- getEmoji(): string;
825
- }
826
- /** Havdalah after Shabbat or holiday */
827
- declare class HavdalahEvent extends TimedEvent {
828
- private readonly havdalahMins?;
829
- constructor(date: HDate, mask: number, eventTime: Date, location: Location, havdalahMins?: number, linkedEvent?: Event, options?: CalOptions);
830
- /**
831
- * @param [locale] Optional locale name (defaults to active locale).
832
- */
833
- render(locale?: string): string;
834
- /**
835
- * Returns translation of "Havdalah" without the time.
836
- * @param [locale] Optional locale name (defaults to active locale).
837
- */
838
- renderBrief(locale?: string): string;
839
- getEmoji(): string;
840
- }
841
-
842
- /** Represents a built-in holiday like Pesach, Purim or Tu BiShvat */
843
- declare class HolidayEvent extends Event {
844
- /** During Sukkot or Pesach */
845
- cholHaMoedDay?: number;
846
- chanukahDay?: number;
847
- /**
848
- * `true` if the fast day was postponed a day to avoid Shabbat.
849
- * - Tish'a B'Av postponed from the 9th to the 10th
850
- * - Tzom Tammuz postponed from the 17th to the 18th
851
- */
852
- observed?: boolean;
853
- basename(): string;
854
- url(): string | undefined;
855
- urlDateSuffix(): string;
856
- getEmoji(): string;
857
- getCategories(): string[];
858
- /**
859
- * Returns (translated) description of this event
860
- * @param [locale] Optional locale name (defaults to active locale).
861
- */
862
- render(locale?: string): string;
863
- /**
864
- * Returns a brief (translated) description of this event.
865
- * For most events, this is the same as render(). For some events, it procudes
866
- * a shorter text (e.g. without a time or added description).
867
- * @param [locale] Optional locale name (defaults to active locale).
868
- */
869
- renderBrief(locale?: string): string;
870
- /**
871
- * Makes a clone of this Event object
872
- * @deprecated
873
- */
874
- clone(): HolidayEvent;
875
- }
876
- /**
877
- * Because Asara B'Tevet often occurs twice in the same Gregorian year,
878
- * we subclass HolidayEvent to override the `url()` method.
879
- */
880
- declare class AsaraBTevetEvent extends HolidayEvent {
881
- urlDateSuffix(): string;
882
- }
883
- /** Represents Rosh Hashana, the Jewish New Year */
884
- declare class RoshHashanaEvent extends HolidayEvent {
885
- private readonly hyear;
886
- /**
887
- * @private
888
- * @param date Hebrew date event occurs
889
- * @param hyear Hebrew year
890
- * @param mask optional holiday flags
891
- */
892
- constructor(date: HDate, hyear: number, mask: number);
893
- /**
894
- * Returns (translated) description of this event
895
- * @param [locale] Optional locale name (defaults to active locale).
896
- */
897
- render(locale?: string): string;
898
- getEmoji(): string;
899
- }
900
- /** Represents Rosh Chodesh, the beginning of a new month */
901
- declare class RoshChodeshEvent extends HolidayEvent {
902
- /**
903
- * Constructs Rosh Chodesh event
904
- * @param date Hebrew date event occurs
905
- * @param monthName Hebrew month name (not translated)
906
- */
907
- constructor(date: HDate, monthName: string);
908
- /**
909
- * Returns (translated) description of this event
910
- * @param [locale] Optional locale name (defaults to active locale).
911
- */
912
- render(locale?: string): string;
913
- basename(): string;
914
- getEmoji(): string;
915
- }
916
-
917
- /** A fast day also contains a start and end time */
918
- declare class FastDayEvent extends HolidayEvent {
919
- /** this will be a "Fast begins" event */
920
- readonly startEvent?: TimedEvent;
921
- /** this will be a "Fast ends" event */
922
- readonly endEvent?: TimedEvent;
923
- constructor(date: HDate, desc: string, mask: number, startEvent?: TimedEvent, endEvent?: TimedEvent);
924
- urlDateSuffix(): string;
925
- }
926
-
927
- /**
928
- * Represents a molad, the moment when the new moon is "born"
929
- */
930
- declare class Molad {
931
- private readonly m;
932
- /**
933
- * Calculates the molad for a Hebrew month
934
- * @param year
935
- * @param month
936
- */
937
- constructor(year: number, month: number);
938
- /**
939
- */
940
- getYear(): number;
941
- /**
942
- */
943
- getMonth(): number;
944
- /**
945
- */
946
- getMonthName(): string;
947
- /**
948
- * @returns Day of Week (0=Sunday, 6=Saturday)
949
- */
950
- getDow(): number;
951
- /**
952
- * @returns hour of day (0-23)
953
- */
954
- getHour(): number;
955
- /**
956
- * @returns minutes past hour (0-59)
957
- */
958
- getMinutes(): number;
959
- /**
960
- * @returns parts of a minute (0-17)
961
- */
962
- getChalakim(): number;
963
- /**
964
- * @param [locale] Optional locale name (defaults to active locale)
965
- * @param options
966
- */
967
- render(locale?: string, options?: CalOptions): string;
968
- }
969
- /** Represents a Molad announcement on Shabbat Mevarchim */
970
- declare class MoladEvent extends Event {
971
- readonly molad: Molad;
972
- private readonly options;
973
- /**
974
- * @param date Hebrew date event occurs
975
- * @param hyear molad year
976
- * @param hmonth molad month
977
- * @param options
978
- */
979
- constructor(date: HDate, hyear: number, hmonth: number, options: CalOptions);
980
- /**
981
- * @param [locale] Optional locale name (defaults to active locale).
982
- */
983
- render(locale?: string): string;
984
- }
985
-
986
- /** Represents a day 1-49 of counting the Omer from Pesach to Shavuot */
987
- declare class OmerEvent extends Event {
988
- private readonly weekNumber;
989
- private readonly daysWithinWeeks;
990
- readonly omer: number;
991
- emoji?: string;
992
- /**
993
- * @param date
994
- * @param omerDay
995
- */
996
- constructor(date: HDate, omerDay: number);
997
- /**
998
- * @param lang
999
- */
1000
- sefira(lang?: string): string;
1001
- /**
1002
- * @todo use gettext()
1003
- * @param [locale] Optional locale name (defaults to active locale).
1004
- */
1005
- render(locale?: string): string;
1006
- /**
1007
- * Returns translation of "Omer day 22" without ordinal numbers.
1008
- * @param [locale] Optional locale name (defaults to active locale).
1009
- */
1010
- renderBrief(locale?: string): string;
1011
- getEmoji(): string;
1012
- getWeeks(): number;
1013
- getDaysWithinWeeks(): number;
1014
- /**
1015
- * @param locale
1016
- */
1017
- getTodayIs(locale: string): string;
1018
- url(): string;
1019
- }
1020
-
1021
- /**
1022
- * Is *tachanun* said today?
1023
- */
1024
- type TachanunResult = {
1025
- /** Tachanun is said at Shacharit */
1026
- shacharit: boolean;
1027
- /** Tachanun is said at Mincha */
1028
- mincha: boolean;
1029
- /** All congregations say Tachanun on the day */
1030
- allCongs: boolean;
1031
- };
1032
-
1033
- /** The result from `Sedra.lookup()` */
1034
- type SedraResult = {
1035
- /**
1036
- * Name of the parsha (or parshiyot) read on
1037
- * Hebrew date, e.g. `['Noach']` or `['Matot', 'Masei']`
1038
- */
1039
- parsha: string[];
1040
- /**
1041
- * True if this is a regular parasha HaShavua
1042
- * Torah reading, false if it's a special holiday reading
1043
- */
1044
- chag: boolean;
1045
- /**
1046
- * The parsha number (or numbers) using 1-indexing.
1047
- * A `number` for a regular (single) parsha, and a `number[]`
1048
- * for a doubled parsha.
1049
- * For Parashat *Bereshit*, `num` would be equal to `1`, and for
1050
- * *Matot-Masei* it would be `[42, 43]`
1051
- */
1052
- num?: number | number[];
1053
- /** The date of the Shabbat this parsha is read */
1054
- hdate: HDate;
1055
- };
1056
- /**
1057
- * Represents Parashah HaShavua for an entire Hebrew year
1058
- */
1059
- declare class Sedra {
1060
- private readonly year;
1061
- private readonly il;
1062
- private readonly firstSaturday;
1063
- private readonly theSedraArray;
1064
- /**
1065
- * Caculates the Parashah HaShavua for an entire Hebrew year
1066
- * @param hyear - Hebrew year (e.g. 5749)
1067
- * @param il - Use Israel sedra schedule (false for Diaspora)
1068
- */
1069
- constructor(hyear: number, il: boolean);
1070
- /**
1071
- * Returns the parsha (or parshiyot) read on Hebrew date
1072
- * @deprecated Use {@link lookup} instead
1073
- * @param hd Hebrew date or R.D. days
1074
- */
1075
- get(hd: HDate | number): string[];
1076
- /**
1077
- * Looks up parsha for the date, then returns a translated or transliterated string
1078
- * @deprecated Use {@link lookup} instead
1079
- * @param hd Hebrew date or R.D. days
1080
- * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale
1081
- */
1082
- getString(hd: HDate | number, locale?: string): string;
1083
- /**
1084
- * Checks to see if this day would be a regular parasha HaShavua
1085
- * Torah reading or special holiday reading
1086
- * @deprecated Use {@link lookup} instead
1087
- * @param hd Hebrew date or R.D. days
1088
- */
1089
- isParsha(hd: HDate | number): boolean;
1090
- /**
1091
- * Returns the date that a parsha occurs
1092
- * or `null` if the parsha doesn't occur this year
1093
- * @param parsha if a `string`, specified with Sephardic transliterations
1094
- * like `'Noach'` or `'Matot-Masei'`. If an array, must be a 1- or 2-element
1095
- * array such as `['Noach']` or `['Matot', 'Masei']`. If a `number`, should
1096
- * be a 0-based parsha index (`0` for Bereshit, `1` for Noach) or a negative
1097
- * number for a doubled parsha (e.g. `-21` for Vayakhel-Pekudei)
1098
- */
1099
- find(parsha: number | string | string[]): HDate | null;
1100
- private findInternal;
1101
- /**
1102
- * Returns the date that a parsha (or its doubled or undoubled counterpart)
1103
- * occurs, or `null` if the parsha doesn't occur this year
1104
- */
1105
- findContaining(parsha: number | string): HDate | null;
1106
- /**
1107
- * Returns the underlying annual sedra schedule.
1108
- * Used by `@hebcal/triennial`
1109
- */
1110
- getSedraArray(): readonly NumberOrString[];
1111
- /**
1112
- * R.D. date of the first Saturday on or after Rosh Hashana
1113
- */
1114
- getFirstSaturday(): number;
1115
- getYear(): number;
1116
- /**
1117
- * Returns an object describing the parsha on the first Saturday on or after `hd`
1118
- * @param hd Hebrew date or R.D. days
1119
- */
1120
- lookup(hd: HDate | number): SedraResult;
1121
- }
1122
- /**
1123
- * The 54 parshiyot of the Torah as transilterated strings.
1124
- * parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[52] == "Ha'azinu".
1125
- * @readonly
1126
- * @type {string[]}
1127
- */
1128
- declare const parshiot: readonly string[];
1129
- type NumberOrString = number | string;
1130
- /**
1131
- * Convenience function to create an instance of `Sedra` or reuse a previously
1132
- * created and cached instance.
1133
- * @param hyear
1134
- * @param il
1135
- */
1136
- declare function getSedra(hyear: number, il: boolean): Sedra;
1137
-
1138
- /**
1139
- * Represents one of 54 weekly Torah portions, always on a Saturday
1140
- */
1141
- declare class ParshaEvent extends Event {
1142
- readonly parsha: string[];
1143
- readonly il: boolean;
1144
- readonly num: number | number[];
1145
- /**
1146
- * @param parsha - untranslated name of single or double parsha,
1147
- * such as ['Bereshit'] or ['Achrei Mot', 'Kedoshim']
1148
- */
1149
- constructor(date: HDate, parsha: string[], il?: boolean, num?: number | number[]);
1150
- /**
1151
- * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
1152
- */
1153
- render(locale?: string): string;
1154
- basename(): string;
1155
- url(): string | undefined;
1156
- urlDateSuffix(): string;
1157
- }
1158
-
1159
- /**
1160
- * Returns an array of Events on this date (or `undefined` if no events)
1161
- * @param date Hebrew Date, Gregorian date, or absolute R.D. day number
1162
- * @param [il] use the Israeli schedule for holidays
1163
- */
1164
- declare function getHolidaysOnDate(date: HDate | Date | number, il?: boolean): HolidayEvent[] | undefined;
1165
- type HolidayYearMap = Map<string, HolidayEvent[]>;
1166
-
1167
- /** Represents Mevarchim haChodesh, the announcement of the new month */
1168
- declare class MevarchimChodeshEvent extends Event {
1169
- readonly monthName: string;
1170
- /**
1171
- * Constructs Mevarchim haChodesh event
1172
- * @param date Hebrew date event occurs
1173
- * @param monthName Hebrew month name (not translated)
1174
- * @param [memo]
1175
- */
1176
- constructor(date: HDate, monthName: string, memo: string);
1177
- basename(): string;
1178
- /**
1179
- * Returns (translated) description of this event
1180
- * @param [locale] Optional locale name (defaults to active locale).
1181
- */
1182
- render(locale?: string): string;
1183
- /**
1184
- * Returns (translated) description of this event
1185
- * @param [locale] Optional locale name (defaults to active locale).
1186
- */
1187
- renderBrief(locale?: string): string;
1188
- }
1189
-
1190
- /**
1191
- * Transliterated names of holidays, used by `Event.getDesc()`
1192
- * @readonly
1193
- * @enum {string}
1194
- */
1195
- declare const holidayDesc: {
1196
- /** Asara B'Tevet */
1197
- readonly ASARA_BTEVET: "Asara B'Tevet";
1198
- /** Birkat Hachamah */
1199
- readonly BIRKAT_HACHAMAH: "Birkat Hachamah";
1200
- /** Chag HaBanot */
1201
- readonly CHAG_HABANOT: "Chag HaBanot";
1202
- /** Chanukah: 8th Day */
1203
- readonly CHANUKAH_8TH_DAY: "Chanukah: 8th Day";
1204
- /** Erev Tish'a B'Av */
1205
- readonly EREV_TISHA_BAV: "Erev Tish'a B'Av";
1206
- /** Leil Selichot */
1207
- readonly LEIL_SELICHOT: "Leil Selichot";
1208
- /** Purim Katan */
1209
- readonly PURIM_KATAN: "Purim Katan";
1210
- /** Purim Meshulash */
1211
- readonly PURIM_MESHULASH: "Purim Meshulash";
1212
- /** Shabbat Chazon */
1213
- readonly SHABBAT_CHAZON: "Shabbat Chazon";
1214
- /** Shabbat HaChodesh */
1215
- readonly SHABBAT_HACHODESH: "Shabbat HaChodesh";
1216
- /** Shabbat HaGadol */
1217
- readonly SHABBAT_HAGADOL: "Shabbat HaGadol";
1218
- /** Shabbat Nachamu */
1219
- readonly SHABBAT_NACHAMU: "Shabbat Nachamu";
1220
- /** Shabbat Parah */
1221
- readonly SHABBAT_PARAH: "Shabbat Parah";
1222
- /** Shabbat Shekalim */
1223
- readonly SHABBAT_SHEKALIM: "Shabbat Shekalim";
1224
- /** Shabbat Shirah */
1225
- readonly SHABBAT_SHIRAH: "Shabbat Shirah";
1226
- /** Shabbat Shuva */
1227
- readonly SHABBAT_SHUVA: "Shabbat Shuva";
1228
- /** Shabbat Zachor */
1229
- readonly SHABBAT_ZACHOR: "Shabbat Zachor";
1230
- /** Shushan Purim Katan */
1231
- readonly SHUSHAN_PURIM_KATAN: "Shushan Purim Katan";
1232
- /** Ta'anit Bechorot */
1233
- readonly TAANIT_BECHOROT: "Ta'anit Bechorot";
1234
- /** Ta'anit Esther */
1235
- readonly TAANIT_ESTHER: "Ta'anit Esther";
1236
- /** Tish'a B'Av */
1237
- readonly TISHA_BAV: "Tish'a B'Av";
1238
- /** Tzom Gedaliah */
1239
- readonly TZOM_GEDALIAH: "Tzom Gedaliah";
1240
- /** Tzom Tammuz */
1241
- readonly TZOM_TAMMUZ: "Tzom Tammuz";
1242
- /** Yom HaAtzma'ut */
1243
- readonly YOM_HAATZMA_UT: "Yom HaAtzma'ut";
1244
- /** Yom HaShoah */
1245
- readonly YOM_HASHOAH: "Yom HaShoah";
1246
- /** Yom HaZikaron */
1247
- readonly YOM_HAZIKARON: "Yom HaZikaron";
1248
- /** Ben-Gurion Day */
1249
- readonly BEN_GURION_DAY: "Ben-Gurion Day";
1250
- /** Chanukah: 1 Candle */
1251
- readonly CHANUKAH_1_CANDLE: "Chanukah: 1 Candle";
1252
- /** Erev Pesach */
1253
- readonly EREV_PESACH: "Erev Pesach";
1254
- /** Erev Purim */
1255
- readonly EREV_PURIM: "Erev Purim";
1256
- /** Erev Rosh Hashana */
1257
- readonly EREV_ROSH_HASHANA: "Erev Rosh Hashana";
1258
- /** Erev Shavuot */
1259
- readonly EREV_SHAVUOT: "Erev Shavuot";
1260
- /** Erev Sukkot */
1261
- readonly EREV_SUKKOT: "Erev Sukkot";
1262
- /** Erev Yom Kippur */
1263
- readonly EREV_YOM_KIPPUR: "Erev Yom Kippur";
1264
- /** Family Day */
1265
- readonly FAMILY_DAY: "Family Day";
1266
- /** Hebrew Language Day */
1267
- readonly HEBREW_LANGUAGE_DAY: "Hebrew Language Day";
1268
- /** Herzl Day */
1269
- readonly HERZL_DAY: "Herzl Day";
1270
- /** Jabotinsky Day */
1271
- readonly JABOTINSKY_DAY: "Jabotinsky Day";
1272
- /** Lag BaOmer */
1273
- readonly LAG_BAOMER: "Lag BaOmer";
1274
- /** Pesach I */
1275
- readonly PESACH_I: "Pesach I";
1276
- /** Pesach II */
1277
- readonly PESACH_II: "Pesach II";
1278
- /** Pesach III (CH''M) */
1279
- readonly PESACH_III_CHM: "Pesach III (CH''M)";
1280
- /** Pesach II (CH''M) */
1281
- readonly PESACH_II_CHM: "Pesach II (CH''M)";
1282
- /** Pesach IV (CH''M) */
1283
- readonly PESACH_IV_CHM: "Pesach IV (CH''M)";
1284
- /** Pesach Sheni */
1285
- readonly PESACH_SHENI: "Pesach Sheni";
1286
- /** Pesach VII */
1287
- readonly PESACH_VII: "Pesach VII";
1288
- /** Pesach VIII */
1289
- readonly PESACH_VIII: "Pesach VIII";
1290
- /** Pesach VI (CH''M) */
1291
- readonly PESACH_VI_CHM: "Pesach VI (CH''M)";
1292
- /** Pesach V (CH''M) */
1293
- readonly PESACH_V_CHM: "Pesach V (CH''M)";
1294
- /** Purim */
1295
- readonly PURIM: "Purim";
1296
- /** Rosh Hashana II */
1297
- readonly ROSH_HASHANA_II: "Rosh Hashana II";
1298
- /** Rosh Hashana LaBehemot */
1299
- readonly ROSH_HASHANA_LABEHEMOT: "Rosh Hashana LaBehemot";
1300
- /** Shavuot */
1301
- readonly SHAVUOT: "Shavuot";
1302
- /** Shavuot I */
1303
- readonly SHAVUOT_I: "Shavuot I";
1304
- /** Shavuot II */
1305
- readonly SHAVUOT_II: "Shavuot II";
1306
- /** Shmini Atzeret */
1307
- readonly SHMINI_ATZERET: "Shmini Atzeret";
1308
- /** Shushan Purim */
1309
- readonly SHUSHAN_PURIM: "Shushan Purim";
1310
- /** Sigd */
1311
- readonly SIGD: "Sigd";
1312
- /** Simchat Torah */
1313
- readonly SIMCHAT_TORAH: "Simchat Torah";
1314
- /** Sukkot I */
1315
- readonly SUKKOT_I: "Sukkot I";
1316
- /** Sukkot II */
1317
- readonly SUKKOT_II: "Sukkot II";
1318
- /** Sukkot III (CH''M) */
1319
- readonly SUKKOT_III_CHM: "Sukkot III (CH''M)";
1320
- /** Sukkot II (CH''M) */
1321
- readonly SUKKOT_II_CHM: "Sukkot II (CH''M)";
1322
- /** Sukkot IV (CH''M) */
1323
- readonly SUKKOT_IV_CHM: "Sukkot IV (CH''M)";
1324
- /** Sukkot VII (Hoshana Raba) */
1325
- readonly SUKKOT_VII_HOSHANA_RABA: "Sukkot VII (Hoshana Raba)";
1326
- /** Sukkot VI (CH''M) */
1327
- readonly SUKKOT_VI_CHM: "Sukkot VI (CH''M)";
1328
- /** Sukkot V (CH''M) */
1329
- readonly SUKKOT_V_CHM: "Sukkot V (CH''M)";
1330
- /** Tu B\'Av */
1331
- readonly TU_BAV: "Tu B'Av";
1332
- /** Tu BiShvat */
1333
- readonly TU_BISHVAT: "Tu BiShvat";
1334
- /** Yitzhak Rabin Memorial Day */
1335
- readonly YITZHAK_RABIN_MEMORIAL_DAY: "Yitzhak Rabin Memorial Day";
1336
- /** Yom HaAliyah */
1337
- readonly YOM_HAALIYAH: "Yom HaAliyah";
1338
- /** Yom HaAliyah School Observance */
1339
- readonly YOM_HAALIYAH_SCHOOL_OBSERVANCE: "Yom HaAliyah School Observance";
1340
- /** Yom Kippur */
1341
- readonly YOM_KIPPUR: "Yom Kippur";
1342
- /** Yom Yerushalayim */
1343
- readonly YOM_YERUSHALAYIM: "Yom Yerushalayim";
1344
- };
1345
-
1346
- /**
1347
- * Plug-ins for daily learning calendars such as Daf Yomi, Mishna Yomi, Nach Yomi, etc.
1348
- *
1349
- * Learning schedules are provided by the `@hebcal/learning` package.
1350
- */
1351
- declare class DailyLearning {
1352
- /**
1353
- * Register a new learning calendar.
1354
- */
1355
- static addCalendar(name: string, calendar: Function): void;
1356
- /**
1357
- * Returns an event from daily calendar for a given date. Returns `null` if there
1358
- * is no learning from this calendar on this date.
1359
- * @param name
1360
- * @param hd
1361
- * @param il
1362
- */
1363
- static lookup(name: string, hd: HDate, il: boolean): Event | null;
1364
- }
1365
-
1366
- /**
1367
- * HebrewCalendar is the main interface to the `@hebcal/core` library.
1368
- * This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
1369
- * Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
1370
- * Event names can be rendered in several languges using the `locale` option.
1371
- */
1372
- declare class HebrewCalendar {
1373
- private constructor();
1374
- /**
1375
- * Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
1376
- *
1377
- * Each holiday is represented by an {@link Event} object which includes a date,
1378
- * a description, flags and optional attributes.
1379
- * If given no options, returns holidays for the Diaspora for the current Gregorian year.
1380
- *
1381
- * The date range returned by this function can be controlled by:
1382
- * * `options.year` - Gregorian (e.g. 1993) or Hebrew year (e.g. 5749)
1383
- * * `options.isHebrewYear` - to interpret `year` as Hebrew year
1384
- * * `options.numYears` - generate calendar for multiple years (default 1)
1385
- * * `options.month` - Gregorian or Hebrew month (to filter results to a single month)
1386
- *
1387
- * Alternatively, specify start and end days with `Date` or {@link HDate} instances:
1388
- * * `options.start` - use specific start date (requires `end` date)
1389
- * * `options.end` - use specific end date (requires `start` date)
1390
- *
1391
- * Unless `options.noHolidays == true`, default holidays include:
1392
- * * Major holidays - Rosh Hashana, Yom Kippur, Pesach, Sukkot, etc.
1393
- * * Minor holidays - Purim, Chanukah, Tu BiShvat, Lag BaOmer, etc.
1394
- * * Minor fasts - Ta'anit Esther, Tzom Gedaliah, etc. (unless `options.noMinorFast`)
1395
- * * Special Shabbatot - Shabbat Shekalim, Zachor, etc. (unless `options.noSpecialShabbat`)
1396
- * * Modern Holidays - Yom HaShoah, Yom HaAtzma'ut, etc. (unless `options.noModern`)
1397
- * * Rosh Chodesh (unless `options.noRoshChodesh`)
1398
- *
1399
- * Holiday and Torah reading schedules differ between Israel and the Disapora.
1400
- * Set `options.il=true` to use the Israeli schedule.
1401
- *
1402
- * Additional non-default event types can be specified:
1403
- * * Parashat HaShavua - weekly Torah Reading on Saturdays (`options.sedrot`)
1404
- * * Counting of the Omer (`options.omer`)
1405
- * * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
1406
- * * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
1407
- * * Yom Kippur Katan (`options.yomKippurKatan`)
1408
- *
1409
- * Daily Study of texts are supported by the
1410
- * {@link https://github.com/hebcal/hebcal-learning @hebcal/learning} package,
1411
- * for example:
1412
- * * Babylonian Talmud Daf Yomi (`options.dailyLearning.dafYomi`)
1413
- * * Jerusalem Talmud (Yerushalmi) Yomi (`options.dailyLearning.yerushalmi`)
1414
- * * Mishna Yomi (`options.dailyLearning.mishnaYomi`)
1415
- * * Nach Yomi (`options.dailyLearning.nachYomi`)
1416
- *
1417
- * Candle-lighting and Havdalah times are approximated using latitude and longitude
1418
- * specified by the {@link Location} class. The `Location` class contains a small
1419
- * database of cities with their associated geographic information and time-zone information.
1420
- * If you ever have any doubts about Hebcal's times, consult your local halachic authority.
1421
- * If you enter geographic coordinates above the arctic circle or antarctic circle,
1422
- * the times are guaranteed to be wrong.
1423
- *
1424
- * To add candle-lighting options, set `options.candlelighting=true` and set
1425
- * `options.location` to an instance of `Location`. By default, candle lighting
1426
- * time is 18 minutes before sundown (40 minutes for Jerusalem,
1427
- * 30 minutes for Haifa and Zikhron Ya'akov) and Havdalah is
1428
- * calculated according to Tzeit Hakochavim - Nightfall (the point when 3 small stars
1429
- * are observable in the night time sky with the naked eye). The default Havdalah
1430
- * option (Tzeit Hakochavim) is calculated when the sun is 8.5° below the horizon.
1431
- * These defaults can be changed using these options:
1432
- * * `options.candleLightingMins` - minutes before sundown to light candles
1433
- * * `options.havdalahMins` - minutes after sundown for Havdalah (typical values are 42, 50, or 72).
1434
- * Havdalah times are suppressed when `options.havdalahMins=0`.
1435
- * * `options.havdalahDeg` - degrees for solar depression for Havdalah.
1436
- * Default is 8.5 degrees for 3 small stars. Use 7.083 degrees for 3 medium-sized stars.
1437
- * Havdalah times are suppressed when `options.havdalahDeg=0`.
1438
- *
1439
- * If both `options.candlelighting=true` and `options.location` is specified,
1440
- * Chanukah candle-lighting times and minor fast start/end times will also be generated.
1441
- * Chanukah candle-lighting is at Bein HaShmashos (13.5 minutes before
1442
- * the sun is 7.083° below the horizon in the evening)
1443
- * on weekdays, at regular candle-lighting time on Fridays, and at regular Havdalah time on
1444
- * Saturday night (see above).
1445
- *
1446
- * Minor fasts begin at Alot HaShachar (sun is 16.1° below the horizon in the morning) and
1447
- * end when 3 medium-sized stars are observable in the night sky (sun is 7.083° below the horizon
1448
- * in the evening).
1449
- *
1450
- * Two options also exist for generating an Event with the Hebrew date:
1451
- * * `options.addHebrewDates` - print the Hebrew date for the entire date range
1452
- * * `options.addHebrewDatesForEvents` - print the Hebrew date for dates with some events
1453
- *
1454
- * Lastly, translation and transliteration of event titles is controlled by
1455
- * `options.locale` and the {@link Locale} API.
1456
- * `@hebcal/core` supports three locales by default:
1457
- * * `en` - default, Sephardic transliterations (e.g. "Shabbat")
1458
- * * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
1459
- * * `he` - Hebrew (e.g. "שַׁבָּת")
1460
- *
1461
- * Additional locales (such as `ru` or `fr`) are supported by the
1462
- * {@link https://github.com/hebcal/hebcal-locales @hebcal/locales} package
1463
- *
1464
- * @example
1465
- * import {HebrewCalendar, HDate, Location, Event} from '@hebcal/core';
1466
- * const options: CalOptions = {
1467
- * year: 1981,
1468
- * isHebrewYear: false,
1469
- * candlelighting: true,
1470
- * location: Location.lookup('San Francisco'),
1471
- * sedrot: true,
1472
- * omer: true,
1473
- * };
1474
- * const events = HebrewCalendar.calendar(options);
1475
- * for (const ev of events) {
1476
- * const hd = ev.getDate();
1477
- * const date = hd.greg();
1478
- * console.log(date.toLocaleDateString(), ev.render('en'), hd.toString());
1479
- * }
1480
- */
1481
- static calendar(options?: CalOptions): Event[];
1482
- /**
1483
- * Calculates a birthday or anniversary (non-yahrzeit).
1484
- * `hyear` must be after original `gdate` of anniversary.
1485
- * Returns `undefined` when requested year preceeds or is same as original year.
1486
- *
1487
- * Hebcal uses the algorithm defined in "Calendrical Calculations"
1488
- * by Edward M. Reingold and Nachum Dershowitz.
1489
- *
1490
- * The birthday of someone born in Adar of an ordinary year or Adar II of
1491
- * a leap year is also always in the last month of the year, be that Adar
1492
- * or Adar II. The birthday in an ordinary year of someone born during the
1493
- * first 29 days of Adar I in a leap year is on the corresponding day of Adar;
1494
- * in a leap year, the birthday occurs in Adar I, as expected.
1495
- *
1496
- * Someone born on the thirtieth day of Marcheshvan, Kislev, or Adar I
1497
- * has his birthday postponed until the first of the following month in
1498
- * years where that day does not occur. [Calendrical Calculations p. 111]
1499
- * @example
1500
- * import {HebrewCalendar} from '@hebcal/core';
1501
- * const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'
1502
- * const hd = HebrewCalendar.getBirthdayOrAnniversary(5780, dt); // '1 Nisan 5780'
1503
- * console.log(hd.greg().toLocaleDateString('en-US')); // '3/26/2020'
1504
- * @param hyear Hebrew year
1505
- * @param gdate Gregorian or Hebrew date of event
1506
- * @returns anniversary occurring in `hyear`
1507
- */
1508
- static getBirthdayOrAnniversary(hyear: number, gdate: Date | HDate): HDate | undefined;
1509
- /**
1510
- * Calculates yahrzeit.
1511
- * `hyear` must be after original `gdate` of death.
1512
- * Returns `undefined` when requested year preceeds or is same as original year.
1513
- *
1514
- * Hebcal uses the algorithm defined in "Calendrical Calculations"
1515
- * by Edward M. Reingold and Nachum Dershowitz.
1516
- *
1517
- * The customary anniversary date of a death is more complicated and depends
1518
- * also on the character of the year in which the first anniversary occurs.
1519
- * There are several cases:
1520
- *
1521
- * * If the date of death is Marcheshvan 30, the anniversary in general depends
1522
- * on the first anniversary; if that first anniversary was not Marcheshvan 30,
1523
- * use the day before Kislev 1.
1524
- * * If the date of death is Kislev 30, the anniversary in general again depends
1525
- * on the first anniversary — if that was not Kislev 30, use the day before
1526
- * Tevet 1.
1527
- * * If the date of death is Adar II, the anniversary is the same day in the
1528
- * last month of the Hebrew year (Adar or Adar II).
1529
- * * If the date of death is Adar I 30, the anniversary in a Hebrew year that
1530
- * is not a leap year (in which Adar only has 29 days) is the last day in
1531
- * Shevat.
1532
- * * In all other cases, use the normal (that is, same month number) anniversary
1533
- * of the date of death. [Calendrical Calculations p. 113]
1534
- * @example
1535
- * import {HebrewCalendar} from '@hebcal/core';
1536
- * const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'
1537
- * const hd = HebrewCalendar.getYahrzeit(5780, dt); // '30 Sh\'vat 5780'
1538
- * console.log(hd.greg().toLocaleDateString('en-US')); // '2/25/2020'
1539
- * @param hyear Hebrew year
1540
- * @param gdate Gregorian or Hebrew date of death
1541
- * @returns anniversary occurring in hyear
1542
- */
1543
- static getYahrzeit(hyear: number, gdate: Date | HDate): HDate | undefined;
1544
- /**
1545
- * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
1546
- * `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`
1547
- * or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme.
1548
- * @param year Hebrew year
1549
- */
1550
- static getHolidaysForYear(year: number): HolidayYearMap;
1551
- /**
1552
- * Returns an array of holidays for the year
1553
- * @param year Hebrew year
1554
- * @param il use the Israeli schedule for holidays
1555
- */
1556
- static getHolidaysForYearArray(year: number, il: boolean): HolidayEvent[];
1557
- /**
1558
- * Returns an array of Events on this date (or `undefined` if no events)
1559
- * @param date Hebrew Date, Gregorian date, or absolute R.D. day number
1560
- * @param [il] use the Israeli schedule for holidays
1561
- */
1562
- static getHolidaysOnDate(date: HDate | Date | number, il?: boolean): HolidayEvent[] | undefined;
1563
- /**
1564
- * Eruv Tavshilin
1565
- */
1566
- static eruvTavshilin(date: Date | HDate, il: boolean): boolean;
1567
- /**
1568
- * Helper function to format a 23-hour (00:00-23:59) time in US format ("8:13pm") or
1569
- * keep as "20:13" for any other locale/country. Uses {@link CalOptions} to determine
1570
- * locale.
1571
- * If `options.hour12` is `false`, locale is ignored and always returns 24-hour time.
1572
- * If `options.hour12` is `true`, locale is ignored and always returns 12-hour time.
1573
- * @param timeStr - original time like "20:30"
1574
- * @param suffix - "p" or "pm" or " P.M.". Add leading space if you want it
1575
- * @param options
1576
- */
1577
- static reformatTimeStr(timeStr: string, suffix: string, options: CalOptions): string;
1578
- static version(): string;
1579
- /**
1580
- * Convenience function to create an instance of `Sedra` or reuse a previously
1581
- * created and cached instance.
1582
- */
1583
- static getSedra(hyear: number, il: boolean): Sedra;
1584
- /**
1585
- * Return a number containing information on what Hallel is said on that day.
1586
- *
1587
- * Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
1588
- * Yom Ha'atzmaut, and Yom Yerushalayim.
1589
- *
1590
- * Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
1591
- *
1592
- * The number is one of the following values:
1593
- *
1594
- * 0 - No Hallel
1595
- * 1 - Half Hallel
1596
- * 2 - Whole Hallel
1597
- */
1598
- static hallel(hdate: HDate, il: boolean): number;
1599
- /**
1600
- * Return details on what Tachanun (or Tzidchatcha on Shabbat) is said on `hdate`.
1601
- *
1602
- * Tachanun is not said on Rosh Chodesh, the month of Nisan, Lag Baomer,
1603
- * Rosh Chodesh Sivan until Isru Chag, Tisha B'av, 15 Av, Erev Rosh Hashanah,
1604
- * Rosh Hashanah, Erev Yom Kippur until after Simchat Torah, Chanukah,
1605
- * Tu B'shvat, Purim and Shushan Purim, and Purim and Shushan Purim Katan.
1606
- *
1607
- * In some congregations Tachanun is not said until from Rosh Chodesh Sivan
1608
- * until 14th Sivan, Sukkot until after Rosh Chodesh Cheshvan, Pesach Sheini,
1609
- * Yom Ha'atzmaut, and Yom Yerushalayim.
1610
- *
1611
- * Tachanun is not said at Mincha on days before it is not said at Shacharit.
1612
- *
1613
- * Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.
1614
- */
1615
- static tachanun(hdate: HDate, il: boolean): TachanunResult;
1616
- }
1617
-
1618
- export { AsaraBTevetEvent, type CalOptions, CandleLightingEvent, DailyLearning, type DailyLearningValue, Event, FastDayEvent, HavdalahEvent, HebrewCalendar, HebrewDateEvent, HolidayEvent, type HolidayYearMap, Location, MevarchimChodeshEvent, Molad, MoladEvent, OmerEvent, ParshaEvent, RoshChodeshEvent, RoshHashanaEvent, Sedra, type SedraResult, type TachanunResult, TimedEvent, Zmanim, flags, getHolidaysOnDate, getSedra, holidayDesc, parshiot, version };