@hebcal/core 5.4.7 → 5.4.9
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/README.md +3 -3735
- package/dist/CalOptions.d.ts +2 -1
- package/dist/DailyLearning.d.ts +3 -6
- package/dist/HebrewDateEvent.d.ts +4 -7
- package/dist/HolidayEvent.d.ts +9 -23
- package/dist/MevarchimChodeshEvent.d.ts +5 -8
- package/dist/ParshaEvent.d.ts +2 -9
- package/dist/TimedEvent.d.ts +5 -12
- package/dist/YomKippurKatanEvent.d.ts +4 -8
- package/dist/bundle.js +1102 -854
- package/dist/bundle.js.map +1 -0
- package/dist/bundle.min.js +3 -2
- package/dist/bundle.min.js.map +1 -0
- package/dist/event.d.ts +34 -24
- package/dist/hallel.d.ts +0 -3
- package/dist/hebcal.d.ts +14 -36
- package/dist/index.cjs +1151 -888
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +1151 -888
- package/dist/index.mjs.map +1 -0
- package/dist/location.d.ts +14 -28
- package/dist/modern.d.ts +2 -4
- package/dist/molad.d.ts +13 -18
- package/dist/omer.d.ts +6 -14
- package/dist/pkgVersion.d.ts +1 -1
- package/dist/reformatTimeStr.d.ts +3 -4
- package/dist/sedra.d.ts +9 -19
- package/dist/zmanim.d.ts +19 -60
- package/package.json +10 -9
- package/dist/core.d.ts +0 -1715
- package/dist/tsdoc-metadata.json +0 -11
package/dist/event.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { HDate } from '@hebcal/hdate';
|
|
2
2
|
import './locale';
|
|
3
3
|
/**
|
|
4
|
-
* Holiday flags for Event
|
|
4
|
+
* Holiday flags for Event. These flags are typically
|
|
5
|
+
* combined using bitwise arithmetic to form a mask.
|
|
5
6
|
* @readonly
|
|
6
7
|
* @enum {number}
|
|
7
8
|
*/
|
|
@@ -61,35 +62,54 @@ export declare const flags: {
|
|
|
61
62
|
/** Daily Learning */
|
|
62
63
|
DAILY_LEARNING: number;
|
|
63
64
|
};
|
|
64
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Represents an Event with a title, date, and flags.
|
|
67
|
+
*
|
|
68
|
+
* Events are used to represent holidays, candle-lighting times,
|
|
69
|
+
* Torah readings, and more.
|
|
70
|
+
*
|
|
71
|
+
* To get the title of the event a language other than English
|
|
72
|
+
* with Sephardic transliterations, use the `render()` method.
|
|
73
|
+
*/
|
|
65
74
|
export declare class Event {
|
|
75
|
+
/** Hebrew date of this event */
|
|
66
76
|
readonly date: HDate;
|
|
77
|
+
/**
|
|
78
|
+
* Untranslated title of this event. Note that these description
|
|
79
|
+
* strings are always in English and will remain stable across releases.
|
|
80
|
+
* To get the title of the event in another language, use the
|
|
81
|
+
* `render()` method.
|
|
82
|
+
*/
|
|
67
83
|
readonly desc: string;
|
|
84
|
+
/** Bitmask of optional event flags. See {@link flags} */
|
|
68
85
|
readonly mask: number;
|
|
86
|
+
/** Optional emoji character such as ✡️, 🕯️, 🕎, 🕍, 🌒 */
|
|
69
87
|
emoji?: string;
|
|
88
|
+
/** Optional longer description or memo text */
|
|
70
89
|
memo?: string;
|
|
90
|
+
/** Alarms are used by iCalendar feeds */
|
|
71
91
|
alarm?: Date | string | boolean;
|
|
72
92
|
/**
|
|
73
93
|
* Constructs Event
|
|
74
|
-
* @param
|
|
75
|
-
* @param
|
|
76
|
-
* @param
|
|
77
|
-
* @param
|
|
94
|
+
* @param date Hebrew date event occurs
|
|
95
|
+
* @param desc Description (not translated)
|
|
96
|
+
* @param [mask=0] optional bitmask of holiday flags (see {@link flags})
|
|
97
|
+
* @param [attrs={}] optional additional attributes (e.g. `eventTimeStr`, `cholHaMoedDay`)
|
|
78
98
|
*/
|
|
79
99
|
constructor(date: HDate, desc: string, mask?: number, attrs?: object);
|
|
80
100
|
/**
|
|
81
101
|
* Hebrew date of this event
|
|
82
|
-
* @return {HDate}
|
|
83
102
|
*/
|
|
84
103
|
getDate(): HDate;
|
|
85
104
|
/**
|
|
86
|
-
* Untranslated
|
|
87
|
-
*
|
|
105
|
+
* Untranslated title of this event. Note that these description
|
|
106
|
+
* strings are always in English and will remain stable across releases.
|
|
107
|
+
* To get the title of the event in another language, use the
|
|
108
|
+
* `render()` method.
|
|
88
109
|
*/
|
|
89
110
|
getDesc(): string;
|
|
90
111
|
/**
|
|
91
112
|
* Bitmask of optional event flags. See {@link flags}
|
|
92
|
-
* @return {number}
|
|
93
113
|
*/
|
|
94
114
|
getFlags(): number;
|
|
95
115
|
/**
|
|
@@ -99,35 +119,30 @@ export declare class Event {
|
|
|
99
119
|
* ev.render('en'); // 'Shavuot'
|
|
100
120
|
* ev.render('he'); // 'שָׁבוּעוֹת'
|
|
101
121
|
* ev.render('ashkenazi'); // 'Shavuos'
|
|
102
|
-
* @param
|
|
103
|
-
* @return {string}
|
|
122
|
+
* @param [locale] Optional locale name (defaults to active locale).
|
|
104
123
|
*/
|
|
105
124
|
render(locale?: string): string;
|
|
106
125
|
/**
|
|
107
126
|
* Returns a brief (translated) description of this event.
|
|
108
127
|
* For most events, this is the same as render(). For some events, it procudes
|
|
109
128
|
* a shorter text (e.g. without a time or added description).
|
|
110
|
-
* @param
|
|
111
|
-
* @return {string}
|
|
129
|
+
* @param [locale] Optional locale name (defaults to active locale).
|
|
112
130
|
*/
|
|
113
131
|
renderBrief(locale?: string): string;
|
|
114
132
|
/**
|
|
115
133
|
* Optional holiday-specific Emoji or `null`.
|
|
116
|
-
* @return {string | null}
|
|
117
134
|
*/
|
|
118
135
|
getEmoji(): string | null;
|
|
119
136
|
/**
|
|
120
137
|
* Returns a simplified (untranslated) description for this event. For example,
|
|
121
|
-
* the
|
|
138
|
+
* the `HolidayEvent` class supports
|
|
122
139
|
* "Erev Pesach" => "Pesach", and "Sukkot III (CH''M)" => "Sukkot".
|
|
123
140
|
* For many holidays the basename and the event description are the same.
|
|
124
|
-
* @return {string}
|
|
125
141
|
*/
|
|
126
142
|
basename(): string;
|
|
127
143
|
/**
|
|
128
144
|
* Returns a URL to hebcal.com or sefaria.org for more detail on the event.
|
|
129
145
|
* Returns `undefined` for events with no detail page.
|
|
130
|
-
* @return {string | undefined}
|
|
131
146
|
*/
|
|
132
147
|
url(): string | undefined;
|
|
133
148
|
/**
|
|
@@ -137,7 +152,6 @@ export declare class Event {
|
|
|
137
152
|
* ev1.observedInIsrael(); // false
|
|
138
153
|
* const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
|
|
139
154
|
* ev2.observedInIsrael(); // true
|
|
140
|
-
* @return {boolean}
|
|
141
155
|
*/
|
|
142
156
|
observedInIsrael(): boolean;
|
|
143
157
|
/**
|
|
@@ -147,7 +161,6 @@ export declare class Event {
|
|
|
147
161
|
* ev1.observedInDiaspora(); // true
|
|
148
162
|
* const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
|
|
149
163
|
* ev2.observedInDiaspora(); // true
|
|
150
|
-
* @return {boolean}
|
|
151
164
|
*/
|
|
152
165
|
observedInDiaspora(): boolean;
|
|
153
166
|
/**
|
|
@@ -159,18 +172,15 @@ export declare class Event {
|
|
|
159
172
|
* const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
|
|
160
173
|
* ev2.observedIn(false); // true
|
|
161
174
|
* ev2.observedIn(true); // true
|
|
162
|
-
* @param
|
|
163
|
-
* @return {boolean}
|
|
175
|
+
* @param il
|
|
164
176
|
*/
|
|
165
177
|
observedIn(il: boolean): boolean;
|
|
166
178
|
/**
|
|
167
179
|
* Makes a clone of this Event object
|
|
168
|
-
* @return {Event}
|
|
169
180
|
*/
|
|
170
181
|
clone(): Event;
|
|
171
182
|
/**
|
|
172
183
|
* Returns a list of event categories
|
|
173
|
-
* @return {string[]}
|
|
174
184
|
*/
|
|
175
185
|
getCategories(): string[];
|
|
176
186
|
}
|
package/dist/hallel.d.ts
CHANGED
package/dist/hebcal.d.ts
CHANGED
|
@@ -119,8 +119,6 @@ export declare class HebrewCalendar {
|
|
|
119
119
|
* const date = hd.greg();
|
|
120
120
|
* console.log(date.toLocaleDateString(), ev.render('en'), hd.toString());
|
|
121
121
|
* }
|
|
122
|
-
* @param {CalOptions} [options={}]
|
|
123
|
-
* @return {Event[]}
|
|
124
122
|
*/
|
|
125
123
|
static calendar(options?: CalOptions): Event[];
|
|
126
124
|
/**
|
|
@@ -145,9 +143,9 @@ export declare class HebrewCalendar {
|
|
|
145
143
|
* const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'
|
|
146
144
|
* const hd = HebrewCalendar.getBirthdayOrAnniversary(5780, dt); // '1 Nisan 5780'
|
|
147
145
|
* console.log(hd.greg().toLocaleDateString('en-US')); // '3/26/2020'
|
|
148
|
-
* @param
|
|
149
|
-
* @param
|
|
150
|
-
* @
|
|
146
|
+
* @param hyear Hebrew year
|
|
147
|
+
* @param gdate Gregorian or Hebrew date of event
|
|
148
|
+
* @returns anniversary occurring in `hyear`
|
|
151
149
|
*/
|
|
152
150
|
static getBirthdayOrAnniversary(hyear: number, gdate: Date | HDate): HDate | undefined;
|
|
153
151
|
/**
|
|
@@ -180,39 +178,32 @@ export declare class HebrewCalendar {
|
|
|
180
178
|
* const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'
|
|
181
179
|
* const hd = HebrewCalendar.getYahrzeit(5780, dt); // '30 Sh\'vat 5780'
|
|
182
180
|
* console.log(hd.greg().toLocaleDateString('en-US')); // '2/25/2020'
|
|
183
|
-
* @param
|
|
184
|
-
* @param
|
|
185
|
-
* @
|
|
181
|
+
* @param hyear Hebrew year
|
|
182
|
+
* @param gdate Gregorian or Hebrew date of death
|
|
183
|
+
* @returns anniversary occurring in hyear
|
|
186
184
|
*/
|
|
187
185
|
static getYahrzeit(hyear: number, gdate: Date | HDate): HDate | undefined;
|
|
188
186
|
/**
|
|
189
187
|
* Lower-level holidays interface, which returns a `Map` of `Event`s indexed by
|
|
190
188
|
* `HDate.toString()`. These events must filtered especially for `flags.IL_ONLY`
|
|
191
189
|
* or `flags.CHUL_ONLY` depending on Israel vs. Diaspora holiday scheme.
|
|
192
|
-
* @
|
|
193
|
-
* @param {number} year Hebrew year
|
|
194
|
-
* @return {HolidayYearMap}
|
|
190
|
+
* @param year Hebrew year
|
|
195
191
|
*/
|
|
196
192
|
static getHolidaysForYear(year: number): HolidayYearMap;
|
|
197
193
|
/**
|
|
198
194
|
* Returns an array of holidays for the year
|
|
199
|
-
* @param
|
|
200
|
-
* @param
|
|
201
|
-
* @return {HolidayEvent[]}
|
|
195
|
+
* @param year Hebrew year
|
|
196
|
+
* @param il use the Israeli schedule for holidays
|
|
202
197
|
*/
|
|
203
198
|
static getHolidaysForYearArray(year: number, il: boolean): HolidayEvent[];
|
|
204
199
|
/**
|
|
205
200
|
* Returns an array of Events on this date (or `undefined` if no events)
|
|
206
|
-
* @param
|
|
207
|
-
* @param
|
|
208
|
-
* @return {HolidayEvent[] | undefined}
|
|
201
|
+
* @param date Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
202
|
+
* @param [il] use the Israeli schedule for holidays
|
|
209
203
|
*/
|
|
210
204
|
static getHolidaysOnDate(date: HDate | Date | number, il?: boolean): HolidayEvent[] | undefined;
|
|
211
205
|
/**
|
|
212
206
|
* Eruv Tavshilin
|
|
213
|
-
* @param {Date | HDate} date
|
|
214
|
-
* @param {boolean} il
|
|
215
|
-
* @return {boolean}
|
|
216
207
|
*/
|
|
217
208
|
static eruvTavshilin(date: Date | HDate, il: boolean): boolean;
|
|
218
209
|
/**
|
|
@@ -221,21 +212,15 @@ export declare class HebrewCalendar {
|
|
|
221
212
|
* locale.
|
|
222
213
|
* If `options.hour12` is `false`, locale is ignored and always returns 24-hour time.
|
|
223
214
|
* If `options.hour12` is `true`, locale is ignored and always returns 12-hour time.
|
|
224
|
-
* @param
|
|
225
|
-
* @param
|
|
226
|
-
* @param
|
|
227
|
-
* @return {string}
|
|
215
|
+
* @param timeStr - original time like "20:30"
|
|
216
|
+
* @param suffix - "p" or "pm" or " P.M.". Add leading space if you want it
|
|
217
|
+
* @param options
|
|
228
218
|
*/
|
|
229
219
|
static reformatTimeStr(timeStr: string, suffix: string, options: CalOptions): string;
|
|
230
|
-
/** @return {string} */
|
|
231
220
|
static version(): string;
|
|
232
221
|
/**
|
|
233
222
|
* Convenience function to create an instance of `Sedra` or reuse a previously
|
|
234
223
|
* created and cached instance.
|
|
235
|
-
* @function
|
|
236
|
-
* @param {number} hyear
|
|
237
|
-
* @param {boolean} il
|
|
238
|
-
* @return {Sedra}
|
|
239
224
|
*/
|
|
240
225
|
static getSedra(hyear: number, il: boolean): Sedra;
|
|
241
226
|
/**
|
|
@@ -251,10 +236,6 @@ export declare class HebrewCalendar {
|
|
|
251
236
|
* 0 - No Hallel
|
|
252
237
|
* 1 - Half Hallel
|
|
253
238
|
* 2 - Whole Hallel
|
|
254
|
-
*
|
|
255
|
-
* @param {HDate} hdate
|
|
256
|
-
* @param {boolean} il
|
|
257
|
-
* @return {number}
|
|
258
239
|
*/
|
|
259
240
|
static hallel(hdate: HDate, il: boolean): number;
|
|
260
241
|
/**
|
|
@@ -272,9 +253,6 @@ export declare class HebrewCalendar {
|
|
|
272
253
|
* Tachanun is not said at Mincha on days before it is not said at Shacharit.
|
|
273
254
|
*
|
|
274
255
|
* Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.
|
|
275
|
-
* @param {HDate} hdate
|
|
276
|
-
* @param {boolean} il
|
|
277
|
-
* @return {TachanunResult}
|
|
278
256
|
*/
|
|
279
257
|
static tachanun(hdate: HDate, il: boolean): TachanunResult;
|
|
280
258
|
}
|