@hebcal/core 3.33.3 → 3.33.6
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 +342 -353
- package/dist/bundle.js +931 -777
- package/dist/bundle.min.js +2 -2
- package/dist/hdate-bundle.js +429 -266
- package/dist/hdate-bundle.min.js +2 -2
- package/dist/hdate.js +194 -84
- package/dist/hdate.mjs +193 -85
- package/dist/index.js +385 -255
- package/dist/index.mjs +369 -259
- package/hebcal.d.ts +116 -115
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -46,6 +46,19 @@ for (const ev of events) {
|
|
|
46
46
|
## Classes
|
|
47
47
|
|
|
48
48
|
<dl>
|
|
49
|
+
<dt><a href="#greg">greg</a></dt>
|
|
50
|
+
<dd><p>Gregorian date helper functions.</p>
|
|
51
|
+
</dd>
|
|
52
|
+
<dt><a href="#Locale">Locale</a></dt>
|
|
53
|
+
<dd><p>A locale in Hebcal is used for translations/transliterations of
|
|
54
|
+
holidays. <code>@hebcal/core</code> supports four locales by default</p>
|
|
55
|
+
<ul>
|
|
56
|
+
<li><code>en</code> - default, Sephardic transliterations (e.g. "Shabbat")</li>
|
|
57
|
+
<li><code>ashkenazi</code> - Ashkenazi transliterations (e.g. "Shabbos")</li>
|
|
58
|
+
<li><code>he</code> - Hebrew (e.g. "שַׁבָּת")</li>
|
|
59
|
+
<li><code>he-x-NoNikud</code> - Hebrew without nikud (e.g. "שבת")</li>
|
|
60
|
+
</ul>
|
|
61
|
+
</dd>
|
|
49
62
|
<dt><a href="#HDate">HDate</a></dt>
|
|
50
63
|
<dd><p>Represents a Hebrew date</p>
|
|
51
64
|
</dd>
|
|
@@ -111,23 +124,11 @@ each day in order to finish the entire Mishnah in ~6 years.</p>
|
|
|
111
124
|
<dt><a href="#MishnaYomiEvent">MishnaYomiEvent</a></dt>
|
|
112
125
|
<dd><p>Event wrapper around a Mishna Yomi instance</p>
|
|
113
126
|
</dd>
|
|
114
|
-
</
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<
|
|
119
|
-
<dt><a href="#greg">greg</a> : <code>object</code></dt>
|
|
120
|
-
<dd><p>Gregorian date helper functions.</p>
|
|
121
|
-
</dd>
|
|
122
|
-
<dt><a href="#Locale">Locale</a> : <code>object</code></dt>
|
|
123
|
-
<dd><p>A locale in Hebcal is used for translations/transliterations of
|
|
124
|
-
holidays. <code>@hebcal/core</code> supports four locales by default</p>
|
|
125
|
-
<ul>
|
|
126
|
-
<li><code>en</code> - default, Sephardic transliterations (e.g. "Shabbat")</li>
|
|
127
|
-
<li><code>ashkenazi</code> - Ashkenazi transliterations (e.g. "Shabbos")</li>
|
|
128
|
-
<li><code>he</code> - Hebrew (e.g. "שַׁבָּת")</li>
|
|
129
|
-
<li><code>he-x-NoNikud</code> - Hebrew without nikud (e.g. "שבת")</li>
|
|
130
|
-
</ul>
|
|
127
|
+
<dt><a href="#HebrewCalendar">HebrewCalendar</a></dt>
|
|
128
|
+
<dd><p>HebrewCalendar is the main interface to the <code>@hebcal/core</code> library.
|
|
129
|
+
This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
|
|
130
|
+
Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
|
|
131
|
+
Event names can be rendered in several languges using the <code>locale</code> option.</p>
|
|
131
132
|
</dd>
|
|
132
133
|
</dl>
|
|
133
134
|
|
|
@@ -138,12 +139,6 @@ holidays. <code>@hebcal/core</code> supports four locales by default</p>
|
|
|
138
139
|
<dd><p>The 54 parshiyot of the Torah as transilterated strings
|
|
139
140
|
parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[53] == "Ha'Azinu".</p>
|
|
140
141
|
</dd>
|
|
141
|
-
<dt><a href="#HebrewCalendar">HebrewCalendar</a></dt>
|
|
142
|
-
<dd><p>HebrewCalendar is the main interface to the <code>@hebcal/core</code> library.
|
|
143
|
-
This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
|
|
144
|
-
Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
|
|
145
|
-
Event names can be rendered in several languges using the <code>locale</code> option.</p>
|
|
146
|
-
</dd>
|
|
147
142
|
</dl>
|
|
148
143
|
|
|
149
144
|
## Functions
|
|
@@ -165,10 +160,204 @@ we omit the thousands (which is presently 5 [ה]).</p>
|
|
|
165
160
|
<dd><p>Result of Sedra.lookup</p>
|
|
166
161
|
</dd>
|
|
167
162
|
<dt><a href="#MishnaYomi">MishnaYomi</a> : <code>Object</code></dt>
|
|
163
|
+
<dd><p>Describes a mishna to be read</p>
|
|
164
|
+
</dd>
|
|
165
|
+
<dt><a href="#CalOptions">CalOptions</a> : <code>Object</code></dt>
|
|
168
166
|
<dd><p>Options to configure which events are returned</p>
|
|
169
167
|
</dd>
|
|
170
168
|
</dl>
|
|
171
169
|
|
|
170
|
+
<a name="greg"></a>
|
|
171
|
+
|
|
172
|
+
## greg
|
|
173
|
+
Gregorian date helper functions.
|
|
174
|
+
|
|
175
|
+
**Kind**: global class
|
|
176
|
+
|
|
177
|
+
* [greg](#greg)
|
|
178
|
+
* [.isLeapYear(year)](#greg.isLeapYear) ⇒ <code>boolean</code>
|
|
179
|
+
* [.daysInMonth(month, year)](#greg.daysInMonth) ⇒ <code>number</code>
|
|
180
|
+
* [.isDate(obj)](#greg.isDate) ⇒ <code>boolean</code>
|
|
181
|
+
* [.dayOfYear(date)](#greg.dayOfYear) ⇒ <code>number</code>
|
|
182
|
+
* [.greg2abs(date)](#greg.greg2abs) ⇒ <code>number</code>
|
|
183
|
+
* [.abs2greg(theDate)](#greg.abs2greg) ⇒ <code>Date</code>
|
|
184
|
+
|
|
185
|
+
<a name="greg.isLeapYear"></a>
|
|
186
|
+
|
|
187
|
+
### greg.isLeapYear(year) ⇒ <code>boolean</code>
|
|
188
|
+
Returns true if the Gregorian year is a leap year
|
|
189
|
+
|
|
190
|
+
**Kind**: static method of [<code>greg</code>](#greg)
|
|
191
|
+
|
|
192
|
+
| Param | Type | Description |
|
|
193
|
+
| --- | --- | --- |
|
|
194
|
+
| year | <code>number</code> | Gregorian year |
|
|
195
|
+
|
|
196
|
+
<a name="greg.daysInMonth"></a>
|
|
197
|
+
|
|
198
|
+
### greg.daysInMonth(month, year) ⇒ <code>number</code>
|
|
199
|
+
Number of days in the Gregorian month for given year
|
|
200
|
+
|
|
201
|
+
**Kind**: static method of [<code>greg</code>](#greg)
|
|
202
|
+
|
|
203
|
+
| Param | Type | Description |
|
|
204
|
+
| --- | --- | --- |
|
|
205
|
+
| month | <code>number</code> | Gregorian month (1=January, 12=December) |
|
|
206
|
+
| year | <code>number</code> | Gregorian year |
|
|
207
|
+
|
|
208
|
+
<a name="greg.isDate"></a>
|
|
209
|
+
|
|
210
|
+
### greg.isDate(obj) ⇒ <code>boolean</code>
|
|
211
|
+
Returns true if the object is a Javascript Date
|
|
212
|
+
|
|
213
|
+
**Kind**: static method of [<code>greg</code>](#greg)
|
|
214
|
+
|
|
215
|
+
| Param | Type |
|
|
216
|
+
| --- | --- |
|
|
217
|
+
| obj | <code>Object</code> |
|
|
218
|
+
|
|
219
|
+
<a name="greg.dayOfYear"></a>
|
|
220
|
+
|
|
221
|
+
### greg.dayOfYear(date) ⇒ <code>number</code>
|
|
222
|
+
Returns number of days since January 1 of that year
|
|
223
|
+
|
|
224
|
+
**Kind**: static method of [<code>greg</code>](#greg)
|
|
225
|
+
|
|
226
|
+
| Param | Type | Description |
|
|
227
|
+
| --- | --- | --- |
|
|
228
|
+
| date | <code>Date</code> | Gregorian date |
|
|
229
|
+
|
|
230
|
+
<a name="greg.greg2abs"></a>
|
|
231
|
+
|
|
232
|
+
### greg.greg2abs(date) ⇒ <code>number</code>
|
|
233
|
+
Converts Gregorian date to absolute R.D. (Rata Die) days
|
|
234
|
+
|
|
235
|
+
**Kind**: static method of [<code>greg</code>](#greg)
|
|
236
|
+
|
|
237
|
+
| Param | Type | Description |
|
|
238
|
+
| --- | --- | --- |
|
|
239
|
+
| date | <code>Date</code> | Gregorian date |
|
|
240
|
+
|
|
241
|
+
<a name="greg.abs2greg"></a>
|
|
242
|
+
|
|
243
|
+
### greg.abs2greg(theDate) ⇒ <code>Date</code>
|
|
244
|
+
Converts from Rata Die (R.D. number) to Gregorian date.
|
|
245
|
+
See the footnote on page 384 of ``Calendrical Calculations, Part II:
|
|
246
|
+
Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
|
|
247
|
+
Clamen, Software--Practice and Experience, Volume 23, Number 4
|
|
248
|
+
(April, 1993), pages 383-404 for an explanation.
|
|
249
|
+
|
|
250
|
+
**Kind**: static method of [<code>greg</code>](#greg)
|
|
251
|
+
|
|
252
|
+
| Param | Type | Description |
|
|
253
|
+
| --- | --- | --- |
|
|
254
|
+
| theDate | <code>number</code> | R.D. number of days |
|
|
255
|
+
|
|
256
|
+
<a name="Locale"></a>
|
|
257
|
+
|
|
258
|
+
## Locale
|
|
259
|
+
A locale in Hebcal is used for translations/transliterations of
|
|
260
|
+
holidays. `@hebcal/core` supports four locales by default
|
|
261
|
+
* `en` - default, Sephardic transliterations (e.g. "Shabbat")
|
|
262
|
+
* `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
|
|
263
|
+
* `he` - Hebrew (e.g. "שַׁבָּת")
|
|
264
|
+
* `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
|
|
265
|
+
|
|
266
|
+
**Kind**: global class
|
|
267
|
+
|
|
268
|
+
* [Locale](#Locale)
|
|
269
|
+
* [.lookupTranslation(id, [locale])](#Locale.lookupTranslation) ⇒ <code>string</code>
|
|
270
|
+
* [.gettext(id, [locale])](#Locale.gettext) ⇒ <code>string</code>
|
|
271
|
+
* [.addLocale(locale, data)](#Locale.addLocale)
|
|
272
|
+
* [.useLocale(locale)](#Locale.useLocale) ⇒ <code>LocaleData</code>
|
|
273
|
+
* [.getLocaleName()](#Locale.getLocaleName) ⇒ <code>string</code>
|
|
274
|
+
* [.getLocaleNames()](#Locale.getLocaleNames) ⇒ <code>Array.<string></code>
|
|
275
|
+
* [.ordinal(n, [locale])](#Locale.ordinal) ⇒ <code>string</code>
|
|
276
|
+
* [.hebrewStripNikkud(str)](#Locale.hebrewStripNikkud) ⇒ <code>string</code>
|
|
277
|
+
|
|
278
|
+
<a name="Locale.lookupTranslation"></a>
|
|
279
|
+
|
|
280
|
+
### Locale.lookupTranslation(id, [locale]) ⇒ <code>string</code>
|
|
281
|
+
Returns translation only if `locale` offers a non-empty translation for `id`.
|
|
282
|
+
Otherwise, returns `undefined`.
|
|
283
|
+
|
|
284
|
+
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
285
|
+
|
|
286
|
+
| Param | Type | Description |
|
|
287
|
+
| --- | --- | --- |
|
|
288
|
+
| id | <code>string</code> | Message ID to translate |
|
|
289
|
+
| [locale] | <code>string</code> | Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale. |
|
|
290
|
+
|
|
291
|
+
<a name="Locale.gettext"></a>
|
|
292
|
+
|
|
293
|
+
### Locale.gettext(id, [locale]) ⇒ <code>string</code>
|
|
294
|
+
By default, if no translation was found, returns `id`.
|
|
295
|
+
|
|
296
|
+
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
297
|
+
|
|
298
|
+
| Param | Type | Description |
|
|
299
|
+
| --- | --- | --- |
|
|
300
|
+
| id | <code>string</code> | Message ID to translate |
|
|
301
|
+
| [locale] | <code>string</code> | Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale. |
|
|
302
|
+
|
|
303
|
+
<a name="Locale.addLocale"></a>
|
|
304
|
+
|
|
305
|
+
### Locale.addLocale(locale, data)
|
|
306
|
+
Register locale translations.
|
|
307
|
+
|
|
308
|
+
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
309
|
+
|
|
310
|
+
| Param | Type | Description |
|
|
311
|
+
| --- | --- | --- |
|
|
312
|
+
| locale | <code>string</code> | Locale name (i.e.: `'he'`, `'fr'`) |
|
|
313
|
+
| data | <code>LocaleDate</code> | parsed data from a `.po` file. |
|
|
314
|
+
|
|
315
|
+
<a name="Locale.useLocale"></a>
|
|
316
|
+
|
|
317
|
+
### Locale.useLocale(locale) ⇒ <code>LocaleData</code>
|
|
318
|
+
Activates a locale. Throws an error if the locale has not been previously added.
|
|
319
|
+
After setting the locale to be used, all strings marked for translations
|
|
320
|
+
will be represented by the corresponding translation in the specified locale.
|
|
321
|
+
|
|
322
|
+
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
323
|
+
|
|
324
|
+
| Param | Type | Description |
|
|
325
|
+
| --- | --- | --- |
|
|
326
|
+
| locale | <code>string</code> | Locale name (i.e: `'he'`, `'fr'`) |
|
|
327
|
+
|
|
328
|
+
<a name="Locale.getLocaleName"></a>
|
|
329
|
+
|
|
330
|
+
### Locale.getLocaleName() ⇒ <code>string</code>
|
|
331
|
+
Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
|
|
332
|
+
|
|
333
|
+
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
334
|
+
<a name="Locale.getLocaleNames"></a>
|
|
335
|
+
|
|
336
|
+
### Locale.getLocaleNames() ⇒ <code>Array.<string></code>
|
|
337
|
+
Returns the names of registered locales
|
|
338
|
+
|
|
339
|
+
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
340
|
+
<a name="Locale.ordinal"></a>
|
|
341
|
+
|
|
342
|
+
### Locale.ordinal(n, [locale]) ⇒ <code>string</code>
|
|
343
|
+
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
344
|
+
|
|
345
|
+
| Param | Type | Description |
|
|
346
|
+
| --- | --- | --- |
|
|
347
|
+
| n | <code>number</code> | |
|
|
348
|
+
| [locale] | <code>string</code> | Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale. |
|
|
349
|
+
|
|
350
|
+
<a name="Locale.hebrewStripNikkud"></a>
|
|
351
|
+
|
|
352
|
+
### Locale.hebrewStripNikkud(str) ⇒ <code>string</code>
|
|
353
|
+
Removes nekudot from Hebrew string
|
|
354
|
+
|
|
355
|
+
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
356
|
+
|
|
357
|
+
| Param | Type |
|
|
358
|
+
| --- | --- |
|
|
359
|
+
| str | <code>string</code> |
|
|
360
|
+
|
|
172
361
|
<a name="HDate"></a>
|
|
173
362
|
|
|
174
363
|
## HDate
|
|
@@ -347,7 +536,7 @@ Renders this Hebrew date in Hebrew gematriya, regardless of locale.
|
|
|
347
536
|
```js
|
|
348
537
|
import {HDate, months} from '@hebcal/core';
|
|
349
538
|
const hd = new HDate(15, months.CHESHVAN, 5769);
|
|
350
|
-
console.log(
|
|
539
|
+
console.log(hd.renderGematriya()); // 'ט״ו חֶשְׁוָן תשס״ט'
|
|
351
540
|
```
|
|
352
541
|
<a name="HDate+before"></a>
|
|
353
542
|
|
|
@@ -2087,303 +2276,35 @@ Returns Mishna Yomi name (e.g. "Bava Metzia 10:5-6" or "Berakhot 9:5-Peah 1:1").
|
|
|
2087
2276
|
Returns a link to sefaria.org
|
|
2088
2277
|
|
|
2089
2278
|
**Kind**: instance method of [<code>MishnaYomiEvent</code>](#MishnaYomiEvent)
|
|
2090
|
-
<a name="
|
|
2279
|
+
<a name="HebrewCalendar"></a>
|
|
2091
2280
|
|
|
2092
|
-
##
|
|
2093
|
-
|
|
2281
|
+
## HebrewCalendar
|
|
2282
|
+
HebrewCalendar is the main interface to the `@hebcal/core` library.
|
|
2283
|
+
This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
|
|
2284
|
+
Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
|
|
2285
|
+
Event names can be rendered in several languges using the `locale` option.
|
|
2094
2286
|
|
|
2095
|
-
**Kind**: global
|
|
2287
|
+
**Kind**: global class
|
|
2096
2288
|
|
|
2097
|
-
* [
|
|
2098
|
-
* [.
|
|
2099
|
-
* [.
|
|
2100
|
-
* [.
|
|
2101
|
-
* [.
|
|
2102
|
-
* [.
|
|
2103
|
-
* [.
|
|
2104
|
-
* [.
|
|
2289
|
+
* [HebrewCalendar](#HebrewCalendar)
|
|
2290
|
+
* [.calendar([options])](#HebrewCalendar.calendar) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2291
|
+
* [.getBirthdayOrAnniversary(hyear, gdate)](#HebrewCalendar.getBirthdayOrAnniversary) ⇒ [<code>HDate</code>](#HDate)
|
|
2292
|
+
* [.getYahrzeit(hyear, gdate)](#HebrewCalendar.getYahrzeit) ⇒ [<code>HDate</code>](#HDate)
|
|
2293
|
+
* [.getHolidaysForYear(year)](#HebrewCalendar.getHolidaysForYear) ⇒ <code>Map.<string, Array.<Event>></code>
|
|
2294
|
+
* [.getHolidaysForYearArray(year, il)](#HebrewCalendar.getHolidaysForYearArray) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2295
|
+
* [.getHolidaysOnDate(date, [il])](#HebrewCalendar.getHolidaysOnDate) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2296
|
+
* [.reformatTimeStr(timeStr, suffix, options)](#HebrewCalendar.reformatTimeStr) ⇒ <code>string</code>
|
|
2297
|
+
* [.version()](#HebrewCalendar.version) ⇒ <code>string</code>
|
|
2298
|
+
* [.getSedra(hyear, il)](#HebrewCalendar.getSedra) ⇒ [<code>Sedra</code>](#Sedra)
|
|
2105
2299
|
|
|
2106
|
-
<a name="
|
|
2300
|
+
<a name="HebrewCalendar.calendar"></a>
|
|
2107
2301
|
|
|
2108
|
-
###
|
|
2109
|
-
|
|
2302
|
+
### HebrewCalendar.calendar([options]) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2303
|
+
Calculates holidays and other Hebrew calendar events based on [CalOptions](#CalOptions).
|
|
2110
2304
|
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
### greg.isLeapYear(year) ⇒ <code>boolean</code>
|
|
2116
|
-
Returns true if the Gregorian year is a leap year
|
|
2117
|
-
|
|
2118
|
-
**Kind**: static method of [<code>greg</code>](#greg)
|
|
2119
|
-
|
|
2120
|
-
| Param | Type | Description |
|
|
2121
|
-
| --- | --- | --- |
|
|
2122
|
-
| year | <code>number</code> | Gregorian year |
|
|
2123
|
-
|
|
2124
|
-
<a name="greg.daysInMonth"></a>
|
|
2125
|
-
|
|
2126
|
-
### greg.daysInMonth(month, year) ⇒ <code>number</code>
|
|
2127
|
-
Number of days in the Gregorian month for given year
|
|
2128
|
-
|
|
2129
|
-
**Kind**: static method of [<code>greg</code>](#greg)
|
|
2130
|
-
|
|
2131
|
-
| Param | Type | Description |
|
|
2132
|
-
| --- | --- | --- |
|
|
2133
|
-
| month | <code>number</code> | Gregorian month (1=January, 12=December) |
|
|
2134
|
-
| year | <code>number</code> | Gregorian year |
|
|
2135
|
-
|
|
2136
|
-
<a name="greg.isDate"></a>
|
|
2137
|
-
|
|
2138
|
-
### greg.isDate(obj) ⇒ <code>boolean</code>
|
|
2139
|
-
Returns true if the object is a Javascript Date
|
|
2140
|
-
|
|
2141
|
-
**Kind**: static method of [<code>greg</code>](#greg)
|
|
2142
|
-
|
|
2143
|
-
| Param | Type |
|
|
2144
|
-
| --- | --- |
|
|
2145
|
-
| obj | <code>Object</code> |
|
|
2146
|
-
|
|
2147
|
-
<a name="greg.dayOfYear"></a>
|
|
2148
|
-
|
|
2149
|
-
### greg.dayOfYear(date) ⇒ <code>number</code>
|
|
2150
|
-
Returns number of days since January 1 of that year
|
|
2151
|
-
|
|
2152
|
-
**Kind**: static method of [<code>greg</code>](#greg)
|
|
2153
|
-
|
|
2154
|
-
| Param | Type | Description |
|
|
2155
|
-
| --- | --- | --- |
|
|
2156
|
-
| date | <code>Date</code> | Gregorian date |
|
|
2157
|
-
|
|
2158
|
-
<a name="greg.greg2abs"></a>
|
|
2159
|
-
|
|
2160
|
-
### greg.greg2abs(date) ⇒ <code>number</code>
|
|
2161
|
-
Converts Gregorian date to absolute R.D. (Rata Die) days
|
|
2162
|
-
|
|
2163
|
-
**Kind**: static method of [<code>greg</code>](#greg)
|
|
2164
|
-
|
|
2165
|
-
| Param | Type | Description |
|
|
2166
|
-
| --- | --- | --- |
|
|
2167
|
-
| date | <code>Date</code> | Gregorian date |
|
|
2168
|
-
|
|
2169
|
-
<a name="greg.abs2greg"></a>
|
|
2170
|
-
|
|
2171
|
-
### greg.abs2greg(theDate) ⇒ <code>Date</code>
|
|
2172
|
-
Converts from Rata Die (R.D. number) to Gregorian date.
|
|
2173
|
-
See the footnote on page 384 of ``Calendrical Calculations, Part II:
|
|
2174
|
-
Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
|
|
2175
|
-
Clamen, Software--Practice and Experience, Volume 23, Number 4
|
|
2176
|
-
(April, 1993), pages 383-404 for an explanation.
|
|
2177
|
-
|
|
2178
|
-
**Kind**: static method of [<code>greg</code>](#greg)
|
|
2179
|
-
|
|
2180
|
-
| Param | Type | Description |
|
|
2181
|
-
| --- | --- | --- |
|
|
2182
|
-
| theDate | <code>number</code> | R.D. number of days |
|
|
2183
|
-
|
|
2184
|
-
<a name="Locale"></a>
|
|
2185
|
-
|
|
2186
|
-
## Locale : <code>object</code>
|
|
2187
|
-
A locale in Hebcal is used for translations/transliterations of
|
|
2188
|
-
holidays. `@hebcal/core` supports four locales by default
|
|
2189
|
-
* `en` - default, Sephardic transliterations (e.g. "Shabbat")
|
|
2190
|
-
* `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
|
|
2191
|
-
* `he` - Hebrew (e.g. "שַׁבָּת")
|
|
2192
|
-
* `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
|
|
2193
|
-
|
|
2194
|
-
**Kind**: global namespace
|
|
2195
|
-
|
|
2196
|
-
* [Locale](#Locale) : <code>object</code>
|
|
2197
|
-
* [.lookupTranslation(id, [locale])](#Locale.lookupTranslation) ⇒ <code>string</code>
|
|
2198
|
-
* [.gettext(id, [locale])](#Locale.gettext) ⇒ <code>string</code>
|
|
2199
|
-
* [.addLocale(locale, data)](#Locale.addLocale)
|
|
2200
|
-
* [.useLocale(locale)](#Locale.useLocale) ⇒ <code>LocaleData</code>
|
|
2201
|
-
* [.getLocaleName()](#Locale.getLocaleName) ⇒ <code>string</code>
|
|
2202
|
-
* [.getLocaleNames()](#Locale.getLocaleNames) ⇒ <code>Array.<string></code>
|
|
2203
|
-
* [.ordinal(n, [locale])](#Locale.ordinal) ⇒ <code>string</code>
|
|
2204
|
-
* [.hebrewStripNikkud(str)](#Locale.hebrewStripNikkud) ⇒ <code>string</code>
|
|
2205
|
-
|
|
2206
|
-
<a name="Locale.lookupTranslation"></a>
|
|
2207
|
-
|
|
2208
|
-
### Locale.lookupTranslation(id, [locale]) ⇒ <code>string</code>
|
|
2209
|
-
Returns translation only if `locale` offers a non-empty translation for `id`.
|
|
2210
|
-
Otherwise, returns `undefined`.
|
|
2211
|
-
|
|
2212
|
-
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
2213
|
-
|
|
2214
|
-
| Param | Type | Description |
|
|
2215
|
-
| --- | --- | --- |
|
|
2216
|
-
| id | <code>string</code> | Message ID to translate |
|
|
2217
|
-
| [locale] | <code>string</code> | Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale. |
|
|
2218
|
-
|
|
2219
|
-
<a name="Locale.gettext"></a>
|
|
2220
|
-
|
|
2221
|
-
### Locale.gettext(id, [locale]) ⇒ <code>string</code>
|
|
2222
|
-
By default, if no translation was found, returns `id`.
|
|
2223
|
-
|
|
2224
|
-
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
2225
|
-
|
|
2226
|
-
| Param | Type | Description |
|
|
2227
|
-
| --- | --- | --- |
|
|
2228
|
-
| id | <code>string</code> | Message ID to translate |
|
|
2229
|
-
| [locale] | <code>string</code> | Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale. |
|
|
2230
|
-
|
|
2231
|
-
<a name="Locale.addLocale"></a>
|
|
2232
|
-
|
|
2233
|
-
### Locale.addLocale(locale, data)
|
|
2234
|
-
Register locale translations.
|
|
2235
|
-
|
|
2236
|
-
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
2237
|
-
|
|
2238
|
-
| Param | Type | Description |
|
|
2239
|
-
| --- | --- | --- |
|
|
2240
|
-
| locale | <code>string</code> | Locale name (i.e.: `'he'`, `'fr'`) |
|
|
2241
|
-
| data | <code>LocaleDate</code> | parsed data from a `.po` file. |
|
|
2242
|
-
|
|
2243
|
-
<a name="Locale.useLocale"></a>
|
|
2244
|
-
|
|
2245
|
-
### Locale.useLocale(locale) ⇒ <code>LocaleData</code>
|
|
2246
|
-
Activates a locale. Throws an error if the locale has not been previously added.
|
|
2247
|
-
After setting the locale to be used, all strings marked for translations
|
|
2248
|
-
will be represented by the corresponding translation in the specified locale.
|
|
2249
|
-
|
|
2250
|
-
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
2251
|
-
|
|
2252
|
-
| Param | Type | Description |
|
|
2253
|
-
| --- | --- | --- |
|
|
2254
|
-
| locale | <code>string</code> | Locale name (i.e: `'he'`, `'fr'`) |
|
|
2255
|
-
|
|
2256
|
-
<a name="Locale.getLocaleName"></a>
|
|
2257
|
-
|
|
2258
|
-
### Locale.getLocaleName() ⇒ <code>string</code>
|
|
2259
|
-
Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
|
|
2260
|
-
|
|
2261
|
-
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
2262
|
-
<a name="Locale.getLocaleNames"></a>
|
|
2263
|
-
|
|
2264
|
-
### Locale.getLocaleNames() ⇒ <code>Array.<string></code>
|
|
2265
|
-
Returns the names of registered locales
|
|
2266
|
-
|
|
2267
|
-
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
2268
|
-
<a name="Locale.ordinal"></a>
|
|
2269
|
-
|
|
2270
|
-
### Locale.ordinal(n, [locale]) ⇒ <code>string</code>
|
|
2271
|
-
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
2272
|
-
|
|
2273
|
-
| Param | Type | Description |
|
|
2274
|
-
| --- | --- | --- |
|
|
2275
|
-
| n | <code>number</code> | |
|
|
2276
|
-
| [locale] | <code>string</code> | Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale. |
|
|
2277
|
-
|
|
2278
|
-
<a name="Locale.hebrewStripNikkud"></a>
|
|
2279
|
-
|
|
2280
|
-
### Locale.hebrewStripNikkud(str) ⇒ <code>string</code>
|
|
2281
|
-
Removes nekudot from Hebrew string
|
|
2282
|
-
|
|
2283
|
-
**Kind**: static method of [<code>Locale</code>](#Locale)
|
|
2284
|
-
|
|
2285
|
-
| Param | Type |
|
|
2286
|
-
| --- | --- |
|
|
2287
|
-
| str | <code>string</code> |
|
|
2288
|
-
|
|
2289
|
-
<a name="months"></a>
|
|
2290
|
-
|
|
2291
|
-
## months : <code>enum</code>
|
|
2292
|
-
Hebrew months of the year (NISAN=1, TISHREI=7)
|
|
2293
|
-
|
|
2294
|
-
**Kind**: global enum
|
|
2295
|
-
**Read only**: true
|
|
2296
|
-
**Properties**
|
|
2297
|
-
|
|
2298
|
-
| Name | Type | Default | Description |
|
|
2299
|
-
| --- | --- | --- | --- |
|
|
2300
|
-
| NISAN | <code>number</code> | <code>1</code> | Nissan / ניסן |
|
|
2301
|
-
| IYYAR | <code>number</code> | <code>2</code> | Iyyar / אייר |
|
|
2302
|
-
| SIVAN | <code>number</code> | <code>3</code> | Sivan / סיון |
|
|
2303
|
-
| TAMUZ | <code>number</code> | <code>4</code> | Tamuz (sometimes Tammuz) / תמוז |
|
|
2304
|
-
| AV | <code>number</code> | <code>5</code> | Av / אב |
|
|
2305
|
-
| ELUL | <code>number</code> | <code>6</code> | Elul / אלול |
|
|
2306
|
-
| TISHREI | <code>number</code> | <code>7</code> | Tishrei / תִשְׁרֵי |
|
|
2307
|
-
| CHESHVAN | <code>number</code> | <code>8</code> | Cheshvan / חשון |
|
|
2308
|
-
| KISLEV | <code>number</code> | <code>9</code> | Kislev / כסלו |
|
|
2309
|
-
| TEVET | <code>number</code> | <code>10</code> | Tevet / טבת |
|
|
2310
|
-
| SHVAT | <code>number</code> | <code>11</code> | Sh'vat / שבט |
|
|
2311
|
-
| ADAR_I | <code>number</code> | <code>12</code> | Adar or Adar Rishon / אדר |
|
|
2312
|
-
| ADAR_II | <code>number</code> | <code>13</code> | Adar Sheini (only on leap years) / אדר ב׳ |
|
|
2313
|
-
|
|
2314
|
-
<a name="flags"></a>
|
|
2315
|
-
|
|
2316
|
-
## flags : <code>enum</code>
|
|
2317
|
-
Holiday flags for Event
|
|
2318
|
-
|
|
2319
|
-
**Kind**: global enum
|
|
2320
|
-
**Read only**: true
|
|
2321
|
-
**Properties**
|
|
2322
|
-
|
|
2323
|
-
| Name | Type | Default | Description |
|
|
2324
|
-
| --- | --- | --- | --- |
|
|
2325
|
-
| CHAG | <code>number</code> | <code>CHAG$1</code> | Chag, yontiff, yom tov |
|
|
2326
|
-
| LIGHT_CANDLES | <code>number</code> | <code>LIGHT_CANDLES$2</code> | Light candles 18 minutes before sundown |
|
|
2327
|
-
| YOM_TOV_ENDS | <code>number</code> | <code>YOM_TOV_ENDS$2</code> | End of holiday (end of Yom Tov) |
|
|
2328
|
-
| CHUL_ONLY | <code>number</code> | <code>CHUL_ONLY$2</code> | Observed only in the Diaspora (chutz l'aretz) |
|
|
2329
|
-
| IL_ONLY | <code>number</code> | <code>IL_ONLY$2</code> | Observed only in Israel |
|
|
2330
|
-
| LIGHT_CANDLES_TZEIS | <code>number</code> | <code>LIGHT_CANDLES_TZEIS$2</code> | Light candles in the evening at Tzeit time (3 small stars) |
|
|
2331
|
-
| CHANUKAH_CANDLES | <code>number</code> | <code>CHANUKAH_CANDLES$2</code> | Candle-lighting for Chanukah |
|
|
2332
|
-
| ROSH_CHODESH | <code>number</code> | <code>ROSH_CHODESH$1</code> | Rosh Chodesh, beginning of a new Hebrew month |
|
|
2333
|
-
| MINOR_FAST | <code>number</code> | <code>MINOR_FAST$2</code> | Minor fasts like Tzom Tammuz, Ta'anit Esther, ... |
|
|
2334
|
-
| SPECIAL_SHABBAT | <code>number</code> | <code>SPECIAL_SHABBAT$2</code> | Shabbat Shekalim, Zachor, ... |
|
|
2335
|
-
| PARSHA_HASHAVUA | <code>number</code> | <code>PARSHA_HASHAVUA$1</code> | Weekly sedrot on Saturdays |
|
|
2336
|
-
| DAF_YOMI | <code>number</code> | <code>DAF_YOMI$1</code> | Daily page of Talmud |
|
|
2337
|
-
| OMER_COUNT | <code>number</code> | <code>OMER_COUNT$1</code> | Days of the Omer |
|
|
2338
|
-
| MODERN_HOLIDAY | <code>number</code> | <code>MODERN_HOLIDAY$2</code> | Yom HaShoah, Yom HaAtzma'ut, ... |
|
|
2339
|
-
| MAJOR_FAST | <code>number</code> | <code>MAJOR_FAST$2</code> | Yom Kippur and Tish'a B'Av |
|
|
2340
|
-
| SHABBAT_MEVARCHIM | <code>number</code> | <code>SHABBAT_MEVARCHIM$1</code> | On the Saturday before Rosh Chodesh |
|
|
2341
|
-
| MOLAD | <code>number</code> | <code>MOLAD</code> | Molad |
|
|
2342
|
-
| USER_EVENT | <code>number</code> | <code>USER_EVENT</code> | Yahrzeit or Hebrew Anniversary |
|
|
2343
|
-
| HEBREW_DATE | <code>number</code> | <code>HEBREW_DATE</code> | Daily Hebrew date ("11th of Sivan, 5780") |
|
|
2344
|
-
| MINOR_HOLIDAY | <code>number</code> | <code>MINOR_HOLIDAY$2</code> | A holiday that's not major, modern, rosh chodesh, or a fast day |
|
|
2345
|
-
| EREV | <code>number</code> | <code>EREV$2</code> | Evening before a major or minor holiday |
|
|
2346
|
-
| CHOL_HAMOED | <code>number</code> | <code>CHOL_HAMOED$2</code> | Chol haMoed, intermediate days of Pesach or Sukkot |
|
|
2347
|
-
| MISHNA_YOMI | <code>number</code> | <code>MISHNA_YOMI</code> | Mishna Yomi |
|
|
2348
|
-
|
|
2349
|
-
<a name="parshiot"></a>
|
|
2350
|
-
|
|
2351
|
-
## parshiot : <code>Array.<string></code>
|
|
2352
|
-
The 54 parshiyot of the Torah as transilterated strings
|
|
2353
|
-
parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[53] == "Ha'Azinu".
|
|
2354
|
-
|
|
2355
|
-
**Kind**: global constant
|
|
2356
|
-
**Read only**: true
|
|
2357
|
-
<a name="HebrewCalendar"></a>
|
|
2358
|
-
|
|
2359
|
-
## HebrewCalendar
|
|
2360
|
-
HebrewCalendar is the main interface to the `@hebcal/core` library.
|
|
2361
|
-
This namespace is used to calculate holidays, rosh chodesh, candle lighting & havdalah times,
|
|
2362
|
-
Parashat HaShavua, Daf Yomi, days of the omer, and the molad.
|
|
2363
|
-
Event names can be rendered in several languges using the `locale` option.
|
|
2364
|
-
|
|
2365
|
-
**Kind**: global constant
|
|
2366
|
-
|
|
2367
|
-
* [HebrewCalendar](#HebrewCalendar)
|
|
2368
|
-
* [.calendar([options])](#HebrewCalendar.calendar) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2369
|
-
* [.getBirthdayOrAnniversary(hyear, gdate)](#HebrewCalendar.getBirthdayOrAnniversary) ⇒ [<code>HDate</code>](#HDate)
|
|
2370
|
-
* [.getYahrzeit(hyear, gdate)](#HebrewCalendar.getYahrzeit) ⇒ [<code>HDate</code>](#HDate)
|
|
2371
|
-
* [.getHolidaysForYear(year)](#HebrewCalendar.getHolidaysForYear) ⇒ <code>Map.<string, Array.<Event>></code>
|
|
2372
|
-
* [.getHolidaysForYearArray(year, il)](#HebrewCalendar.getHolidaysForYearArray) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2373
|
-
* [.getHolidaysOnDate(date, [il])](#HebrewCalendar.getHolidaysOnDate) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2374
|
-
* [.reformatTimeStr(timeStr, suffix, options)](#HebrewCalendar.reformatTimeStr) ⇒ <code>string</code>
|
|
2375
|
-
* [.version()](#HebrewCalendar.version) ⇒ <code>string</code>
|
|
2376
|
-
* [.getSedra(hyear, il)](#HebrewCalendar.getSedra) ⇒ [<code>Sedra</code>](#Sedra)
|
|
2377
|
-
* [.Options](#HebrewCalendar.Options) : <code>Object</code>
|
|
2378
|
-
|
|
2379
|
-
<a name="HebrewCalendar.calendar"></a>
|
|
2380
|
-
|
|
2381
|
-
### HebrewCalendar.calendar([options]) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2382
|
-
Calculates holidays and other Hebrew calendar events based on [Options](#HebrewCalendar.Options).
|
|
2383
|
-
|
|
2384
|
-
Each holiday is represented by an [Event](#Event) object which includes a date,
|
|
2385
|
-
a description, flags and optional attributes.
|
|
2386
|
-
If given no options, returns holidays for the Diaspora for the current Gregorian year.
|
|
2305
|
+
Each holiday is represented by an [Event](#Event) object which includes a date,
|
|
2306
|
+
a description, flags and optional attributes.
|
|
2307
|
+
If given no options, returns holidays for the Diaspora for the current Gregorian year.
|
|
2387
2308
|
|
|
2388
2309
|
The date range returned by this function can be controlled by:
|
|
2389
2310
|
* `options.year` - Gregorian (e.g. 1993) or Hebrew year (e.g. 5749)
|
|
@@ -2463,7 +2384,7 @@ Additional locales (such as `ru` or `fr`) are supported by the
|
|
|
2463
2384
|
|
|
2464
2385
|
| Param | Type | Default |
|
|
2465
2386
|
| --- | --- | --- |
|
|
2466
|
-
| [options] | [<code>
|
|
2387
|
+
| [options] | [<code>CalOptions</code>](#CalOptions) | <code>{}</code> |
|
|
2467
2388
|
|
|
2468
2389
|
**Example**
|
|
2469
2390
|
```js
|
|
@@ -2602,7 +2523,7 @@ Returns an array of Events on this date (or undefined if no events)
|
|
|
2602
2523
|
|
|
2603
2524
|
### HebrewCalendar.reformatTimeStr(timeStr, suffix, options) ⇒ <code>string</code>
|
|
2604
2525
|
Helper function to format a 23-hour (00:00-23:59) time in US format ("8:13pm") or
|
|
2605
|
-
keep as "20:13" for any other locale/country. Uses `
|
|
2526
|
+
keep as "20:13" for any other locale/country. Uses `CalOptions` to determine
|
|
2606
2527
|
locale.
|
|
2607
2528
|
|
|
2608
2529
|
**Kind**: static method of [<code>HebrewCalendar</code>](#HebrewCalendar)
|
|
@@ -2611,7 +2532,7 @@ locale.
|
|
|
2611
2532
|
| --- | --- | --- |
|
|
2612
2533
|
| timeStr | <code>string</code> | original time like "20:30" |
|
|
2613
2534
|
| suffix | <code>string</code> | "p" or "pm" or " P.M.". Add leading space if you want it |
|
|
2614
|
-
| options | [<code>
|
|
2535
|
+
| options | [<code>CalOptions</code>](#CalOptions) | |
|
|
2615
2536
|
|
|
2616
2537
|
<a name="HebrewCalendar.version"></a>
|
|
2617
2538
|
|
|
@@ -2630,45 +2551,74 @@ created and cached instance.
|
|
|
2630
2551
|
| hyear | <code>number</code> |
|
|
2631
2552
|
| il | <code>boolean</code> |
|
|
2632
2553
|
|
|
2633
|
-
<a name="
|
|
2554
|
+
<a name="months"></a>
|
|
2634
2555
|
|
|
2635
|
-
|
|
2636
|
-
|
|
2556
|
+
## months : <code>enum</code>
|
|
2557
|
+
Hebrew months of the year (NISAN=1, TISHREI=7)
|
|
2637
2558
|
|
|
2638
|
-
**Kind**:
|
|
2559
|
+
**Kind**: global enum
|
|
2560
|
+
**Read only**: true
|
|
2639
2561
|
**Properties**
|
|
2640
2562
|
|
|
2641
|
-
| Name | Type | Description |
|
|
2642
|
-
| --- | --- | --- |
|
|
2643
|
-
|
|
|
2644
|
-
|
|
|
2645
|
-
|
|
|
2646
|
-
|
|
|
2647
|
-
|
|
|
2648
|
-
|
|
|
2649
|
-
|
|
|
2650
|
-
|
|
|
2651
|
-
|
|
|
2652
|
-
|
|
|
2653
|
-
|
|
|
2654
|
-
|
|
|
2655
|
-
|
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
|
2667
|
-
|
|
|
2668
|
-
|
|
|
2669
|
-
|
|
|
2670
|
-
|
|
|
2563
|
+
| Name | Type | Default | Description |
|
|
2564
|
+
| --- | --- | --- | --- |
|
|
2565
|
+
| NISAN | <code>number</code> | <code>1</code> | Nissan / ניסן |
|
|
2566
|
+
| IYYAR | <code>number</code> | <code>2</code> | Iyyar / אייר |
|
|
2567
|
+
| SIVAN | <code>number</code> | <code>3</code> | Sivan / סיון |
|
|
2568
|
+
| TAMUZ | <code>number</code> | <code>4</code> | Tamuz (sometimes Tammuz) / תמוז |
|
|
2569
|
+
| AV | <code>number</code> | <code>5</code> | Av / אב |
|
|
2570
|
+
| ELUL | <code>number</code> | <code>6</code> | Elul / אלול |
|
|
2571
|
+
| TISHREI | <code>number</code> | <code>7</code> | Tishrei / תִשְׁרֵי |
|
|
2572
|
+
| CHESHVAN | <code>number</code> | <code>8</code> | Cheshvan / חשון |
|
|
2573
|
+
| KISLEV | <code>number</code> | <code>9</code> | Kislev / כסלו |
|
|
2574
|
+
| TEVET | <code>number</code> | <code>10</code> | Tevet / טבת |
|
|
2575
|
+
| SHVAT | <code>number</code> | <code>11</code> | Sh'vat / שבט |
|
|
2576
|
+
| ADAR_I | <code>number</code> | <code>12</code> | Adar or Adar Rishon / אדר |
|
|
2577
|
+
| ADAR_II | <code>number</code> | <code>13</code> | Adar Sheini (only on leap years) / אדר ב׳ |
|
|
2578
|
+
|
|
2579
|
+
<a name="flags"></a>
|
|
2580
|
+
|
|
2581
|
+
## flags : <code>enum</code>
|
|
2582
|
+
Holiday flags for Event
|
|
2583
|
+
|
|
2584
|
+
**Kind**: global enum
|
|
2585
|
+
**Read only**: true
|
|
2586
|
+
**Properties**
|
|
2587
|
+
|
|
2588
|
+
| Name | Type | Default | Description |
|
|
2589
|
+
| --- | --- | --- | --- |
|
|
2590
|
+
| CHAG | <code>number</code> | <code>CHAG$1</code> | Chag, yontiff, yom tov |
|
|
2591
|
+
| LIGHT_CANDLES | <code>number</code> | <code>LIGHT_CANDLES$2</code> | Light candles 18 minutes before sundown |
|
|
2592
|
+
| YOM_TOV_ENDS | <code>number</code> | <code>YOM_TOV_ENDS$2</code> | End of holiday (end of Yom Tov) |
|
|
2593
|
+
| CHUL_ONLY | <code>number</code> | <code>CHUL_ONLY$2</code> | Observed only in the Diaspora (chutz l'aretz) |
|
|
2594
|
+
| IL_ONLY | <code>number</code> | <code>IL_ONLY$2</code> | Observed only in Israel |
|
|
2595
|
+
| LIGHT_CANDLES_TZEIS | <code>number</code> | <code>LIGHT_CANDLES_TZEIS$2</code> | Light candles in the evening at Tzeit time (3 small stars) |
|
|
2596
|
+
| CHANUKAH_CANDLES | <code>number</code> | <code>CHANUKAH_CANDLES$2</code> | Candle-lighting for Chanukah |
|
|
2597
|
+
| ROSH_CHODESH | <code>number</code> | <code>ROSH_CHODESH$1</code> | Rosh Chodesh, beginning of a new Hebrew month |
|
|
2598
|
+
| MINOR_FAST | <code>number</code> | <code>MINOR_FAST$2</code> | Minor fasts like Tzom Tammuz, Ta'anit Esther, ... |
|
|
2599
|
+
| SPECIAL_SHABBAT | <code>number</code> | <code>SPECIAL_SHABBAT$2</code> | Shabbat Shekalim, Zachor, ... |
|
|
2600
|
+
| PARSHA_HASHAVUA | <code>number</code> | <code>PARSHA_HASHAVUA$1</code> | Weekly sedrot on Saturdays |
|
|
2601
|
+
| DAF_YOMI | <code>number</code> | <code>DAF_YOMI$1</code> | Daily page of Talmud |
|
|
2602
|
+
| OMER_COUNT | <code>number</code> | <code>OMER_COUNT$1</code> | Days of the Omer |
|
|
2603
|
+
| MODERN_HOLIDAY | <code>number</code> | <code>MODERN_HOLIDAY$2</code> | Yom HaShoah, Yom HaAtzma'ut, ... |
|
|
2604
|
+
| MAJOR_FAST | <code>number</code> | <code>MAJOR_FAST$2</code> | Yom Kippur and Tish'a B'Av |
|
|
2605
|
+
| SHABBAT_MEVARCHIM | <code>number</code> | <code>SHABBAT_MEVARCHIM$1</code> | On the Saturday before Rosh Chodesh |
|
|
2606
|
+
| MOLAD | <code>number</code> | <code>MOLAD</code> | Molad |
|
|
2607
|
+
| USER_EVENT | <code>number</code> | <code>USER_EVENT</code> | Yahrzeit or Hebrew Anniversary |
|
|
2608
|
+
| HEBREW_DATE | <code>number</code> | <code>HEBREW_DATE</code> | Daily Hebrew date ("11th of Sivan, 5780") |
|
|
2609
|
+
| MINOR_HOLIDAY | <code>number</code> | <code>MINOR_HOLIDAY$2</code> | A holiday that's not major, modern, rosh chodesh, or a fast day |
|
|
2610
|
+
| EREV | <code>number</code> | <code>EREV$2</code> | Evening before a major or minor holiday |
|
|
2611
|
+
| CHOL_HAMOED | <code>number</code> | <code>CHOL_HAMOED$2</code> | Chol haMoed, intermediate days of Pesach or Sukkot |
|
|
2612
|
+
| MISHNA_YOMI | <code>number</code> | <code>MISHNA_YOMI</code> | Mishna Yomi |
|
|
2671
2613
|
|
|
2614
|
+
<a name="parshiot"></a>
|
|
2615
|
+
|
|
2616
|
+
## parshiot : <code>Array.<string></code>
|
|
2617
|
+
The 54 parshiyot of the Torah as transilterated strings
|
|
2618
|
+
parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[53] == "Ha'Azinu".
|
|
2619
|
+
|
|
2620
|
+
**Kind**: global constant
|
|
2621
|
+
**Read only**: true
|
|
2672
2622
|
<a name="gematriya"></a>
|
|
2673
2623
|
|
|
2674
2624
|
## gematriya(number) ⇒ <code>string</code>
|
|
@@ -2733,7 +2683,7 @@ Result of Sedra.lookup
|
|
|
2733
2683
|
<a name="MishnaYomi"></a>
|
|
2734
2684
|
|
|
2735
2685
|
## MishnaYomi : <code>Object</code>
|
|
2736
|
-
|
|
2686
|
+
Describes a mishna to be read
|
|
2737
2687
|
|
|
2738
2688
|
**Kind**: global typedef
|
|
2739
2689
|
**Properties**
|
|
@@ -2742,3 +2692,42 @@ Options to configure which events are returned
|
|
|
2742
2692
|
| --- | --- | --- |
|
|
2743
2693
|
| k | <code>string</code> | tractate name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan") |
|
|
2744
2694
|
| v | <code>string</code> | verse (e.g. "2:1") |
|
|
2695
|
+
|
|
2696
|
+
<a name="CalOptions"></a>
|
|
2697
|
+
|
|
2698
|
+
## CalOptions : <code>Object</code>
|
|
2699
|
+
Options to configure which events are returned
|
|
2700
|
+
|
|
2701
|
+
**Kind**: global typedef
|
|
2702
|
+
**Properties**
|
|
2703
|
+
|
|
2704
|
+
| Name | Type | Description |
|
|
2705
|
+
| --- | --- | --- |
|
|
2706
|
+
| location | [<code>Location</code>](#Location) | latitude/longitude/tzid used for candle-lighting |
|
|
2707
|
+
| year | <code>number</code> | Gregorian or Hebrew year |
|
|
2708
|
+
| isHebrewYear | <code>boolean</code> | to interpret year as Hebrew year |
|
|
2709
|
+
| month | <code>number</code> | Gregorian or Hebrew month (to filter results to a single month) |
|
|
2710
|
+
| numYears | <code>number</code> | generate calendar for multiple years (default 1) |
|
|
2711
|
+
| start | <code>Date</code> \| [<code>HDate</code>](#HDate) \| <code>number</code> | use specific start date (requires end date) |
|
|
2712
|
+
| end | <code>Date</code> \| [<code>HDate</code>](#HDate) \| <code>number</code> | use specific end date (requires start date) |
|
|
2713
|
+
| candlelighting | <code>boolean</code> | calculate candle-lighting and havdalah times |
|
|
2714
|
+
| candleLightingMins | <code>number</code> | minutes before sundown to light candles (default 18) |
|
|
2715
|
+
| havdalahMins | <code>number</code> | minutes after sundown for Havdalah (typical values are 42, 50, or 72). If `undefined` (the default), calculate Havdalah according to Tzeit Hakochavim - Nightfall (the point when 3 small stars are observable in the night time sky with the naked eye). If `0`, Havdalah times are supressed. |
|
|
2716
|
+
| havdalahDeg | <code>number</code> | degrees for solar depression for Havdalah. Default is 8.5 degrees for 3 small stars. use 7.083 degress for 3 medium-sized stars. If `0`, Havdalah times are supressed. |
|
|
2717
|
+
| sedrot | <code>boolean</code> | calculate parashah hashavua on Saturdays |
|
|
2718
|
+
| il | <code>boolean</code> | Israeli holiday and sedra schedule |
|
|
2719
|
+
| noMinorFast | <code>boolean</code> | suppress minor fasts |
|
|
2720
|
+
| noModern | <code>boolean</code> | suppress modern holidays |
|
|
2721
|
+
| noRoshChodesh | <code>boolean</code> | suppress Rosh Chodesh |
|
|
2722
|
+
| shabbatMevarchim | <code>boolean</code> | add Shabbat Mevarchim |
|
|
2723
|
+
| noSpecialShabbat | <code>boolean</code> | suppress Special Shabbat |
|
|
2724
|
+
| noHolidays | <code>boolean</code> | suppress regular holidays |
|
|
2725
|
+
| dafyomi | <code>boolean</code> | include Daf Yomi |
|
|
2726
|
+
| mishnaYomi | <code>boolean</code> | include Mishna Yomi |
|
|
2727
|
+
| omer | <code>boolean</code> | include Days of the Omer |
|
|
2728
|
+
| molad | <code>boolean</code> | include event announcing the molad |
|
|
2729
|
+
| ashkenazi | <code>boolean</code> | use Ashkenazi transliterations for event titles (default Sephardi transliterations) |
|
|
2730
|
+
| locale | <code>string</code> | translate event titles according to a locale Default value is `en`, also built-in are `he` and `ashkenazi`. Additional locales (such as `ru` or `fr`) are provided by the [@hebcal/locales](https://github.com/hebcal/hebcal-locales) package |
|
|
2731
|
+
| addHebrewDates | <code>boolean</code> | print the Hebrew date for the entire date range |
|
|
2732
|
+
| addHebrewDatesForEvents | <code>boolean</code> | print the Hebrew date for dates with some events |
|
|
2733
|
+
| mask | <code>number</code> | use bitmask from `flags` to filter events |
|