@hebcal/core 5.3.12 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hebcal.d.ts DELETED
@@ -1,1361 +0,0 @@
1
- declare module '@hebcal/core' {
2
- export const version: string;
3
-
4
- /**
5
- * Represents an Event with a title, date, and flags
6
- */
7
- export class Event {
8
- /**
9
- * Constructs Event
10
- * @param date Hebrew date event occurs
11
- * @param desc Description (not translated)
12
- * @param mask optional holiday flags
13
- * @param attrs
14
- */
15
- constructor(date: HDate, desc: string, mask?: number, attrs?: any);
16
- getFlags(): number;
17
- getDesc(): string;
18
- basename(): string;
19
- url(): string;
20
- getDate(): HDate;
21
- render(locale?: string): string;
22
- renderBrief(locale?: string): string;
23
- getEmoji(): string;
24
- observedInIsrael(): boolean;
25
- observedInDiaspora(): boolean;
26
- observedIn(il: boolean): boolean;
27
- clone(): Event;
28
- getCategories(): string[];
29
- readonly date: HDate;
30
- readonly desc: string;
31
- readonly mask: number;
32
- readonly emoji?: string;
33
- readonly memo?: string;
34
- }
35
-
36
- /**
37
- * Holiday flags for Event
38
- */
39
- export const enum flags {
40
- /** Chag, yontiff, yom tov */
41
- CHAG = 0x000001,
42
- /** Light candles 18 minutes before sundown */
43
- LIGHT_CANDLES = 0x000002,
44
- /** End of holiday (end of Yom Tov) */
45
- YOM_TOV_ENDS = 0x000004,
46
- /** Observed only in the Diaspora (chutz l'aretz) */
47
- CHUL_ONLY = 0x000008,
48
- /** Observed only in Israel */
49
- IL_ONLY = 0x000010,
50
- /** Light candles in the evening at Tzeit time (3 small stars) */
51
- LIGHT_CANDLES_TZEIS = 0x000020,
52
- /** Candle-lighting for Chanukah */
53
- CHANUKAH_CANDLES = 0x000040,
54
- /** Rosh Chodesh, beginning of a new Hebrew month */
55
- ROSH_CHODESH = 0x000080,
56
- /** Minor fasts like Tzom Tammuz, Ta'anit Esther, ... */
57
- MINOR_FAST = 0x000100,
58
- /** Shabbat Shekalim, Zachor, ... */
59
- SPECIAL_SHABBAT = 0x000200,
60
- /** Weekly sedrot on Saturdays */
61
- PARSHA_HASHAVUA = 0x000400,
62
- /** Daily page of Talmud (Bavli) */
63
- DAF_YOMI = 0x000800,
64
- /** Days of the Omer */
65
- OMER_COUNT = 0x001000,
66
- /** Yom HaShoah, Yom HaAtzma'ut, ... */
67
- MODERN_HOLIDAY = 0x002000,
68
- /** Yom Kippur and Tish'a B'Av */
69
- MAJOR_FAST = 0x004000,
70
- /** On the Saturday before Rosh Chodesh */
71
- SHABBAT_MEVARCHIM = 0x008000,
72
- /** Molad */
73
- MOLAD = 0x010000,
74
- /** Yahrzeit or Hebrew Anniversary */
75
- USER_EVENT = 0x020000,
76
- /** Daily Hebrew date ("11th of Sivan, 5780") */
77
- HEBREW_DATE = 0x040000,
78
- /** A holiday that's not major, modern, rosh chodesh, or a fast day */
79
- MINOR_HOLIDAY = 0x080000,
80
- /** Evening before a major or minor holiday */
81
- EREV = 0x100000,
82
- /** Chol haMoed, intermediate days of Pesach or Sukkot */
83
- CHOL_HAMOED = 0x200000,
84
- /** Mishna Yomi */
85
- MISHNA_YOMI = 0x400000,
86
- /** Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh */
87
- YOM_KIPPUR_KATAN = 0x800000,
88
- /** Daily page of Jerusalem Talmud (Yerushalmi) */
89
- YERUSHALMI_YOMI = 0x1000000,
90
- /** Nach Yomi */
91
- NACH_YOMI = 0x2000000,
92
- /** Daily Learning */
93
- DAILY_LEARNING = 0x4000000,
94
- }
95
-
96
- export type UnitTypeShort = 'd' | 'w' | 'M' | 'y';
97
- export type UnitTypeLong = 'day' | 'week' | 'month' | 'year';
98
- export type UnitTypeLongPlural = 'days' | 'weeks' | 'months' | 'years';
99
- export type UnitType = UnitTypeLong | UnitTypeLongPlural | UnitTypeShort;
100
-
101
- /** Class representing a Hebrew date */
102
- export class HDate {
103
- /**
104
- * Create a Hebrew date.
105
- * @param day - Day of month (1-30)
106
- * @param month - Hebrew month of year (1=NISAN, 7=TISHREI)
107
- * @param year - Hebrew year
108
- */
109
- constructor(day?: number | Date | HDate, month?: number | string, year?: number);
110
- /**
111
- * Gets the Hebrew year of this Hebrew date
112
- */
113
- getFullYear(): number;
114
- /**
115
- * Tests if this date occurs during a leap year
116
- */
117
- isLeapYear(): boolean;
118
- /**
119
- * Gets the Hebrew month (1=NISAN, 7=TISHREI) of this Hebrew date
120
- */
121
- getMonth(): number;
122
- /**
123
- * The Tishrei-based month of the date. 1 is Tishrei, 7 is Nisan, 13 is Elul in a leap year
124
- */
125
- getTishreiMonth(): number;
126
- /**
127
- * Number of days in the month of this Hebrew date
128
- */
129
- daysInMonth(): number;
130
- /**
131
- * Gets the day within the month (1-30)
132
- */
133
- getDate(): number;
134
- /**
135
- * Gets the day of the week. 0=Sunday, 6=Saturday
136
- */
137
- getDay(): number;
138
- /**
139
- * Converts to Gregorian date
140
- */
141
- greg(): Date;
142
- /**
143
- * Returns R.D. (Rata Die) fixed days.
144
- * R.D. 1 == Monday, January 1, 1 (Gregorian)
145
- * Note also that R.D. = Julian Date − 1,721,424.5
146
- * https://en.wikipedia.org/wiki/Rata_Die#Dershowitz_and_Reingold
147
- */
148
- abs(): number;
149
- /**
150
- * Returns untranslated Hebrew month name
151
- */
152
- getMonthName(): string;
153
- /**
154
- * Renders this Hebrew date as a translated or transliterated string,
155
- * including ordinal e.g. `'15th of Cheshvan, 5769'`.
156
- * @param [locale] Optional locale name (defaults to active locale).
157
- * @param [showYear] Display year (defaults to `true`).
158
- */
159
- render(locale?: string, showYear?: boolean): string;
160
- /**
161
- * Renders this Hebrew date in Hebrew gematriya, regardless of locale.
162
- * @param [suppressNikud] suppress nekudot (defaults to `false`).
163
- */
164
- renderGematriya(suppressNikud?: boolean): string;
165
-
166
- /**
167
- * Returns an `HDate` representing the a dayNumber before the current date.
168
- * @example
169
- * new HDate(new Date('Wednesday February 19, 2014')).before(6).greg() // Sat Feb 15 2014
170
- * @param {number} day day of week (Sunday=0, Saturday=6)
171
- */
172
- before(day: number): HDate;
173
- /**
174
- * Returns an `HDate` representing the a dayNumber on or before the current date.
175
- * @example
176
- * new HDate(new Date('Wednesday February 19, 2014')).onOrBefore(6).greg() // Sat Feb 15 2014
177
- * new HDate(new Date('Saturday February 22, 2014')).onOrBefore(6).greg() // Sat Feb 22 2014
178
- * new HDate(new Date('Sunday February 23, 2014')).onOrBefore(6).greg() // Sat Feb 22 2014
179
- * @param {number} day day of week (Sunday=0, Saturday=6)
180
- */
181
- onOrBefore(day: number): HDate;
182
- /**
183
- * Returns an `HDate` representing the nearest dayNumber to the current date
184
- * @example
185
- * new HDate(new Date('Wednesday February 19, 2014')).nearest(6).greg() // Sat Feb 22 2014
186
- * new HDate(new Date('Tuesday February 18, 2014')).nearest(6).greg() // Sat Feb 15 2014
187
- * @param {number} day day of week (Sunday=0, Saturday=6)
188
- */
189
- nearest(day: number): HDate;
190
- /**
191
- * Returns an `HDate` representing the a dayNumber on or after the current date.
192
- * @example
193
- * new HDate(new Date('Wednesday February 19, 2014')).onOrAfter(6).greg() // Sat Feb 22 2014
194
- * new HDate(new Date('Saturday February 22, 2014')).onOrAfter(6).greg() // Sat Feb 22 2014
195
- * new HDate(new Date('Sunday February 23, 2014')).onOrAfter(6).greg() // Sat Mar 01 2014
196
- * @param {number} day day of week (Sunday=0, Saturday=6)
197
- */
198
- onOrAfter(day: number): HDate;
199
- /**
200
- * Returns an `HDate` representing the a dayNumber after the current date.
201
- * @example
202
- * new HDate(new Date('Wednesday February 19, 2014')).after(6).greg() // Sat Feb 22 2014
203
- * new HDate(new Date('Saturday February 22, 2014')).after(6).greg() // Sat Mar 01 2014
204
- * new HDate(new Date('Sunday February 23, 2014')).after(6).greg() // Sat Mar 01 2014
205
- * @param {number} day day of week (Sunday=0, Saturday=6)
206
- */
207
- after(day: number): HDate;
208
- /** Returns the next Hebrew date */
209
- next(): HDate;
210
- /** Returns the previous Hebrew date */
211
- prev(): HDate;
212
- /**
213
- * Returns a cloned HDate object with a specified amount of time added
214
- * @param units Units are case insensitive, and support plural and short forms. Note, short forms are case sensitive
215
- */
216
- add(number: number, units?: UnitType): HDate;
217
- /**
218
- * Returns a cloned HDate object with a specified amount of time subtracted
219
- * @param units Units are case insensitive, and support plural and short forms. Note, short forms are case sensitive
220
- */
221
- subtract(number: number, units?: UnitType): HDate;
222
- /**
223
- * Returns the difference in days between the two given HDates.
224
- *
225
- * The result is positive if `this` date is comes chronologically
226
- * after the `other` date, and negative
227
- * if the order of the two dates is reversed.
228
- *
229
- * The result is zero if the two dates are identical.
230
- */
231
- deltaDays(other: HDate): number;
232
-
233
- /**
234
- * Compares this date to another date, returning `true` if the dates match.
235
- */
236
- isSameDate(other: HDate): boolean;
237
-
238
- /**
239
- * Tests if the object is an instance of `HDate`
240
- */
241
- static isHDate(obj: any): boolean;
242
-
243
- /**
244
- * Converts Hebrew date to R.D. (Rata Die) fixed days.
245
- * R.D. 1 is the imaginary date Monday, January 1, 1 on the Gregorian
246
- * Calendar.
247
- * @param year Hebrew year
248
- * @param month Hebrew month of year (1=NISAN, 7=TISHREI)
249
- * @param day Hebrew day of month (1-30)
250
- */
251
- static hebrew2abs(year: number, month: number, day: number): number;
252
-
253
- /**
254
- * Returns true if Hebrew year is a leap year
255
- * @param x - Hebrew year
256
- */
257
- static isLeapYear(x: number): boolean;
258
-
259
- /**
260
- * Number of months in Hebrew year
261
- * @param x - Hebrew year
262
- */
263
- static monthsInYear(x: number): number;
264
-
265
- /**
266
- * Number of days in Hebrew month in a given year
267
- * @param month - Hebrew month (e.g. months.TISHREI)
268
- * @param year - Hebrew year
269
- */
270
- static daysInMonth(month: number, year: number): number;
271
-
272
- /**
273
- * Returns an (untranslated) string name of Hebrew month in year
274
- * @param month - Hebrew month (e.g. months.TISHREI)
275
- * @param year - Hebrew year
276
- */
277
- static getMonthName(month: number, year: number): string;
278
-
279
- /**
280
- * Returns the Hebrew month number
281
- * @param month - A number, or Hebrew month name string
282
- */
283
- static monthNum(month: number | string): number;
284
-
285
- /**
286
- * Days from sunday prior to start of Hebrew calendar to mean
287
- * conjunction of Tishrei in Hebrew YEAR
288
- * @param hYear - Hebrew year
289
- */
290
- static elapsedDays(hYear: number): number;
291
-
292
- /**
293
- * Number of days in the hebrew YEAR
294
- * @param year - Hebrew year
295
- */
296
- static daysInYear(year: number): number;
297
-
298
- /**
299
- * true if Cheshvan is long in Hebrew YEAR
300
- * @param year - Hebrew year
301
- */
302
- static longCheshvan(year: number): boolean;
303
-
304
- /**
305
- * true if Kislev is short in Hebrew YEAR
306
- * @param year - Hebrew year
307
- */
308
- static shortKislev(year: number): boolean;
309
-
310
- /**
311
- * Converts Hebrew month string name to numeric
312
- * @param c - monthName
313
- */
314
- static monthFromName(c: string | number): number;
315
-
316
- /**
317
- * Note: Applying this function to d+6 gives us the DAYNAME on or after an
318
- * absolute day d. Similarly, applying it to d+3 gives the DAYNAME nearest to
319
- * absolute date d, applying it to d-1 gives the DAYNAME previous to absolute
320
- * date d, and applying it to d+7 gives the DAYNAME following absolute date d.
321
- * @param {number} dayOfWeek - Day of Week (0=Sunday, 6=Saturday)
322
- * @param {number} abs - R.D. number of days
323
- */
324
- static dayOnOrBefore(dayOfWeek: number, abs: number): number;
325
-
326
- /**
327
- * Construct a new instance of `HDate` from a Gematriya-formatted string
328
- * @example
329
- * HDate.fromGematriyaString('כ״ז בְּתַמּוּז תשפ״ג') // 27 Tamuz 5783
330
- * HDate.fromGematriyaString('כ׳ סיון תש״ד') // 20 Sivan 5704
331
- * HDate.fromGematriyaString('ה׳ אִיָיר תש״ח') // 5 Iyyar 5708
332
- */
333
- static fromGematriyaString(str: string, currentThousands?: number): HDate;
334
- }
335
-
336
- /**
337
- * A class that contains location information such as latitude and longitude required for astronomical calculations. The
338
- * elevation field may not be used by some calculation engines and would be ignored if set.
339
- *
340
- * @author © Eliyahu Hershfeld 2004 - 2016
341
- * @version 1.1
342
- */
343
- export class GeoLocation {
344
- /**
345
- * GeoLocation constructor with parameters for all required fields.
346
- *
347
- * @param name
348
- * The location name for display use such as "Lakewood, NJ"
349
- * @param latitude
350
- * the latitude in a double format such as 40.095965 for Lakewood, NJ.
351
- * <b>Note: </b> For latitudes south of the equator, a negative value should be used.
352
- * @param longitude
353
- * longitude in a double format such as -74.222130 for Lakewood, NJ.
354
- * <b>Note: </b> For longitudes west of the <a href="http://en.wikipedia.org/wiki/Prime_Meridian">Prime
355
- * Meridian </a> (Greenwich), a negative value should be used.
356
- * @param elevation
357
- * the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating
358
- * sunrise and set.
359
- * @param timeZoneId
360
- * the <code>TimeZone</code> for the location.
361
- */
362
- constructor(name: string | null, latitude: number, longitude: number, elevation: number, timeZoneId: string);
363
- /**
364
- * get the elevation in Meters
365
- * @return {number} Returns the elevation in Meters
366
- */
367
- getElevation(): number;
368
- /**
369
- * set the elevation in Meters <b>above </b> sea level
370
- * @param elevation
371
- * The elevation to set in Meters. An Error will be thrown if the value is a negative.
372
- */
373
- setElevation(elevation: number): void;
374
- setLatitude(latitude: number): void;
375
- getLatitude(): number;
376
- setLongitude(longitude: number): void;
377
- getLongitude(): number;
378
- getLocationName(): string | null;
379
- setLocationName(name: string | null): void;
380
- getTimeZone(): string;
381
- setTimeZone(timeZoneId: string): void;
382
- }
383
-
384
- /**
385
- * A Hebcal location is used for Zmanim and a latitude, longitude, timezone, and more
386
- */
387
- export class Location extends GeoLocation {
388
- /**
389
- * Initialize a Location instance
390
- * @param latitude - Latitude as a decimal, valid range -90 thru +90 (e.g. 41.85003)
391
- * @param longitude - Longitude as a decimal, valid range -180 thru +180 (e.g. -87.65005)
392
- * @param il - in Israel (true) or Diaspora (false)
393
- * @param tzid - Olson timezone ID, e.g. "America/Chicago"
394
- * @param cityName - optional descriptive city name
395
- * @param countryCode - ISO 3166 alpha-2 country code (e.g. "FR")
396
- * @param [geoid] - optional string or numeric geographic ID
397
- * @param [elevation] - in meters (default `0`)
398
- */
399
- constructor(latitude: number, longitude: number, il: boolean, tzid: string, cityName?: string, countryCode?: string, geoid?: string, elevation?: number);
400
- /**
401
- * Creates a location object from one of 60 "classic" Hebcal city names.
402
- * The following city names are supported:
403
- * 'Ashdod', 'Atlanta', 'Austin', 'Baghdad', 'Beer Sheva',
404
- * 'Berlin', 'Baltimore', 'Bogota', 'Boston', 'Budapest',
405
- * 'Buenos Aires', 'Buffalo', 'Chicago', 'Cincinnati', 'Cleveland',
406
- * 'Dallas', 'Denver', 'Detroit', 'Eilat', 'Gibraltar', 'Haifa',
407
- * 'Hawaii', 'Helsinki', 'Houston', 'Jerusalem', 'Johannesburg',
408
- * 'Kiev', 'La Paz', 'Livingston', 'Las Vegas', 'London', 'Los Angeles',
409
- * 'Marseilles', 'Miami', 'Minneapolis', 'Melbourne', 'Mexico City',
410
- * 'Montreal', 'Moscow', 'New York', 'Omaha', 'Ottawa', 'Panama City',
411
- * 'Paris', 'Pawtucket', 'Petach Tikvah', 'Philadelphia', 'Phoenix',
412
- * 'Pittsburgh', 'Providence', 'Portland', 'Saint Louis', 'Saint Petersburg',
413
- * 'San Diego', 'San Francisco', 'Sao Paulo', 'Seattle', 'Sydney',
414
- * 'Tel Aviv', 'Tiberias', 'Toronto', 'Vancouver', 'White Plains',
415
- * 'Washington DC', 'Worcester'
416
- */
417
- static lookup(name: string): Location;
418
- getLatitude(): number;
419
- getLongitude(): number;
420
- getIsrael(): boolean;
421
- getName(): string;
422
- /**
423
- * Returns the location name, up to the first comma
424
- */
425
- getShortName(): string;
426
- getCountryCode(): string;
427
- getGeoId(): string;
428
- getTzid(): string;
429
- /**
430
- * Gets a 24-hour time formatter (e.g. 07:41 or 20:03) for this location
431
- */
432
- getTimeFormatter(): Intl.DateTimeFormat;
433
- /**
434
- * Converts timezone info from Zip-Codes.com to a standard Olson tzid.
435
- * @example
436
- * Location.getUsaTzid('AZ', 7, 'Y') // 'America/Denver'
437
- * @param state two-letter all-caps US state abbreviation like 'CA'
438
- * @param tz positive number, 5=America/New_York, 8=America/Los_Angeles
439
- * @param dst single char 'Y' or 'N'
440
- */
441
- static getUsaTzid(state: string, tz: number, dst: string): string;
442
- /**
443
- * Converts legacy Hebcal timezone to a standard Olson tzid.
444
- * @param tz integer, GMT offset in hours
445
- * @param dst 'none', 'eu', 'usa', or 'israel'
446
- */
447
- static legacyTzToTzid(tz: number, dst: string): string;
448
- /**
449
- * Adds a location name for `Location.lookup()` only if the name isn't
450
- * already being used. Returns `false` if the name is already taken
451
- * and `true` if successfully added.
452
- */
453
- static addLocation(cityName: string, location: Location): boolean;
454
- }
455
-
456
- /**
457
- * Calculate halachic times (zmanim / זְמַנִּים) for a given day and location.
458
- * Calculations are available for tzeit / tzais (nightfall),
459
- * shkiah (sunset) and more.
460
- *
461
- * Zmanim are estimated using an algorithm published by the US National
462
- * Oceanic and Atmospheric Administration. The NOAA solar calculator is
463
- * based on equations from _Astronomical Algorithms_ by Jean Meeus.
464
- */
465
- export class Zmanim {
466
- /**
467
- * Initialize a Zmanim instance
468
- * @param gloc GeoLocation including latitude, longitude, and timezone
469
- * @param date Regular or Hebrew Date. If `date` is a regular `Date`,
470
- * hours, minutes, seconds and milliseconds are ignored
471
- * @param useElevation use elevation for calculations (default `false`).
472
- * If `true`, use elevation to affect the calculation of all sunrise/sunset based
473
- * zmanim. Note: there are some zmanim such as degree-based zmanim that are driven
474
- * by the amount of light in the sky and are not impacted by elevation.
475
- * These zmanim intentionally do not support elevation adjustment.
476
- */
477
- constructor(gloc: GeoLocation, date: Date | HDate, useElevation?: boolean);
478
- /**
479
- * Returns `true` if elevation adjustment is enabled
480
- * for zmanim support elevation adjustment
481
- */
482
- getUseElevation(): boolean;
483
- /**
484
- * Enables or disables elevation adjustment for zmanim support elevation adjustment
485
- */
486
- setUseElevation(useElevation: boolean): void;
487
-
488
- /**
489
- * Returns a string like "2022-04-01T13:06:00-11:00"
490
- */
491
- static formatISOWithTimeZone(tzid: string, date: Date): string;
492
- /**
493
- * Uses timeFormat to return a date like '20:34'
494
- */
495
- static formatTime(dt: Date, timeFormat: Intl.DateTimeFormat): string;
496
- /**
497
- * Discards seconds, rounding to nearest minute.
498
- */
499
- static roundTime(dt: Date): Date;
500
- /**
501
- * Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
502
- */
503
- static timeZoneOffset(tzid: string, date: Date): string;
504
-
505
- /**
506
- * Convenience function to get the time when sun is above or below the
507
- * horizon for a certain angle (in degrees).
508
- */
509
- timeAtAngle(angle: number, rising: boolean): Date;
510
-
511
- /** Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon) */
512
- sunrise(): Date;
513
- /** Same as `sunrise()` but ignores elevation */
514
- seaLevelSunrise(): Date;
515
- /** When the upper edge of the Sun disappears below the horizon (0.833° below horizon) */
516
- sunset(): Date;
517
- /** Same as `sunset()` but ignores elevation */
518
- seaLevelSunset(): Date;
519
- /** Civil dawn; Sun is 6° below the horizon in the morning */
520
- dawn(): Date;
521
- /** Civil dusk; Sun is 6° below the horizon in the evening */
522
- dusk(): Date;
523
- gregEve(): Date;
524
- /** Midday – Chatzot; Sunrise plus 6 halachic hours */
525
- chatzot(): Date;
526
- /** Midnight – Chatzot; Sunset plus 6 halachic hours */
527
- chatzotNight(): Date;
528
- /** Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning */
529
- alotHaShachar(): Date;
530
- /** Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning */
531
- misheyakir(): Date;
532
- /** Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning */
533
- misheyakirMachmir(): Date;
534
- /** Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra */
535
- sofZmanShma(): Date;
536
- /** Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra */
537
- sofZmanTfilla(): Date;
538
- /**
539
- * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
540
- * Based on the opinion of the MGA that the day is calculated from
541
- * dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed
542
- * 72 minutes after sea-level sunset.
543
- */
544
- sofZmanShmaMGA(): Date;
545
- /**
546
- * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
547
- * Based on the opinion of the MGA that the day is calculated from
548
- * dawn to nightfall with both being 16.1° below the horizon.
549
- */
550
- sofZmanShmaMGA16Point1(): Date;
551
- /**
552
- * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
553
- * Based on the opinion of the MGA that the day is calculated from
554
- * dawn to nightfall with both being 19.8° below the horizon.
555
- *
556
- * This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
557
- * around the equinox / equilux which calculates to 19.8° below geometric zenith.
558
- * https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
559
- */
560
- sofZmanShmaMGA19Point8(): Date;
561
- /** Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham */
562
- sofZmanTfillaMGA(): Date;
563
- /**
564
- * Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
565
- * Based on the opinion of the MGA that the day is calculated from
566
- * dawn to nightfall with both being 16.1° below the horizon.
567
- */
568
- sofZmanTfillaMGA16Point1(): Date;
569
- /**
570
- * Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
571
- * Based on the opinion of the MGA that the day is calculated from
572
- * dawn to nightfall with both being 19.8° below the horizon.
573
- *
574
- * This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
575
- * around the equinox / equilux which calculates to 19.8° below geometric zenith.
576
- * https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
577
- */
578
- sofZmanTfillaMGA19Point8(): Date;
579
- /** Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours */
580
- minchaGedola(): Date;
581
- /** Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours */
582
- minchaKetana(): Date;
583
- /** Plag haMincha; Sunrise plus 10.75 halachic hours */
584
- plagHaMincha(): Date;
585
- /**
586
- * @param [angle=8.5] optional time for solar depression.
587
- * Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars.
588
- */
589
- tzeit(angle?: number): Date;
590
- /** Alias for sunrise */
591
- neitzHaChama(): Date;
592
- /** Alias for sunset */
593
- shkiah(): Date;
594
- /**
595
- * Rabbeinu Tam holds that bein hashmashos is a specific time
596
- * between sunset and tzeis hakochavim.
597
- * One opinion on how to calculate this time is that
598
- * it is 13.5 minutes before tzies 7.083
599
- */
600
- beinHaShmashos(): Date;
601
- /**
602
- * Returns sunrise + `offset` minutes (either positive or negative).
603
- * @param offset minutes
604
- * @param roundMinute round time to nearest minute (default true)
605
- * @param forceSeaLevel use sea-level sunrise (default false)
606
- */
607
- sunriseOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
608
- /**
609
- * Returns sunset + `offset` minutes (either positive or negative).
610
- * @param offset minutes
611
- * @param roundMinute round time to nearest minute (default true)
612
- * @param forceSeaLevel use sea-level sunset (default false)
613
- */
614
- sunsetOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
615
- }
616
-
617
- export interface Headers {
618
- 'content-type'?: string;
619
- 'plural-forms'?: string;
620
- }
621
- export interface Translations {
622
- [key: string]: any;
623
- }
624
- export interface LocaleData {
625
- headers: Headers;
626
- translations: Translations;
627
- }
628
-
629
- /**
630
- * A locale in Hebcal is used for translations/transliterations of
631
- * holidays. @hebcal/core supports three locales by default
632
- * * `en` - default, Sephardic transliterations (e.g. "Shabbat")
633
- * * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
634
- * * `he` - Hebrew (e.g. "שַׁבָּת")
635
- */
636
- export class Locale {
637
- /**
638
- * Returns translation only if `locale` offers a non-empty translation for `id`.
639
- * Otherwise, returns `undefined`.
640
- * @param id - Message ID to translate
641
- * @param [locale] - Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
642
- */
643
- static lookupTranslation(id: string, locale?: string): string | undefined;
644
- /**
645
- * By default, if no translation was found, returns `id`.
646
- * @param id - Message ID to translate
647
- * @param [locale] - Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
648
- */
649
- static gettext(id: string, locale?: string): string;
650
- /**
651
- * Register locale translations.
652
- * @param locale - Locale name (i.e.: `'he'`, `'fr'`)
653
- * @param data - parsed data from a `.po` file.
654
- */
655
- static addLocale(locale: string, data: LocaleData): void;
656
- /**
657
- * Adds a translation to `locale`, replacing any previous translation.
658
- * @param locale - Locale name (i.e: `'he'`, `'fr'`).
659
- * @param id - Message ID to translate
660
- * @param translation - Translation text
661
- */
662
- static addTranslation(locale: string, id: string, translation: string | string[]): void;
663
- /**
664
- * Adds multiple translations to `locale`, replacing any previous translations.
665
- * @param locale - Locale name (i.e: `'he'`, `'fr'`).
666
- * @param data - parsed data from a `.po` file.
667
- */
668
- static addTranslations(locale: string, data: LocaleData): void;
669
- /**
670
- * Activates a locale. Throws an error if the locale has not been previously added.
671
- * After setting the locale to be used, all strings marked for translations
672
- * will be represented by the corresponding translation in the specified locale.
673
- * @param locale - Locale name (i.e: `'he'`, `'fr'`)
674
- */
675
- static useLocale(locale: string): LocaleData;
676
- /**
677
- * Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
678
- */
679
- static getLocaleName(): string;
680
- static getLocaleNames(): string[];
681
- static ordinal(n: number, locale?: string): string;
682
- /**
683
- * Removes nekudot from Hebrew string
684
- */
685
- static hebrewStripNikkud(str: string): string;
686
- }
687
-
688
- export interface DailyLearningOptions {
689
- [key: string]: any;
690
- }
691
-
692
- /**
693
- * Options to configure which events are returned
694
- */
695
- export type CalOptions = {
696
- /** latitude/longitude/tzid used for candle-lighting */
697
- location?: Location;
698
- /** Gregorian or Hebrew year */
699
- year?: number;
700
- /** to interpret year as Hebrew year */
701
- isHebrewYear?: boolean;
702
- /** Gregorian or Hebrew month (to filter results to a single month) */
703
- month?: number;
704
- /** generate calendar for multiple years (default 1) */
705
- numYears?: number;
706
- /** use specific start date (requires end date) */
707
- start?: Date | HDate | number;
708
- /** use specific end date (requires start date) */
709
- end?: Date | HDate | number;
710
- /** calculate candle-lighting and havdalah times */
711
- candlelighting?: boolean;
712
- /** minutes before sundown to light candles (default 18) */
713
- candleLightingMins?: number;
714
- /**
715
- * minutes after sundown for Havdalah (typical values are 42, 50, or 72).
716
- * If `undefined` (the default), calculate Havdalah according to Tzeit Hakochavim -
717
- * Nightfall (the point when 3 small stars are observable in the night time sky with
718
- * the naked eye). If `0`, Havdalah times are suppressed.
719
- */
720
- havdalahMins?: number;
721
- /**
722
- * degrees for solar depression for Havdalah.
723
- * Default is 8.5 degrees for 3 small stars.
724
- * Use 7.083 degrees for 3 medium-sized stars (as observed by Dr. Baruch
725
- * (Berthold) Cohn in his luach published in France in 1899).
726
- * Havdalah times are suppressed when `havdalahDeg=0`.
727
- */
728
- havdalahDeg?: number;
729
- /**
730
- * fastEndDeg - degrees for solar depression for end of fast days.
731
- * Default is 7.083 degrees for 3 medium-sized stars. Another
732
- * commonly-used value is 6.45 degrees, as calculated by Rabbi
733
- * Yechiel Michel Tucazinsky.
734
- */
735
- fastEndDeg?: number;
736
- /**
737
- * useElevation - use elevation for calculations (default `false`).
738
- * If `true`, use elevation to affect the calculation of all sunrise/sunset based zmanim.
739
- * Note: there are some zmanim such as degree-based zmanim that are driven by the amount
740
- * of light in the sky and are not impacted by elevation.
741
- * These zmanim intentionally do not support elevation adjustment.
742
- */
743
- useElevation?: boolean;
744
- /** calculate parashah hashavua on Saturdays */
745
- sedrot?: boolean;
746
- /** Israeli holiday and sedra schedule */
747
- il?: boolean;
748
- /** suppress minor fasts */
749
- noMinorFast?: boolean;
750
- /** suppress modern holidays */
751
- noModern?: boolean;
752
- /** suppress Rosh Chodesh & Shabbat Mevarchim */
753
- noRoshChodesh?: boolean;
754
- shabbatMevarchim?: boolean;
755
- /** suppress Special Shabbat */
756
- noSpecialShabbat?: boolean;
757
- /** suppress regular holidays */
758
- noHolidays?: boolean;
759
- /** include Days of the Omer */
760
- omer?: boolean;
761
- /** include event announcing the molad */
762
- molad?: boolean;
763
- /** use Ashkenazi transliterations for event titles (default Sephardi transliterations) */
764
- ashkenazi?: boolean;
765
- /**
766
- * translate event titles according to a locale
767
- * Default value is `en`, also built-in are `he` and `ashkenazi`.
768
- * Additional locales (such as `ru` or `fr`) are provided by the
769
- * {@link https://github.com/hebcal/hebcal-locales @hebcal/locales} package
770
- */
771
- locale?: string;
772
- /** print the Hebrew date for the entire date range */
773
- addHebrewDates?: boolean;
774
- /** print the Hebrew date for dates with some events */
775
- addHebrewDatesForEvents?: boolean;
776
- /** use bitmask from `flags` to filter events */
777
- mask?: number;
778
- /**
779
- * include Yom Kippur Katan (default `false`).
780
- * יוֹם כִּפּוּר קָטָן is a minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh.
781
- * Yom Kippur Katan is omitted in Elul (on the day before Rosh Hashanah),
782
- * Tishrei (Yom Kippur has just passed), Kislev (due to Chanukah)
783
- * and Nisan (fasting not permitted during Nisan).
784
- * When Rosh Chodesh occurs on Shabbat or Sunday, Yom Kippur Katan is observed on the preceding Thursday.
785
- * @see {@link https://en.wikipedia.org/wiki/Yom_Kippur_Katan#Practices Wikipedia Yom Kippur Katan practices}
786
- */
787
- yomKippurKatan?: boolean;
788
- /**
789
- * Whether to use 12-hour time (as opposed to 24-hour time).
790
- * Possible values are `true` and `false`; the default is locale dependent.
791
- */
792
- hour12?: boolean;
793
- /**
794
- * map of options to enable daily study calendars such as `dafYomi`, `mishnaYomi`,
795
- * `nachYomi`, etc. with value `true`.
796
- * For `yerushalmi` the value should be a `number` for edition (`1` for Vilna, `2` for Schottenstein).
797
- */
798
- dailyLearning?: DailyLearningOptions;
799
- };
800
-
801
- export type TachanunResult = {
802
- /** Tachanun is said at Shacharit */
803
- shacharit: boolean;
804
- /** Tachanun is said at Mincha */
805
- mincha: boolean;
806
- /** All congregations say Tachanun on the day */
807
- allCongs: boolean;
808
- };
809
-
810
- /**
811
- * HebrewCalendar is the main interface to the `@hebcal/core` library.
812
- * This class is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
813
- * Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
814
- * Event names can be rendered in several languges using the `locale` option.
815
- */
816
- export class HebrewCalendar {
817
- /**
818
- * Generates a list of holidays and other hebrew date events based on `options`.
819
- * This is the main interface to the `@hebcal/core` library, and can be used to
820
- * retrieve holidays, rosh chodesh, candle lighting & havdalah times,
821
- * Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
822
- * Event names can be rendered in several languges using the `locale` option.
823
- */
824
- static calendar(options: CalOptions): Event[];
825
-
826
- /**
827
- * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
828
- * `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`
829
- * or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme
830
- * @param year - Hebrew year
831
- */
832
- static getHolidaysForYear(year: number): Map<string, Event[]>;
833
-
834
- /**
835
- * Returns an array of holidays for the year
836
- * @param year - Hebrew year
837
- * @param il - use the Israeli schedule for holidays
838
- */
839
- static getHolidaysForYearArray(year: number, il: boolean): Event[];
840
-
841
- /**
842
- * Returns an array of Events on this date (or undefined if no events)
843
- * @param date - Hebrew Date, Gregorian date, or absolute R.D. day number
844
- * @param il - use the Israeli schedule for holidays
845
- */
846
- static getHolidaysOnDate(date: HDate | Date | number, il?: boolean): Event[] | undefined;
847
-
848
- /**
849
- * Calculates a birthday or anniversary (non-yahrzeit).
850
- * `hyear` must be after original `gdate` of anniversary.
851
- * Returns `undefined` when requested year preceeds or is same as original year.
852
- *
853
- * Hebcal uses the algorithm defined in "Calendrical Calculations"
854
- * by Edward M. Reingold and Nachum Dershowitz.
855
- *
856
- * The birthday of someone born in Adar of an ordinary year or Adar II of
857
- * a leap year is also always in the last month of the year, be that Adar
858
- * or Adar II. The birthday in an ordinary year of someone born during the
859
- * first 29 days of Adar I in a leap year is on the corresponding day of Adar;
860
- * in a leap year, the birthday occurs in Adar I, as expected.
861
- *
862
- * Someone born on the thirtieth day of Marcheshvan, Kislev, or Adar I
863
- * has his birthday postponed until the first of the following month in
864
- * years where that day does not occur. [Calendrical Calculations p. 111]
865
- * @param hyear - Hebrew year
866
- * @param gdate - Gregorian or Hebrew date of event
867
- * @returns anniversary occurring in hyear
868
- */
869
- static getBirthdayOrAnniversary(hyear: number, gdate: Date | HDate): HDate | undefined;
870
-
871
- /**
872
- * Calculates yahrzeit.
873
- * `hyear` must be after original `gdate` of death.
874
- * Returns `undefined` when requested year preceeds or is same as original year.
875
- *
876
- * Hebcal uses the algorithm defined in "Calendrical Calculations"
877
- * by Edward M. Reingold and Nachum Dershowitz.
878
- *
879
- * The customary anniversary date of a death is more complicated and depends
880
- * also on the character of the year in which the first anniversary occurs.
881
- * There are several cases:
882
- *
883
- * * If the date of death is Marcheshvan 30, the anniversary in general depends
884
- * on the first anniversary; if that first anniversary was not Marcheshvan 30,
885
- * use the day before Kislev 1.
886
- * * If the date of death is Kislev 30, the anniversary in general again depends
887
- * on the first anniversary — if that was not Kislev 30, use the day before
888
- * Tevet 1.
889
- * * If the date of death is Adar II, the anniversary is the same day in the
890
- * last month of the Hebrew year (Adar or Adar II).
891
- * * If the date of death is Adar I 30, the anniversary in a Hebrew year that
892
- * is not a leap year (in which Adar only has 29 days) is the last day in
893
- * Shevat.
894
- * * In all other cases, use the normal (that is, same month number) anniversary
895
- * of the date of death. [Calendrical Calculations p. 113]
896
- * @param hyear - Hebrew year
897
- * @param gdate - Gregorian or Hebrew date of death
898
- * @returns anniversary occurring in hyear
899
- */
900
- static getYahrzeit(hyear: number, gdate: Date | HDate): HDate | undefined;
901
-
902
- /**
903
- * Helper function to format a 23-hour (00:00-23:59) time in US format ("8:13pm") or
904
- * keep as "20:13" for any other locale/country. Uses `Options` to determine
905
- * locale.
906
- * @param timeStr - original time like "20:30"
907
- * @param suffix - "p" or "pm" or " P.M.". Add leading space if you want it
908
- * @param options
909
- */
910
- static reformatTimeStr(timeStr: string, suffix: string, options: CalOptions): string;
911
-
912
- static version(): string;
913
-
914
- /**
915
- * Convenience function to create an instance of `Sedra` or reuse a previously
916
- * created and cached instance.
917
- */
918
- static getSedra(hyear: number, il: boolean): Sedra;
919
-
920
- /**
921
- * Return a number containing information on what Hallel is said on that day.
922
- *
923
- * Whole Hallel is said on Chanukah, the first Yom Tov of Pesach, Shavuot, Sukkot,
924
- * Yom Ha'atzmaut, and Yom Yerushalayim.
925
- *
926
- * Half Hallel is said on Rosh Chodesh (not Rosh Hashanah), and the last 6 days of Pesach.
927
- *
928
- * The number is one of the following values:
929
- *
930
- * 0 - No Hallel
931
- * 1 - Half Hallel
932
- * 2 - Whole Hallel
933
- */
934
- static hallel(hdate: HDate, il: boolean): number;
935
-
936
- /**
937
- * Return details on what Tachanun (or Tzidchatcha on Shabbat) is said on `hdate`.
938
- *
939
- * Tachanun is not said on Rosh Chodesh, the month of Nisan, Lag Baomer,
940
- * Rosh Chodesh Sivan until Isru Chag, Tisha B'av, 15 Av, Erev Rosh Hashanah,
941
- * Rosh Hashanah, Erev Yom Kippur until after Simchat Torah, Chanukah,
942
- * Tu B'shvat, Purim and Shushan Purim, and Purim and Shushan Purim Katan.
943
- *
944
- * In some congregations Tachanun is not said until from Rosh Chodesh Sivan
945
- * until 14th Sivan, Sukkot until after Rosh Chodesh Cheshvan, Pesach Sheini,
946
- * Yom Ha'atzmaut, and Yom Yerushalayim.
947
- *
948
- * Tachanun is not said at Mincha on days before it is not said at Shacharit.
949
- *
950
- * Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.
951
- */
952
- static tachanun(hdate: HDate, il: boolean): TachanunResult;
953
- }
954
-
955
- /**
956
- * Represents a molad, the moment when the new moon is "born"
957
- */
958
- export class Molad {
959
- /**
960
- * Calculates the molad for a Hebrew month
961
- */
962
- constructor(year: number, month: number);
963
- getYear(): number;
964
- getMonth(): number;
965
- getMonthName(): string;
966
- /**
967
- * @return Day of Week (0=Sunday, 6=Saturday)
968
- */
969
- getDow(): number;
970
- /**
971
- * @return hour of day (0-23)
972
- */
973
- getHour(): number;
974
- /**
975
- * @return minutes past hour (0-59)
976
- */
977
- getMinutes(): number;
978
- /**
979
- * @return parts of a minute (0-17)
980
- */
981
- getChalakim(): number;
982
- render(locale?: string, options?: CalOptions): string;
983
- }
984
-
985
- /**
986
- * Gregorian date helper functions.
987
- */
988
- export namespace greg {
989
- /**
990
- * Returns true if the Gregorian year is a leap year
991
- * @param {number} year Gregorian year
992
- * @return {boolean}
993
- */
994
- function isLeapYear(year: number): boolean;
995
- /**
996
- * Number of days in the Gregorian month for given year
997
- * @param {number} month Gregorian month (1=January, 12=December)
998
- * @param {number} year Gregorian year
999
- * @return {number}
1000
- */
1001
- function daysInMonth(month: number, year: number): number;
1002
- /**
1003
- * Returns true if the object is a Javascript Date
1004
- * @param {Object} obj
1005
- * @return {boolean}
1006
- */
1007
- function isDate(obj: any): boolean;
1008
- /**
1009
- * Converts Gregorian date to absolute R.D. (Rata Die) days
1010
- * @param {Date} date Gregorian date
1011
- * @return {number}
1012
- */
1013
- function greg2abs(date: Date): number;
1014
- /**
1015
- * Converts from Rata Die (R.D. number) to Gregorian date.
1016
- * See the footnote on page 384 of ``Calendrical Calculations, Part II:
1017
- * Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
1018
- * Clamen, Software--Practice and Experience, Volume 23, Number 4
1019
- * (April, 1993), pages 383-404 for an explanation.
1020
- * @param {number} abs - R.D. number of days
1021
- * @return {Date}
1022
- */
1023
- function abs2greg(abs: number): Date;
1024
- }
1025
-
1026
- /**
1027
- * Hebrew months of the year (NISAN=1, TISHREI=7)
1028
- */
1029
- export const enum months {
1030
- /**
1031
- * Nissan / ניסן
1032
- */
1033
- NISAN = 1,
1034
- /**
1035
- * Iyyar / אייר
1036
- */
1037
- IYYAR = 2,
1038
- /**
1039
- * Sivan / סיון
1040
- */
1041
- SIVAN = 3,
1042
- /**
1043
- * Tamuz (sometimes Tammuz) / תמוז
1044
- */
1045
- TAMUZ = 4,
1046
- /**
1047
- * Av / אב
1048
- */
1049
- AV = 5,
1050
- /**
1051
- * Elul / אלול
1052
- */
1053
- ELUL = 6,
1054
- /**
1055
- * Tishrei / תִשְׁרֵי
1056
- */
1057
- TISHREI = 7,
1058
- /**
1059
- * Cheshvan / חשון
1060
- */
1061
- CHESHVAN = 8,
1062
- /**
1063
- * Kislev / כסלו
1064
- */
1065
- KISLEV = 9,
1066
- /**
1067
- * Tevet / טבת
1068
- */
1069
- TEVET = 10,
1070
- /**
1071
- * Sh'vat / שבט
1072
- */
1073
- SHVAT = 11,
1074
- /**
1075
- * Adar or Adar Rishon / אדר
1076
- */
1077
- ADAR_I = 12,
1078
- /**
1079
- * Adar Sheini (only on leap years) / אדר ב׳
1080
- */
1081
- ADAR_II = 13
1082
- }
1083
-
1084
- /**
1085
- * The 54 parshiyot of the Torah as transilterated strings
1086
- * parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[53] == 'Ha\'azinu'.
1087
- */
1088
- export const parshiot: string[];
1089
-
1090
- /** The result from `Sedra.lookup()` */
1091
- export type SedraResult = {
1092
- /**
1093
- * Name of the parsha (or parshiyot) read on
1094
- * Hebrew date, e.g. `['Noach']` or `['Matot', 'Masei']`
1095
- */
1096
- parsha: string[];
1097
- /**
1098
- * True if this is a regular parasha HaShavua
1099
- * Torah reading, false if it's a special holiday reading
1100
- */
1101
- chag: boolean;
1102
- /**
1103
- * The parsha number (or numbers) using 1-indexing.
1104
- * A `number` for a regular (single) parsha, and a `number[]`
1105
- * for a doubled parsha.
1106
- * For Parashat *Bereshit*, `num` would be equal to `1`, and for
1107
- * *Matot-Masei* it would be `[42, 43]`
1108
- */
1109
- num: number | number[];
1110
- }
1111
-
1112
- export class Sedra {
1113
- /**
1114
- * Caculates the Parashah HaShavua for an entire Hebrew year
1115
- * @param hebYr - Hebrew year (e.g. 5749)
1116
- * @param il - Use Israel sedra schedule (false for Diaspora)
1117
- */
1118
- constructor(hebYr: number, il: boolean);
1119
- /**
1120
- * Returns the parsha (or parshiyot) read on Hebrew date
1121
- * @param hDate Hebrew date or R.D. days
1122
- */
1123
- get(hDate: HDate | number): string[];
1124
- /**
1125
- * Looks up parsha for the date, then returns a (translated) string
1126
- * @param hDate Hebrew date or R.D. days
1127
- * @param locale Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale
1128
- */
1129
- getString(hDate: HDate | number, locale?: string): string;
1130
- /**
1131
- * Returns an object describing the parsha on the first Saturday on or after absdate
1132
- * @param hDate Hebrew date or R.D. days
1133
- */
1134
- lookup(hDate: HDate | number): SedraResult;
1135
- /**
1136
- * Checks to see if this day would be a regular parasha HaShavua
1137
- * Torah reading or special holiday reading
1138
- * @param hDate Hebrew date or R.D. days
1139
- */
1140
- isParsha(hDate: HDate | number): boolean;
1141
- /**
1142
- * Returns the date that a parsha occurs
1143
- */
1144
- find(parsha: number | string | string[]): HDate;
1145
- getYear(): number;
1146
- getSedraArray(): any[];
1147
- /**
1148
- * R.D. date of the first Saturday on or after Rosh Hashana
1149
- */
1150
- getFirstSaturday(): number;
1151
- }
1152
-
1153
- /**
1154
- * An event that has an `eventTime` and `eventTimeStr`
1155
- * @param desc - Description (not translated)
1156
- */
1157
- export class TimedEvent extends Event {
1158
- constructor(date: HDate, desc: string, mask: number, eventTime: Date, location: Location, linkedEvent?: Event, options?: CalOptions);
1159
- render(locale?: string): string;
1160
- renderBrief(locale?: string): string;
1161
- getCategories(): string[];
1162
- readonly eventTime: Date;
1163
- readonly location: Location;
1164
- readonly eventTimeStr: string;
1165
- readonly linkedEvent?: Event;
1166
- }
1167
- export class CandleLightingEvent extends TimedEvent {
1168
- constructor(date: HDate, mask: number, eventTime: Date, location: Location, linkedEvent?: Event, options?: CalOptions);
1169
- getEmoji(): string;
1170
- }
1171
- export class HavdalahEvent extends TimedEvent {
1172
- constructor(date: HDate, mask: number, eventTime: Date, location: Location, havdalahMins?: number, linkedEvent?: Event, options?: CalOptions);
1173
- render(locale?: string): string;
1174
- renderBrief(locale?: string): string;
1175
- getEmoji(): string;
1176
- readonly havdalahMins?: number;
1177
- }
1178
- export class HebrewDateEvent extends Event {
1179
- constructor(date: HDate, locale?: string);
1180
- render(locale?: string): string;
1181
- renderBrief(locale?: string): string;
1182
- }
1183
- export class HolidayEvent extends Event {
1184
- constructor(date: HDate, desc: string, mask?: number, attrs?: any);
1185
- render(locale?: string): string;
1186
- renderBrief(locale?: string): string;
1187
- basename(): string;
1188
- url(): string;
1189
- urlDateSuffix(): string;
1190
- getEmoji(): string;
1191
- getCategories(): string[];
1192
- readonly cholHaMoedDay?: number;
1193
- readonly startEvent?: TimedEvent;
1194
- readonly endEvent?: TimedEvent;
1195
- }
1196
- export class AsaraBTevetEvent extends HolidayEvent {
1197
- constructor(date: HDate, desc: string, mask?: number);
1198
- urlDateSuffix(): string;
1199
- }
1200
- export class YomKippurKatanEvent extends HolidayEvent {
1201
- constructor(date: HDate, nextMonthName: string);
1202
- render(locale?: string): string;
1203
- renderBrief(locale?: string): string;
1204
- urlDateSuffix(): string;
1205
- }
1206
- export class MevarchimChodeshEvent extends Event {
1207
- constructor(date: HDate, monthName: string);
1208
- render(locale?: string): string;
1209
- renderBrief(locale?: string): string;
1210
- readonly monthName: string;
1211
- }
1212
- export class MoladEvent extends Event {
1213
- constructor(date: HDate, hyear: number, hmonth: number, options?: CalOptions);
1214
- render(locale?: string): string;
1215
- renderBrief(locale?: string): string;
1216
- readonly molad: Molad;
1217
- }
1218
- export type OmerSefiraLang = 'en' | 'he' | 'translit';
1219
- export class OmerEvent extends Event {
1220
- constructor(date: HDate, omerDay: number);
1221
- render(locale?: string): string;
1222
- renderBrief(locale?: string): string;
1223
- getEmoji(): string;
1224
- getWeeks(): number;
1225
- getDaysWithinWeeks(): number;
1226
- getTodayIs(locale?: string): string;
1227
- sefira(lang: OmerSefiraLang): string;
1228
- url(): string;
1229
- readonly weekNumber: number;
1230
- readonly daysWithinWeeks: number;
1231
- readonly memo: string;
1232
- readonly alarm?: Date;
1233
- }
1234
- export class ParshaEvent extends Event {
1235
- constructor(date: HDate, parsha: string[], il: boolean);
1236
- render(locale?: string): string;
1237
- renderBrief(locale?: string): string;
1238
- url(): string;
1239
- readonly parsha: string[];
1240
- readonly il: boolean;
1241
- readonly num: number | number[];
1242
- }
1243
- export class RoshChodeshEvent extends HolidayEvent {
1244
- constructor(date: HDate, monthName: string);
1245
- render(locale?: string): string;
1246
- renderBrief(locale?: string): string;
1247
- basename(): string;
1248
- getEmoji(): string;
1249
- }
1250
- export class RoshHashanaEvent extends HolidayEvent {
1251
- constructor(date: HDate, hyear: number, mask: number);
1252
- render(locale?: string): string;
1253
- }
1254
-
1255
- /**
1256
- * Converts a numerical value to a string of Hebrew letters
1257
- * @example
1258
- * gematriya(5774) // תשע״ד - cropped to 774
1259
- */
1260
- export function gematriya(number: number): string;
1261
-
1262
- /**
1263
- * Converts a string of Hebrew letters to a numerical value.
1264
- *
1265
- * Only considers the value of Hebrew letters `א` through `ת`.
1266
- * Ignores final Hebrew letters such as `ך` (kaf sofit) or `ם` (mem sofit)
1267
- * and vowels (nekudot).
1268
- */
1269
- export function gematriyaStrToNum(str: string): number;
1270
-
1271
- /**
1272
- * Daf Yomi, Mishna Yomi, Nach Yomi, etc.
1273
- */
1274
- export class DailyLearning {
1275
- /**
1276
- * Register a new learning calendar.
1277
- */
1278
- static addCalendar(name: string, calendar: Function): void;
1279
- /**
1280
- * Returns an event from daily calendar for a given date
1281
- */
1282
- static lookup(name: string, hd: HDate): Event;
1283
- }
1284
-
1285
- export declare const holidayDesc: {
1286
- ASARA_BTEVET: string;
1287
- BIRKAT_HACHAMAH: string;
1288
- CHAG_HABANOT: string;
1289
- CHANUKAH_8TH_DAY: string;
1290
- EREV_TISHA_BAV: string;
1291
- LEIL_SELICHOT: string;
1292
- PURIM_KATAN: string;
1293
- PURIM_MESHULASH: string;
1294
- SHABBAT_CHAZON: string;
1295
- SHABBAT_HACHODESH: string;
1296
- SHABBAT_HAGADOL: string;
1297
- SHABBAT_NACHAMU: string;
1298
- SHABBAT_PARAH: string;
1299
- SHABBAT_SHEKALIM: string;
1300
- SHABBAT_SHIRAH: string;
1301
- SHABBAT_SHUVA: string;
1302
- SHABBAT_ZACHOR: string;
1303
- SHUSHAN_PURIM_KATAN: string;
1304
- TAANIT_BECHOROT: string;
1305
- TAANIT_ESTHER: string;
1306
- TISHA_BAV: string;
1307
- TZOM_GEDALIAH: string;
1308
- TZOM_TAMMUZ: string;
1309
- YOM_HAATZMA_UT: string;
1310
- YOM_HASHOAH: string;
1311
- YOM_HAZIKARON: string;
1312
- BEN_GURION_DAY: string;
1313
- CHANUKAH_1_CANDLE: string;
1314
- EREV_PESACH: string;
1315
- EREV_PURIM: string;
1316
- EREV_ROSH_HASHANA: string;
1317
- EREV_SHAVUOT: string;
1318
- EREV_SUKKOT: string;
1319
- EREV_YOM_KIPPUR: string;
1320
- FAMILY_DAY: string;
1321
- HEBREW_LANGUAGE_DAY: string;
1322
- HERZL_DAY: string;
1323
- JABOTINSKY_DAY: string;
1324
- LAG_BAOMER: string;
1325
- PESACH_I: string;
1326
- PESACH_II: string;
1327
- PESACH_III_CHM: string;
1328
- PESACH_II_CHM: string;
1329
- PESACH_IV_CHM: string;
1330
- PESACH_SHENI: string;
1331
- PESACH_VII: string;
1332
- PESACH_VIII: string;
1333
- PESACH_VI_CHM: string;
1334
- PESACH_V_CHM: string;
1335
- PURIM: string;
1336
- ROSH_HASHANA_II: string;
1337
- ROSH_HASHANA_LABEHEMOT: string;
1338
- SHAVUOT: string;
1339
- SHAVUOT_I: string;
1340
- SHAVUOT_II: string;
1341
- SHMINI_ATZERET: string;
1342
- SHUSHAN_PURIM: string;
1343
- SIGD: string;
1344
- SIMCHAT_TORAH: string;
1345
- SUKKOT_I: string;
1346
- SUKKOT_II: string;
1347
- SUKKOT_III_CHM: string;
1348
- SUKKOT_II_CHM: string;
1349
- SUKKOT_IV_CHM: string;
1350
- SUKKOT_VII_HOSHANA_RABA: string;
1351
- SUKKOT_VI_CHM: string;
1352
- SUKKOT_V_CHM: string;
1353
- TU_BAV: string;
1354
- TU_BISHVAT: string;
1355
- YITZHAK_RABIN_MEMORIAL_DAY: string;
1356
- YOM_HAALIYAH: string;
1357
- YOM_HAALIYAH_SCHOOL_OBSERVANCE: string;
1358
- YOM_KIPPUR: string;
1359
- YOM_YERUSHALAYIM: string;
1360
- };
1361
- }