@hebcal/core 5.4.0 → 5.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/candles.d.ts CHANGED
@@ -1,74 +1,28 @@
1
+ import { HDate } from '@hebcal/hdate';
2
+ import { CalOptions } from './CalOptions';
3
+ import { Location } from './location';
4
+ import { Event } from './event';
5
+ import { HolidayEvent } from './HolidayEvent';
6
+ import { TimedEvent } from './TimedEvent';
1
7
  /**
2
8
  * @private
3
- * @param {Event} e
4
- * @param {HDate} hd
5
- * @param {CalOptions} options
6
- * @param {boolean} isFriday
7
- * @param {boolean} isSaturday
8
- * @return {Event}
9
9
  */
10
- export function makeCandleEvent(e: Event, hd: HDate, options: CalOptions, isFriday: boolean, isSaturday: boolean): Event;
10
+ export declare function makeCandleEvent(ev: Event | undefined, hd: HDate, options: CalOptions, isFriday: boolean, isSaturday: boolean): TimedEvent | undefined;
11
11
  /**
12
12
  * Makes a pair of events representing fast start and end times
13
13
  * @private
14
- * @param {Event} ev
15
- * @param {CalOptions} options
16
- * @return {Event}
17
14
  */
18
- export function makeFastStartEnd(ev: Event, options: CalOptions): Event;
15
+ export declare function makeFastStartEnd(ev: HolidayEvent, options: CalOptions): HolidayEvent;
16
+ export declare class TimedChanukahEvent extends HolidayEvent {
17
+ eventTime: Date;
18
+ eventTimeStr: string;
19
+ readonly location: Location;
20
+ constructor(date: HDate, desc: string, mask: number, eventTime: Date, location: Location);
21
+ }
19
22
  /**
20
23
  * Makes a candle-lighting event for Chankah (not on Friday/Saturday).
21
24
  * At one point this used civil dusk (6 degrees below horizon).
22
25
  * Another source suggests 4.6667 degrees below horizon.
23
26
  * @private
24
- * @param {Event} ev
25
- * @param {HDate} hd
26
- * @param {CalOptions} options
27
- * @return {TimedEvent}
28
27
  */
29
- export function makeWeekdayChanukahCandleLighting(ev: Event, hd: HDate, options: CalOptions): TimedEvent;
30
- /** An event that has an `eventTime` and `eventTimeStr` */
31
- export class TimedEvent extends Event {
32
- /**
33
- * @param {HDate} date
34
- * @param {string} desc Description (not translated)
35
- * @param {number} mask
36
- * @param {Date} eventTime
37
- * @param {Location} location
38
- * @param {Event} linkedEvent
39
- * @param {CalOptions} options
40
- */
41
- constructor(date: HDate, desc: string, mask: number, eventTime: Date, location: Location, linkedEvent: Event, options: CalOptions);
42
- eventTime: Date;
43
- location: Location;
44
- eventTimeStr: string;
45
- fmtTime: string;
46
- linkedEvent: Event | undefined;
47
- }
48
- /** Havdalah after Shabbat or holiday */
49
- export class HavdalahEvent extends TimedEvent {
50
- /**
51
- * @param {HDate} date
52
- * @param {number} mask
53
- * @param {Date} eventTime
54
- * @param {Location} location
55
- * @param {number} havdalahMins
56
- * @param {Event} linkedEvent
57
- * @param {CalOptions} options
58
- */
59
- constructor(date: HDate, mask: number, eventTime: Date, location: Location, havdalahMins: number, linkedEvent: Event, options: CalOptions);
60
- havdalahMins: number | undefined;
61
- }
62
- /** Candle lighting before Shabbat or holiday */
63
- export class CandleLightingEvent extends TimedEvent {
64
- /**
65
- * @param {HDate} date
66
- * @param {number} mask
67
- * @param {Date} eventTime
68
- * @param {Location} location
69
- * @param {Event} linkedEvent
70
- * @param {CalOptions} options
71
- */
72
- constructor(date: HDate, mask: number, eventTime: Date, location: Location, linkedEvent: Event, options: CalOptions);
73
- }
74
- import { Event } from './event.js';
28
+ export declare function makeWeekdayChanukahCandleLighting(ev: HolidayEvent, hd: HDate, options: CalOptions): TimedChanukahEvent | null;
package/dist/event.d.ts CHANGED
@@ -1,38 +1,74 @@
1
+ import { HDate } from '@hebcal/hdate';
2
+ import '../src/locale';
1
3
  /**
2
4
  * Holiday flags for Event
5
+ * @readonly
6
+ * @enum {number}
3
7
  */
4
- export type flags = number;
5
- export namespace flags {
6
- let CHAG: number;
7
- let LIGHT_CANDLES: number;
8
- let YOM_TOV_ENDS: number;
9
- let CHUL_ONLY: number;
10
- let IL_ONLY: number;
11
- let LIGHT_CANDLES_TZEIS: number;
12
- let CHANUKAH_CANDLES: number;
13
- let ROSH_CHODESH: number;
14
- let MINOR_FAST: number;
15
- let SPECIAL_SHABBAT: number;
16
- let PARSHA_HASHAVUA: number;
17
- let DAF_YOMI: number;
18
- let OMER_COUNT: number;
19
- let MODERN_HOLIDAY: number;
20
- let MAJOR_FAST: number;
21
- let SHABBAT_MEVARCHIM: number;
22
- let MOLAD: number;
23
- let USER_EVENT: number;
24
- let HEBREW_DATE: number;
25
- let MINOR_HOLIDAY: number;
26
- let EREV: number;
27
- let CHOL_HAMOED: number;
28
- let MISHNA_YOMI: number;
29
- let YOM_KIPPUR_KATAN: number;
30
- let YERUSHALMI_YOMI: number;
31
- let NACH_YOMI: number;
32
- let DAILY_LEARNING: number;
33
- }
8
+ export declare const flags: {
9
+ /** Chag, yontiff, yom tov */
10
+ CHAG: number;
11
+ /** Light candles 18 minutes before sundown */
12
+ LIGHT_CANDLES: number;
13
+ /** End of holiday (end of Yom Tov) */
14
+ YOM_TOV_ENDS: number;
15
+ /** Observed only in the Diaspora (chutz l'aretz) */
16
+ CHUL_ONLY: number;
17
+ /** Observed only in Israel */
18
+ IL_ONLY: number;
19
+ /** Light candles in the evening at Tzeit time (3 small stars) */
20
+ LIGHT_CANDLES_TZEIS: number;
21
+ /** Candle-lighting for Chanukah */
22
+ CHANUKAH_CANDLES: number;
23
+ /** Rosh Chodesh, beginning of a new Hebrew month */
24
+ ROSH_CHODESH: number;
25
+ /** Minor fasts like Tzom Tammuz, Ta'anit Esther, ... */
26
+ MINOR_FAST: number;
27
+ /** Shabbat Shekalim, Zachor, ... */
28
+ SPECIAL_SHABBAT: number;
29
+ /** Weekly sedrot on Saturdays */
30
+ PARSHA_HASHAVUA: number;
31
+ /** Daily page of Talmud (Bavli) */
32
+ DAF_YOMI: number;
33
+ /** Days of the Omer */
34
+ OMER_COUNT: number;
35
+ /** Yom HaShoah, Yom HaAtzma'ut, ... */
36
+ MODERN_HOLIDAY: number;
37
+ /** Yom Kippur and Tish'a B'Av */
38
+ MAJOR_FAST: number;
39
+ /** On the Saturday before Rosh Chodesh */
40
+ SHABBAT_MEVARCHIM: number;
41
+ /** Molad */
42
+ MOLAD: number;
43
+ /** Yahrzeit or Hebrew Anniversary */
44
+ USER_EVENT: number;
45
+ /** Daily Hebrew date ("11th of Sivan, 5780") */
46
+ HEBREW_DATE: number;
47
+ /** A holiday that's not major, modern, rosh chodesh, or a fast day */
48
+ MINOR_HOLIDAY: number;
49
+ /** Evening before a major or minor holiday */
50
+ EREV: number;
51
+ /** Chol haMoed, intermediate days of Pesach or Sukkot */
52
+ CHOL_HAMOED: number;
53
+ /** Mishna Yomi */
54
+ MISHNA_YOMI: number;
55
+ /** Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh */
56
+ YOM_KIPPUR_KATAN: number;
57
+ /** Daily page of Jerusalem Talmud (Yerushalmi) */
58
+ YERUSHALMI_YOMI: number;
59
+ /** Nach Yomi */
60
+ NACH_YOMI: number;
61
+ /** Daily Learning */
62
+ DAILY_LEARNING: number;
63
+ };
34
64
  /** Represents an Event with a title, date, and flags */
35
- export class Event {
65
+ export declare class Event {
66
+ readonly date: HDate;
67
+ readonly desc: string;
68
+ readonly mask: number;
69
+ emoji?: string;
70
+ memo?: string;
71
+ alarm?: Date;
36
72
  /**
37
73
  * Constructs Event
38
74
  * @param {HDate} date Hebrew date event occurs
@@ -40,10 +76,7 @@ export class Event {
40
76
  * @param {number} [mask=0] optional bitmask of holiday flags (see {@link flags})
41
77
  * @param {Object} [attrs={}] optional additional attributes (e.g. `eventTimeStr`, `cholHaMoedDay`)
42
78
  */
43
- constructor(date: HDate, desc: string, mask?: number | undefined, attrs?: Object | undefined);
44
- date: HDate;
45
- desc: string;
46
- mask: number;
79
+ constructor(date: HDate, desc: string, mask?: number, attrs?: object);
47
80
  /**
48
81
  * Hebrew date of this event
49
82
  * @return {HDate}
@@ -69,7 +102,7 @@ export class Event {
69
102
  * @param {string} [locale] Optional locale name (defaults to active locale).
70
103
  * @return {string}
71
104
  */
72
- render(locale?: string | undefined): string;
105
+ render(locale?: string): string;
73
106
  /**
74
107
  * Returns a brief (translated) description of this event.
75
108
  * For most events, this is the same as render(). For some events, it procudes
@@ -77,12 +110,12 @@ export class Event {
77
110
  * @param {string} [locale] Optional locale name (defaults to active locale).
78
111
  * @return {string}
79
112
  */
80
- renderBrief(locale?: string | undefined): string;
113
+ renderBrief(locale?: string): string;
81
114
  /**
82
115
  * Optional holiday-specific Emoji or `null`.
83
- * @return {string}
116
+ * @return {string | null}
84
117
  */
85
- getEmoji(): string;
118
+ getEmoji(): string | null;
86
119
  /**
87
120
  * Returns a simplified (untranslated) description for this event. For example,
88
121
  * the {@link HolidayEvent} class supports
@@ -94,9 +127,9 @@ export class Event {
94
127
  /**
95
128
  * Returns a URL to hebcal.com or sefaria.org for more detail on the event.
96
129
  * Returns `undefined` for events with no detail page.
97
- * @return {string}
130
+ * @return {string | undefined}
98
131
  */
99
- url(): string;
132
+ url(): string | undefined;
100
133
  /**
101
134
  * Is this event observed in Israel?
102
135
  * @example
@@ -141,4 +174,3 @@ export class Event {
141
174
  */
142
175
  getCategories(): string[];
143
176
  }
144
- import { HDate } from '@hebcal/hdate';
@@ -0,0 +1,6 @@
1
+ import { CalOptions } from './CalOptions';
2
+ /**
3
+ * Parse options object to determine start & end days
4
+ * @private
5
+ */
6
+ export declare function getStartAndEnd(options: CalOptions): number[];
package/dist/hallel.d.ts CHANGED
@@ -1,7 +1,9 @@
1
+ import { HDate } from '@hebcal/hdate';
2
+ import { Event } from './event';
1
3
  /**
2
4
  * @private
3
5
  * @param {Event[]} events
4
6
  * @param {HDate} hdate
5
7
  * @return {number}
6
8
  */
7
- export function hallel_(events: Event[], hdate: HDate): number;
9
+ export declare function hallel_(events: Event[], hdate: HDate): number;
package/dist/he.po.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- declare namespace _default {
2
- let headers: {
1
+ declare const _default: {
2
+ headers: {
3
3
  "plural-forms": string;
4
4
  };
5
- let contexts: {
5
+ contexts: {
6
6
  "": {
7
7
  Shabbat: string[];
8
8
  "Daf Yomi": string[];
@@ -102,20 +102,6 @@ declare namespace _default {
102
102
  "Purim Katan": string[];
103
103
  "Rosh Chodesh %s": string[];
104
104
  "Rosh Chodesh": string[];
105
- Adar: string[];
106
- "Adar I": string[];
107
- "Adar II": string[];
108
- Av: string[];
109
- Cheshvan: string[];
110
- Elul: string[];
111
- Iyyar: string[];
112
- Kislev: string[];
113
- Nisan: string[];
114
- "Sh'vat": string[];
115
- Sivan: string[];
116
- Tamuz: string[];
117
- Tevet: string[];
118
- Tishrei: string[];
119
105
  "Rosh Hashana": string[];
120
106
  "Rosh Hashana I": string[];
121
107
  "Rosh Hashana II": string[];
@@ -302,5 +288,5 @@ declare namespace _default {
302
288
  "Pirkei Avot": string[];
303
289
  };
304
290
  };
305
- }
291
+ };
306
292
  export default _default;
package/dist/hebcal.d.ts CHANGED
@@ -1,17 +1,18 @@
1
- /**
2
- * Parse options object to determine start & end days
3
- * @private
4
- * @param {CalOptions} options
5
- * @return {number[]}
6
- */
7
- export function getStartAndEnd(options: CalOptions): number[];
1
+ import { HDate } from '@hebcal/hdate';
2
+ import '../src/locale';
3
+ import { CalOptions } from './CalOptions';
4
+ import { Sedra } from './sedra';
5
+ import { Event } from './event';
6
+ import { HolidayYearMap } from './holidays';
7
+ import { HolidayEvent } from './HolidayEvent';
8
+ import { TachanunResult } from './tachanun';
8
9
  /**
9
10
  * HebrewCalendar is the main interface to the `@hebcal/core` library.
10
11
  * This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
11
12
  * Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
12
13
  * Event names can be rendered in several languges using the `locale` option.
13
14
  */
14
- export class HebrewCalendar {
15
+ export declare class HebrewCalendar {
15
16
  /**
16
17
  * Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
17
18
  *
@@ -104,7 +105,7 @@ export class HebrewCalendar {
104
105
  *
105
106
  * @example
106
107
  * import {HebrewCalendar, HDate, Location, Event} from '@hebcal/core';
107
- * const options = {
108
+ * const options: CalOptions = {
108
109
  * year: 1981,
109
110
  * isHebrewYear: false,
110
111
  * candlelighting: true,
@@ -121,7 +122,7 @@ export class HebrewCalendar {
121
122
  * @param {CalOptions} [options={}]
122
123
  * @return {Event[]}
123
124
  */
124
- static calendar(options?: CalOptions | undefined): Event[];
125
+ static calendar(options?: CalOptions): Event[];
125
126
  /**
126
127
  * Calculates a birthday or anniversary (non-yahrzeit).
127
128
  * `hyear` must be after original `gdate` of anniversary.
@@ -146,9 +147,9 @@ export class HebrewCalendar {
146
147
  * console.log(hd.greg().toLocaleDateString('en-US')); // '3/26/2020'
147
148
  * @param {number} hyear Hebrew year
148
149
  * @param {Date|HDate} gdate Gregorian or Hebrew date of event
149
- * @return {HDate} anniversary occurring in `hyear`
150
+ * @return {HDate | undefined} anniversary occurring in `hyear`
150
151
  */
151
- static getBirthdayOrAnniversary(hyear: number, gdate: Date | HDate): HDate;
152
+ static getBirthdayOrAnniversary(hyear: number, gdate: Date | HDate): HDate | undefined;
152
153
  /**
153
154
  * Calculates yahrzeit.
154
155
  * `hyear` must be after original `gdate` of death.
@@ -181,32 +182,32 @@ export class HebrewCalendar {
181
182
  * console.log(hd.greg().toLocaleDateString('en-US')); // '2/25/2020'
182
183
  * @param {number} hyear Hebrew year
183
184
  * @param {Date|HDate} gdate Gregorian or Hebrew date of death
184
- * @return {HDate} anniversary occurring in hyear
185
+ * @return {HDate | undefined} anniversary occurring in hyear
185
186
  */
186
- static getYahrzeit(hyear: number, gdate: Date | HDate): HDate;
187
+ static getYahrzeit(hyear: number, gdate: Date | HDate): HDate | undefined;
187
188
  /**
188
189
  * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
189
190
  * `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`
190
191
  * or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme.
191
192
  * @function
192
193
  * @param {number} year Hebrew year
193
- * @return {Map<string,Event[]>}
194
+ * @return {HolidayYearMap}
194
195
  */
195
- static getHolidaysForYear(year: number): Map<string, Event[]>;
196
+ static getHolidaysForYear(year: number): HolidayYearMap;
196
197
  /**
197
198
  * Returns an array of holidays for the year
198
199
  * @param {number} year Hebrew year
199
200
  * @param {boolean} il use the Israeli schedule for holidays
200
- * @return {Event[]}
201
+ * @return {HolidayEvent[]}
201
202
  */
202
- static getHolidaysForYearArray(year: number, il: boolean): Event[];
203
+ static getHolidaysForYearArray(year: number, il: boolean): HolidayEvent[];
203
204
  /**
204
205
  * Returns an array of Events on this date (or `undefined` if no events)
205
206
  * @param {HDate|Date|number} date Hebrew Date, Gregorian date, or absolute R.D. day number
206
207
  * @param {boolean} [il] use the Israeli schedule for holidays
207
- * @return {Event[]}
208
+ * @return {HolidayEvent[] | undefined}
208
209
  */
209
- static getHolidaysOnDate(date: HDate | Date | number, il?: boolean | undefined): Event[];
210
+ static getHolidaysOnDate(date: HDate | Date | number, il?: boolean): HolidayEvent[] | undefined;
210
211
  /**
211
212
  * Eruv Tavshilin
212
213
  * @param {Date | HDate} date
@@ -277,175 +278,3 @@ export class HebrewCalendar {
277
278
  */
278
279
  static tachanun(hdate: HDate, il: boolean): TachanunResult;
279
280
  }
280
- /**
281
- * Options to configure which events are returned
282
- */
283
- export type CalOptions = {
284
- /**
285
- * - latitude/longitude/tzid used for candle-lighting
286
- */
287
- location?: Location | undefined;
288
- /**
289
- * - Gregorian or Hebrew year
290
- */
291
- year?: number | undefined;
292
- /**
293
- * - to interpret year as Hebrew year
294
- */
295
- isHebrewYear?: boolean | undefined;
296
- /**
297
- * - Gregorian or Hebrew month (to filter results to a single month)
298
- */
299
- month?: number | undefined;
300
- /**
301
- * - generate calendar for multiple years (default 1)
302
- */
303
- numYears?: number | undefined;
304
- /**
305
- * - use specific start date (requires end date)
306
- */
307
- start?: number | HDate | Date | undefined;
308
- /**
309
- * - use specific end date (requires start date)
310
- */
311
- end?: number | HDate | Date | undefined;
312
- /**
313
- * - calculate candle-lighting and havdalah times
314
- */
315
- candlelighting?: boolean | undefined;
316
- /**
317
- * - minutes before sundown to light candles (default 18)
318
- */
319
- candleLightingMins?: number | undefined;
320
- /**
321
- * - minutes after sundown for Havdalah (typical values are 42, 50, or 72).
322
- * If `undefined` (the default), calculate Havdalah according to Tzeit Hakochavim -
323
- * Nightfall (the point when 3 small stars are observable in the night time sky with
324
- * the naked eye). If `0`, Havdalah times are suppressed.
325
- */
326
- havdalahMins?: number | undefined;
327
- /**
328
- * - degrees for solar depression for Havdalah.
329
- * Default is 8.5 degrees for 3 small stars. use 7.083 degrees for 3 medium-sized stars
330
- * (observed by Dr. Baruch (Berthold) Cohn in his luach published in France in 1899).
331
- * If `0`, Havdalah times are suppressed.
332
- */
333
- havdalahDeg?: number | undefined;
334
- /**
335
- * - degrees for solar depression for end of fast days.
336
- * Default is 7.083 degrees for 3 medium-sized stars. Other commonly-used values include
337
- * 6.45 degrees, as calculated by Rabbi Yechiel Michel Tucazinsky.
338
- */
339
- fastEndDeg?: number | undefined;
340
- /**
341
- * - use elevation for calculations (default `false`).
342
- * If `true`, use elevation to affect the calculation of all sunrise/sunset based zmanim.
343
- * Note: there are some zmanim such as degree-based zmanim that are driven by the amount
344
- * of light in the sky and are not impacted by elevation.
345
- * These zmanim intentionally do not support elevation adjustment.
346
- */
347
- useElevation?: boolean | undefined;
348
- /**
349
- * - calculate parashah hashavua on Saturdays
350
- */
351
- sedrot?: boolean | undefined;
352
- /**
353
- * - Israeli holiday and sedra schedule
354
- */
355
- il?: boolean | undefined;
356
- /**
357
- * - suppress minor fasts
358
- */
359
- noMinorFast?: boolean | undefined;
360
- /**
361
- * - suppress modern holidays
362
- */
363
- noModern?: boolean | undefined;
364
- /**
365
- * - suppress Rosh Chodesh
366
- */
367
- noRoshChodesh?: boolean | undefined;
368
- /**
369
- * - add Shabbat Mevarchim
370
- */
371
- shabbatMevarchim?: boolean | undefined;
372
- /**
373
- * - suppress Special Shabbat
374
- */
375
- noSpecialShabbat?: boolean | undefined;
376
- /**
377
- * - suppress regular holidays
378
- */
379
- noHolidays?: boolean | undefined;
380
- /**
381
- * - include Days of the Omer
382
- */
383
- omer?: boolean | undefined;
384
- /**
385
- * - include event announcing the molad
386
- */
387
- molad?: boolean | undefined;
388
- /**
389
- * - use Ashkenazi transliterations for event titles (default Sephardi transliterations)
390
- */
391
- ashkenazi?: boolean | undefined;
392
- /**
393
- * - translate event titles according to a locale
394
- * Default value is `en`, also built-in are `he` and `ashkenazi`.
395
- * Additional locales (such as `ru` or `fr`) are provided by the
396
- * {@link https://github.com/hebcal/hebcal-locales @hebcal/locales} package
397
- */
398
- locale?: string | undefined;
399
- /**
400
- * - print the Hebrew date for the entire date range
401
- */
402
- addHebrewDates?: boolean | undefined;
403
- /**
404
- * - print the Hebrew date for dates with some events
405
- */
406
- addHebrewDatesForEvents?: boolean | undefined;
407
- /**
408
- * - use bitmask from `flags` to filter events
409
- */
410
- mask?: number | undefined;
411
- /**
412
- * - include Yom Kippur Katan (default `false`).
413
- * יוֹם כִּפּוּר קָטָן is a minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh.
414
- * Yom Kippur Katan is omitted in Elul (on the day before Rosh Hashanah),
415
- * Tishrei (Yom Kippur has just passed), Kislev (due to Chanukah)
416
- * and Nisan (fasting not permitted during Nisan).
417
- * When Rosh Chodesh occurs on Shabbat or Sunday, Yom Kippur Katan is observed on the preceding Thursday.
418
- * See {@link https://en.wikipedia.org/wiki/Yom_Kippur_Katan#Practices Wikipedia Yom Kippur Katan practices}
419
- */
420
- yomKippurKatan?: boolean | undefined;
421
- /**
422
- * - Whether to use 12-hour time (as opposed to 24-hour time).
423
- * Possible values are `true` and `false`; the default is locale dependent.
424
- */
425
- hour12?: boolean | undefined;
426
- /**
427
- * - map of options to enable daily study calendars
428
- * such as `dafYomi`, `mishnaYomi`, `nachYomi` with value `true`. For `yerushalmi`
429
- * the value should be a `number` for edition (`1` for Vilna, `2` for Schottenstein).
430
- */
431
- dailyLearning?: {
432
- [x: string]: any;
433
- } | undefined;
434
- };
435
- export type TachanunResult = {
436
- /**
437
- * Tachanun is said at Shacharit
438
- */
439
- shacharit: boolean;
440
- /**
441
- * Tachanun is said at Mincha
442
- */
443
- mincha: boolean;
444
- /**
445
- * All congregations say Tachanun on the day
446
- */
447
- allCongs: boolean;
448
- };
449
- export type Event = import('./event').Event;
450
- import { HDate } from '@hebcal/hdate';
451
- import { Location } from './location.js';
@@ -1,65 +1,9 @@
1
+ import { HolidayEvent } from './HolidayEvent';
2
+ export type HolidayYearMap = Map<string, HolidayEvent[]>;
1
3
  /**
2
4
  * Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
3
5
  * `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`
4
6
  * or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme.
5
7
  * @private
6
- * @param {number} year Hebrew year
7
- * @return {Map<string,Event[]>}
8
8
  */
9
- export function getHolidaysForYear_(year: number): Map<string, Event[]>;
10
- /** Represents a built-in holiday like Pesach, Purim or Tu BiShvat */
11
- export class HolidayEvent extends Event {
12
- /** @return {string} */
13
- urlDateSuffix(): string;
14
- }
15
- /** Represents Rosh Chodesh, the beginning of a new month */
16
- export class RoshChodeshEvent extends HolidayEvent {
17
- /**
18
- * Constructs Rosh Chodesh event
19
- * @param {HDate} date Hebrew date event occurs
20
- * @param {string} monthName Hebrew month name (not translated)
21
- */
22
- constructor(date: HDate, monthName: string);
23
- }
24
- /**
25
- * Because Asara B'Tevet often occurs twice in the same Gregorian year,
26
- * we subclass HolidayEvent to override the `url()` method.
27
- */
28
- export class AsaraBTevetEvent extends HolidayEvent {
29
- }
30
- /** Represents Mevarchim haChodesh, the announcement of the new month */
31
- export class MevarchimChodeshEvent extends Event {
32
- /**
33
- * Constructs Mevarchim haChodesh event
34
- * @param {HDate} date Hebrew date event occurs
35
- * @param {string} monthName Hebrew month name (not translated)
36
- * @param {string} [memo]
37
- */
38
- constructor(date: HDate, monthName: string, memo?: string | undefined);
39
- monthName: string;
40
- memo: string;
41
- }
42
- /** Represents Rosh Hashana, the Jewish New Year */
43
- export class RoshHashanaEvent extends HolidayEvent {
44
- /**
45
- * @private
46
- * @param {HDate} date Hebrew date event occurs
47
- * @param {number} hyear Hebrew year
48
- * @param {number} mask optional holiday flags
49
- */
50
- private constructor();
51
- hyear: number;
52
- }
53
- /** YKK is minor day of atonement on the day preceeding each Rosh Chodesh */
54
- export class YomKippurKatanEvent extends HolidayEvent {
55
- /**
56
- * @private
57
- * @param {HDate} date Hebrew date event occurs
58
- * @param {string} nextMonthName name of the upcoming month
59
- */
60
- private constructor();
61
- nextMonthName: string;
62
- memo: string;
63
- }
64
- import { Event } from './event.js';
65
- import { HDate } from '@hebcal/hdate';
9
+ export declare function getHolidaysForYear_(year: number): HolidayYearMap;