@hebcal/core 3.27.0 → 3.29.1
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 +77 -59
- package/dist/bundle.js +114 -44
- package/dist/bundle.min.js +2 -2
- package/dist/hdate-bundle.js +64 -28
- package/dist/hdate-bundle.min.js +2 -2
- package/dist/hdate.js +63 -27
- package/dist/hdate.mjs +63 -27
- package/dist/index.js +113 -43
- package/dist/index.mjs +113 -43
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -9,7 +9,9 @@ birthdays and anniversaries.
|
|
|
9
9
|
[](https://circleci.com/gh/hebcal/hebcal-es6)
|
|
10
10
|
|
|
11
11
|
Hebcal was created in 1994 by Danny Sadinoff as a Unix/Linux program written in C, inspired
|
|
12
|
-
by similar functionality written in Emacs Lisp.
|
|
12
|
+
by similar functionality written in Emacs Lisp. The initial JavaScript port was released in
|
|
13
|
+
2014 by Eyal Schachter (age 15). This ECMAScript 2015 implementation was released in 2020
|
|
14
|
+
by Michael J. Radwin. `@hebcal/core` targets both
|
|
13
15
|
browser-based JavaScript and server-side Node.js.
|
|
14
16
|
|
|
15
17
|
Many users of this library will utilize the [HebrewCalendar.calendar()](#HebrewCalendar.calendar)
|
|
@@ -112,11 +114,12 @@ we subclass HolidayEvent to override the <code>url()</code> method.</p>
|
|
|
112
114
|
</dd>
|
|
113
115
|
<dt><a href="#Locale">Locale</a> : <code>object</code></dt>
|
|
114
116
|
<dd><p>A locale in Hebcal is used for translations/transliterations of
|
|
115
|
-
holidays. <code>@hebcal/core</code> supports
|
|
117
|
+
holidays. <code>@hebcal/core</code> supports four locales by default</p>
|
|
116
118
|
<ul>
|
|
117
119
|
<li><code>en</code> - default, Sephardic transliterations (e.g. "Shabbat")</li>
|
|
118
120
|
<li><code>ashkenazi</code> - Ashkenazi transliterations (e.g. "Shabbos")</li>
|
|
119
121
|
<li><code>he</code> - Hebrew (e.g. "שַׁבָּת")</li>
|
|
122
|
+
<li><code>he-x-NoNikud</code> - Hebrew without nikud (e.g. "שבת")</li>
|
|
120
123
|
</ul>
|
|
121
124
|
</dd>
|
|
122
125
|
</dl>
|
|
@@ -176,15 +179,15 @@ Represents a Hebrew date
|
|
|
176
179
|
* [.getMonthName()](#HDate+getMonthName) ⇒ <code>string</code>
|
|
177
180
|
* [.render([locale], [showYear])](#HDate+render) ⇒ <code>string</code>
|
|
178
181
|
* [.renderGematriya()](#HDate+renderGematriya) ⇒ <code>string</code>
|
|
179
|
-
* [.before(day)](#HDate+before) ⇒ <code>HDate</code>
|
|
180
|
-
* [.onOrBefore(dow)](#HDate+onOrBefore) ⇒ <code>HDate</code>
|
|
181
|
-
* [.nearest(dow)](#HDate+nearest) ⇒ <code>HDate</code>
|
|
182
|
-
* [.onOrAfter(dow)](#HDate+onOrAfter) ⇒ <code>HDate</code>
|
|
183
|
-
* [.after(day)](#HDate+after) ⇒ <code>HDate</code>
|
|
184
|
-
* [.next()](#HDate+next) ⇒ <code>HDate</code>
|
|
185
|
-
* [.prev()](#HDate+prev) ⇒ <code>HDate</code>
|
|
186
|
-
* [.add(number, [units])](#HDate+add) ⇒ <code>HDate</code>
|
|
187
|
-
* [.subtract(number, [units])](#HDate+subtract) ⇒ <code>HDate</code>
|
|
182
|
+
* [.before(day)](#HDate+before) ⇒ [<code>HDate</code>](#HDate)
|
|
183
|
+
* [.onOrBefore(dow)](#HDate+onOrBefore) ⇒ [<code>HDate</code>](#HDate)
|
|
184
|
+
* [.nearest(dow)](#HDate+nearest) ⇒ [<code>HDate</code>](#HDate)
|
|
185
|
+
* [.onOrAfter(dow)](#HDate+onOrAfter) ⇒ [<code>HDate</code>](#HDate)
|
|
186
|
+
* [.after(day)](#HDate+after) ⇒ [<code>HDate</code>](#HDate)
|
|
187
|
+
* [.next()](#HDate+next) ⇒ [<code>HDate</code>](#HDate)
|
|
188
|
+
* [.prev()](#HDate+prev) ⇒ [<code>HDate</code>](#HDate)
|
|
189
|
+
* [.add(number, [units])](#HDate+add) ⇒ [<code>HDate</code>](#HDate)
|
|
190
|
+
* [.subtract(number, [units])](#HDate+subtract) ⇒ [<code>HDate</code>](#HDate)
|
|
188
191
|
* [.deltaDays(other)](#HDate+deltaDays) ⇒ <code>number</code>
|
|
189
192
|
* [.isSameDate(other)](#HDate+isSameDate) ⇒ <code>boolean</code>
|
|
190
193
|
* [.toString()](#HDate+toString) ⇒ <code>string</code>
|
|
@@ -222,7 +225,7 @@ Create a Hebrew date. There are 3 basic forms for the `HDate()` constructor.
|
|
|
222
225
|
|
|
223
226
|
| Param | Type | Description |
|
|
224
227
|
| --- | --- | --- |
|
|
225
|
-
| [day] | <code>number</code> \| <code>Date</code> \| <code>HDate</code> | Day of month (1-30) if a `number`. If a `Date` is specified, represents the Hebrew date corresponding to the Gregorian date using local time. If an `HDate` is specified, clones a copy of the given Hebrew date. |
|
|
228
|
+
| [day] | <code>number</code> \| <code>Date</code> \| [<code>HDate</code>](#HDate) | Day of month (1-30) if a `number`. If a `Date` is specified, represents the Hebrew date corresponding to the Gregorian date using local time. If an `HDate` is specified, clones a copy of the given Hebrew date. |
|
|
226
229
|
| [month] | <code>number</code> \| <code>string</code> | Hebrew month of year (1=NISAN, 7=TISHREI) |
|
|
227
230
|
| [year] | <code>number</code> | Hebrew year |
|
|
228
231
|
|
|
@@ -336,7 +339,7 @@ console.log(ev.renderGematriya()); // 'ט״ו חֶשְׁוָן תשס״ט'
|
|
|
336
339
|
```
|
|
337
340
|
<a name="HDate+before"></a>
|
|
338
341
|
|
|
339
|
-
### hDate.before(day) ⇒ <code>HDate</code>
|
|
342
|
+
### hDate.before(day) ⇒ [<code>HDate</code>](#HDate)
|
|
340
343
|
Returns an `HDate` representing the a dayNumber before the current date.
|
|
341
344
|
Sunday=0, Saturday=6
|
|
342
345
|
|
|
@@ -352,7 +355,7 @@ new HDate(new Date('Wednesday February 19, 2014')).before(6).greg() // Sat Feb 1
|
|
|
352
355
|
```
|
|
353
356
|
<a name="HDate+onOrBefore"></a>
|
|
354
357
|
|
|
355
|
-
### hDate.onOrBefore(dow) ⇒ <code>HDate</code>
|
|
358
|
+
### hDate.onOrBefore(dow) ⇒ [<code>HDate</code>](#HDate)
|
|
356
359
|
Returns an `HDate` representing the a dayNumber on or before the current date.
|
|
357
360
|
Sunday=0, Saturday=6
|
|
358
361
|
|
|
@@ -370,7 +373,7 @@ new HDate(new Date('Sunday February 23, 2014')).onOrBefore(6).greg() // Sat Feb
|
|
|
370
373
|
```
|
|
371
374
|
<a name="HDate+nearest"></a>
|
|
372
375
|
|
|
373
|
-
### hDate.nearest(dow) ⇒ <code>HDate</code>
|
|
376
|
+
### hDate.nearest(dow) ⇒ [<code>HDate</code>](#HDate)
|
|
374
377
|
Returns an `HDate` representing the nearest dayNumber to the current date
|
|
375
378
|
Sunday=0, Saturday=6
|
|
376
379
|
|
|
@@ -387,7 +390,7 @@ new HDate(new Date('Tuesday February 18, 2014')).nearest(6).greg() // Sat Feb 15
|
|
|
387
390
|
```
|
|
388
391
|
<a name="HDate+onOrAfter"></a>
|
|
389
392
|
|
|
390
|
-
### hDate.onOrAfter(dow) ⇒ <code>HDate</code>
|
|
393
|
+
### hDate.onOrAfter(dow) ⇒ [<code>HDate</code>](#HDate)
|
|
391
394
|
Returns an `HDate` representing the a dayNumber on or after the current date.
|
|
392
395
|
Sunday=0, Saturday=6
|
|
393
396
|
|
|
@@ -405,7 +408,7 @@ new HDate(new Date('Sunday February 23, 2014')).onOrAfter(6).greg() // Sat Mar 0
|
|
|
405
408
|
```
|
|
406
409
|
<a name="HDate+after"></a>
|
|
407
410
|
|
|
408
|
-
### hDate.after(day) ⇒ <code>HDate</code>
|
|
411
|
+
### hDate.after(day) ⇒ [<code>HDate</code>](#HDate)
|
|
409
412
|
Returns an `HDate` representing the a dayNumber after the current date.
|
|
410
413
|
Sunday=0, Saturday=6
|
|
411
414
|
|
|
@@ -423,19 +426,19 @@ new HDate(new Date('Sunday February 23, 2014')).after(6).greg() // Sat Mar 01 20
|
|
|
423
426
|
```
|
|
424
427
|
<a name="HDate+next"></a>
|
|
425
428
|
|
|
426
|
-
### hDate.next() ⇒ <code>HDate</code>
|
|
429
|
+
### hDate.next() ⇒ [<code>HDate</code>](#HDate)
|
|
427
430
|
Returns the next Hebrew date
|
|
428
431
|
|
|
429
432
|
**Kind**: instance method of [<code>HDate</code>](#HDate)
|
|
430
433
|
<a name="HDate+prev"></a>
|
|
431
434
|
|
|
432
|
-
### hDate.prev() ⇒ <code>HDate</code>
|
|
435
|
+
### hDate.prev() ⇒ [<code>HDate</code>](#HDate)
|
|
433
436
|
Returns the previous Hebrew date
|
|
434
437
|
|
|
435
438
|
**Kind**: instance method of [<code>HDate</code>](#HDate)
|
|
436
439
|
<a name="HDate+add"></a>
|
|
437
440
|
|
|
438
|
-
### hDate.add(number, [units]) ⇒ <code>HDate</code>
|
|
441
|
+
### hDate.add(number, [units]) ⇒ [<code>HDate</code>](#HDate)
|
|
439
442
|
Returns a cloned `HDate` object with a specified amount of time added
|
|
440
443
|
|
|
441
444
|
Units are case insensitive, and support plural and short forms.
|
|
@@ -457,7 +460,7 @@ Note, short forms are case sensitive.
|
|
|
457
460
|
|
|
458
461
|
<a name="HDate+subtract"></a>
|
|
459
462
|
|
|
460
|
-
### hDate.subtract(number, [units]) ⇒ <code>HDate</code>
|
|
463
|
+
### hDate.subtract(number, [units]) ⇒ [<code>HDate</code>](#HDate)
|
|
461
464
|
Returns a cloned `HDate` object with a specified amount of time subracted
|
|
462
465
|
|
|
463
466
|
Units are case insensitive, and support plural and short forms.
|
|
@@ -500,7 +503,7 @@ The result is zero if the two dates are identical.
|
|
|
500
503
|
|
|
501
504
|
| Param | Type | Description |
|
|
502
505
|
| --- | --- | --- |
|
|
503
|
-
| other | <code>HDate</code> | Hebrew date to compare |
|
|
506
|
+
| other | [<code>HDate</code>](#HDate) | Hebrew date to compare |
|
|
504
507
|
|
|
505
508
|
**Example**
|
|
506
509
|
```js
|
|
@@ -519,7 +522,7 @@ Compares this date to another date, returning `true` if the dates match.
|
|
|
519
522
|
|
|
520
523
|
| Param | Type | Description |
|
|
521
524
|
| --- | --- | --- |
|
|
522
|
-
| other | <code>HDate</code> | Hebrew date to compare |
|
|
525
|
+
| other | [<code>HDate</code>](#HDate) | Hebrew date to compare |
|
|
523
526
|
|
|
524
527
|
<a name="HDate+toString"></a>
|
|
525
528
|
|
|
@@ -689,7 +692,7 @@ Represents an Event with a title, date, and flags
|
|
|
689
692
|
|
|
690
693
|
* [Event](#Event)
|
|
691
694
|
* [new Event(date, desc, [mask], [attrs])](#new_Event_new)
|
|
692
|
-
* [.getDate()](#Event+getDate) ⇒ <code>HDate</code>
|
|
695
|
+
* [.getDate()](#Event+getDate) ⇒ [<code>HDate</code>](#HDate)
|
|
693
696
|
* [.getDesc()](#Event+getDesc) ⇒ <code>string</code>
|
|
694
697
|
* [.getFlags()](#Event+getFlags) ⇒ <code>number</code>
|
|
695
698
|
* [.render([locale])](#Event+render) ⇒ <code>string</code>
|
|
@@ -710,14 +713,14 @@ Constructs Event
|
|
|
710
713
|
|
|
711
714
|
| Param | Type | Default | Description |
|
|
712
715
|
| --- | --- | --- | --- |
|
|
713
|
-
| date | <code>HDate</code> | | Hebrew date event occurs |
|
|
716
|
+
| date | [<code>HDate</code>](#HDate) | | Hebrew date event occurs |
|
|
714
717
|
| desc | <code>string</code> | | Description (not translated) |
|
|
715
718
|
| [mask] | <code>number</code> | <code>0</code> | optional bitmask of holiday flags (see [flags](#flags)) |
|
|
716
719
|
| [attrs] | <code>Object</code> | <code>{}</code> | optional additional attributes (e.g. `eventTimeStr`, `cholHaMoedDay`) |
|
|
717
720
|
|
|
718
721
|
<a name="Event+getDate"></a>
|
|
719
722
|
|
|
720
|
-
### event.getDate() ⇒ <code>HDate</code>
|
|
723
|
+
### event.getDate() ⇒ [<code>HDate</code>](#HDate)
|
|
721
724
|
Hebrew date of this event
|
|
722
725
|
|
|
723
726
|
**Kind**: instance method of [<code>Event</code>](#Event)
|
|
@@ -845,7 +848,7 @@ Daily Hebrew date ("11th of Sivan, 5780")
|
|
|
845
848
|
|
|
846
849
|
| Param | Type |
|
|
847
850
|
| --- | --- |
|
|
848
|
-
| date | <code>HDate</code> |
|
|
851
|
+
| date | [<code>HDate</code>](#HDate) |
|
|
849
852
|
|
|
850
853
|
<a name="HebrewDateEvent+render"></a>
|
|
851
854
|
|
|
@@ -949,7 +952,7 @@ Initialize a Zmanim instance.
|
|
|
949
952
|
|
|
950
953
|
| Param | Type | Description |
|
|
951
954
|
| --- | --- | --- |
|
|
952
|
-
| date | <code>Date</code> \| <code>HDate</code> | Regular or Hebrew Date. If `date` is a regular `Date`, hours, minutes, seconds and milliseconds are ignored. |
|
|
955
|
+
| date | <code>Date</code> \| [<code>HDate</code>](#HDate) | Regular or Hebrew Date. If `date` is a regular `Date`, hours, minutes, seconds and milliseconds are ignored. |
|
|
953
956
|
| latitude | <code>number</code> | |
|
|
954
957
|
| longitude | <code>number</code> | |
|
|
955
958
|
|
|
@@ -1241,7 +1244,7 @@ Gets a 24-hour time formatter (e.g. 07:41 or 20:03) for this location
|
|
|
1241
1244
|
|
|
1242
1245
|
| Param | Type |
|
|
1243
1246
|
| --- | --- |
|
|
1244
|
-
| hdate | <code>Date</code> \| <code>HDate</code> |
|
|
1247
|
+
| hdate | <code>Date</code> \| [<code>HDate</code>](#HDate) |
|
|
1245
1248
|
|
|
1246
1249
|
<a name="Location+tzeit"></a>
|
|
1247
1250
|
|
|
@@ -1252,7 +1255,7 @@ Gets a 24-hour time formatter (e.g. 07:41 or 20:03) for this location
|
|
|
1252
1255
|
|
|
1253
1256
|
| Param | Type |
|
|
1254
1257
|
| --- | --- |
|
|
1255
|
-
| hdate | <code>Date</code> \| <code>HDate</code> |
|
|
1258
|
+
| hdate | <code>Date</code> \| [<code>HDate</code>](#HDate) |
|
|
1256
1259
|
| [angle] | <code>number</code> |
|
|
1257
1260
|
|
|
1258
1261
|
<a name="Location+toString"></a>
|
|
@@ -1358,7 +1361,7 @@ An event that has an `eventTime` and `eventTimeStr`
|
|
|
1358
1361
|
|
|
1359
1362
|
| Param | Type | Description |
|
|
1360
1363
|
| --- | --- | --- |
|
|
1361
|
-
| date | <code>HDate</code> | |
|
|
1364
|
+
| date | [<code>HDate</code>](#HDate) | |
|
|
1362
1365
|
| desc | <code>string</code> | Description (not translated) |
|
|
1363
1366
|
| mask | <code>number</code> | |
|
|
1364
1367
|
| eventTime | <code>Date</code> | |
|
|
@@ -1404,7 +1407,7 @@ Havdalah after Shabbat or holiday
|
|
|
1404
1407
|
|
|
1405
1408
|
| Param | Type |
|
|
1406
1409
|
| --- | --- |
|
|
1407
|
-
| date | <code>HDate</code> |
|
|
1410
|
+
| date | [<code>HDate</code>](#HDate) |
|
|
1408
1411
|
| mask | <code>number</code> |
|
|
1409
1412
|
| eventTime | <code>Date</code> |
|
|
1410
1413
|
| location | [<code>Location</code>](#Location) |
|
|
@@ -1452,7 +1455,7 @@ Candle lighting before Shabbat or holiday
|
|
|
1452
1455
|
|
|
1453
1456
|
| Param | Type |
|
|
1454
1457
|
| --- | --- |
|
|
1455
|
-
| date | <code>HDate</code> |
|
|
1458
|
+
| date | [<code>HDate</code>](#HDate) |
|
|
1456
1459
|
| mask | <code>number</code> |
|
|
1457
1460
|
| eventTime | <code>Date</code> |
|
|
1458
1461
|
| location | [<code>Location</code>](#Location) |
|
|
@@ -1539,7 +1542,7 @@ Represents a Molad announcement on Shabbat Mevarchim
|
|
|
1539
1542
|
|
|
1540
1543
|
| Param | Type | Description |
|
|
1541
1544
|
| --- | --- | --- |
|
|
1542
|
-
| date | <code>HDate</code> | Hebrew date event occurs |
|
|
1545
|
+
| date | [<code>HDate</code>](#HDate) | Hebrew date event occurs |
|
|
1543
1546
|
| hyear | <code>number</code> | molad year |
|
|
1544
1547
|
| hmonth | <code>number</code> | molad month |
|
|
1545
1548
|
|
|
@@ -1574,7 +1577,7 @@ Represents a day 1-49 of counting the Omer from Pesach to Shavuot
|
|
|
1574
1577
|
|
|
1575
1578
|
| Param | Type |
|
|
1576
1579
|
| --- | --- |
|
|
1577
|
-
| date | <code>HDate</code> |
|
|
1580
|
+
| date | [<code>HDate</code>](#HDate) |
|
|
1578
1581
|
| omerDay | <code>number</code> |
|
|
1579
1582
|
|
|
1580
1583
|
<a name="OmerEvent+render"></a>
|
|
@@ -1683,7 +1686,7 @@ Event wrapper around a DafYomi instance
|
|
|
1683
1686
|
|
|
1684
1687
|
| Param | Type |
|
|
1685
1688
|
| --- | --- |
|
|
1686
|
-
| date | <code>HDate</code> |
|
|
1689
|
+
| date | [<code>HDate</code>](#HDate) |
|
|
1687
1690
|
|
|
1688
1691
|
<a name="DafYomiEvent+render"></a>
|
|
1689
1692
|
|
|
@@ -1725,7 +1728,7 @@ Represents Parashah HaShavua for an entire Hebrew year
|
|
|
1725
1728
|
* [.get(hDate)](#Sedra+get) ⇒ <code>Array.<string></code>
|
|
1726
1729
|
* [.getString(hDate, [locale])](#Sedra+getString) ⇒ <code>string</code>
|
|
1727
1730
|
* [.isParsha(hDate)](#Sedra+isParsha) ⇒ <code>boolean</code>
|
|
1728
|
-
* [.find(parsha)](#Sedra+find) ⇒ <code>HDate</code>
|
|
1731
|
+
* [.find(parsha)](#Sedra+find) ⇒ [<code>HDate</code>](#HDate)
|
|
1729
1732
|
* [.getFirstSaturday()](#Sedra+getFirstSaturday) ⇒ <code>number</code>
|
|
1730
1733
|
* [.getYear()](#Sedra+getYear) ⇒ <code>number</code>
|
|
1731
1734
|
* [.lookup(hDate)](#Sedra+lookup) ⇒ [<code>SedraResult</code>](#SedraResult)
|
|
@@ -1750,7 +1753,7 @@ Returns the parsha (or parshiyot) read on Hebrew date
|
|
|
1750
1753
|
|
|
1751
1754
|
| Param | Type | Description |
|
|
1752
1755
|
| --- | --- | --- |
|
|
1753
|
-
| hDate | <code>HDate</code> \| <code>number</code> | Hebrew date or R.D. days |
|
|
1756
|
+
| hDate | [<code>HDate</code>](#HDate) \| <code>number</code> | Hebrew date or R.D. days |
|
|
1754
1757
|
|
|
1755
1758
|
<a name="Sedra+getString"></a>
|
|
1756
1759
|
|
|
@@ -1761,7 +1764,7 @@ Looks up parsha for the date, then returns a translated or transliterated string
|
|
|
1761
1764
|
|
|
1762
1765
|
| Param | Type | Description |
|
|
1763
1766
|
| --- | --- | --- |
|
|
1764
|
-
| hDate | <code>HDate</code> \| <code>number</code> | Hebrew date or R.D. days |
|
|
1767
|
+
| hDate | [<code>HDate</code>](#HDate) \| <code>number</code> | Hebrew date or R.D. days |
|
|
1765
1768
|
| [locale] | <code>string</code> | Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale |
|
|
1766
1769
|
|
|
1767
1770
|
<a name="Sedra+isParsha"></a>
|
|
@@ -1774,11 +1777,11 @@ Torah reading or special holiday reading
|
|
|
1774
1777
|
|
|
1775
1778
|
| Param | Type | Description |
|
|
1776
1779
|
| --- | --- | --- |
|
|
1777
|
-
| hDate | <code>HDate</code> \| <code>number</code> | Hebrew date or R.D. days |
|
|
1780
|
+
| hDate | [<code>HDate</code>](#HDate) \| <code>number</code> | Hebrew date or R.D. days |
|
|
1778
1781
|
|
|
1779
1782
|
<a name="Sedra+find"></a>
|
|
1780
1783
|
|
|
1781
|
-
### sedra.find(parsha) ⇒ <code>HDate</code>
|
|
1784
|
+
### sedra.find(parsha) ⇒ [<code>HDate</code>](#HDate)
|
|
1782
1785
|
Returns the date that a parsha occurs
|
|
1783
1786
|
|
|
1784
1787
|
**Kind**: instance method of [<code>Sedra</code>](#Sedra)
|
|
@@ -1806,7 +1809,7 @@ Returns an object describing the parsha on the first Saturday on or after absdat
|
|
|
1806
1809
|
|
|
1807
1810
|
| Param | Type | Description |
|
|
1808
1811
|
| --- | --- | --- |
|
|
1809
|
-
| hDate | <code>HDate</code> \| <code>number</code> | Hebrew date or R.D. days |
|
|
1812
|
+
| hDate | [<code>HDate</code>](#HDate) \| <code>number</code> | Hebrew date or R.D. days |
|
|
1810
1813
|
|
|
1811
1814
|
<a name="ParshaEvent"></a>
|
|
1812
1815
|
|
|
@@ -1828,7 +1831,7 @@ Represents one of 54 weekly Torah portions, always on a Saturday
|
|
|
1828
1831
|
|
|
1829
1832
|
| Param | Type | Description |
|
|
1830
1833
|
| --- | --- | --- |
|
|
1831
|
-
| date | <code>HDate</code> | |
|
|
1834
|
+
| date | [<code>HDate</code>](#HDate) | |
|
|
1832
1835
|
| parsha | <code>Array.<string></code> | untranslated name of single or double parsha, such as ['Bereshit'] or ['Achrei Mot', 'Kedoshim'] |
|
|
1833
1836
|
| il | <code>boolean</code> | |
|
|
1834
1837
|
|
|
@@ -1875,7 +1878,7 @@ Constructs Holiday event
|
|
|
1875
1878
|
|
|
1876
1879
|
| Param | Type | Default | Description |
|
|
1877
1880
|
| --- | --- | --- | --- |
|
|
1878
|
-
| date | <code>HDate</code> | | Hebrew date event occurs |
|
|
1881
|
+
| date | [<code>HDate</code>](#HDate) | | Hebrew date event occurs |
|
|
1879
1882
|
| desc | <code>string</code> | | Description (not translated) |
|
|
1880
1883
|
| [mask] | <code>number</code> | <code>0</code> | optional holiday flags |
|
|
1881
1884
|
| [attrs] | <code>Object</code> | <code>{}</code> | |
|
|
@@ -1917,7 +1920,7 @@ Constructs Rosh Chodesh event
|
|
|
1917
1920
|
|
|
1918
1921
|
| Param | Type | Description |
|
|
1919
1922
|
| --- | --- | --- |
|
|
1920
|
-
| date | <code>HDate</code> | Hebrew date event occurs |
|
|
1923
|
+
| date | [<code>HDate</code>](#HDate) | Hebrew date event occurs |
|
|
1921
1924
|
| monthName | <code>string</code> | Hebrew month name (not translated) |
|
|
1922
1925
|
|
|
1923
1926
|
<a name="RoshChodeshEvent+render"></a>
|
|
@@ -1959,7 +1962,7 @@ Constructs AsaraBTevetEvent
|
|
|
1959
1962
|
|
|
1960
1963
|
| Param | Type | Default | Description |
|
|
1961
1964
|
| --- | --- | --- | --- |
|
|
1962
|
-
| date | <code>HDate</code> | | Hebrew date event occurs |
|
|
1965
|
+
| date | [<code>HDate</code>](#HDate) | | Hebrew date event occurs |
|
|
1963
1966
|
| desc | <code>string</code> | | Description (not translated) |
|
|
1964
1967
|
| [mask] | <code>number</code> | <code>0</code> | optional holiday flags |
|
|
1965
1968
|
| [attrs] | <code>Object</code> | <code>{}</code> | |
|
|
@@ -1987,7 +1990,7 @@ Constructs Mevarchim haChodesh event
|
|
|
1987
1990
|
|
|
1988
1991
|
| Param | Type | Description |
|
|
1989
1992
|
| --- | --- | --- |
|
|
1990
|
-
| date | <code>HDate</code> | Hebrew date event occurs |
|
|
1993
|
+
| date | [<code>HDate</code>](#HDate) | Hebrew date event occurs |
|
|
1991
1994
|
| monthName | <code>string</code> | Hebrew month name (not translated) |
|
|
1992
1995
|
|
|
1993
1996
|
<a name="MevarchimChodeshEvent+render"></a>
|
|
@@ -2103,6 +2106,7 @@ holidays. `@hebcal/core` supports three locales by default
|
|
|
2103
2106
|
* `en` - default, Sephardic transliterations (e.g. "Shabbat")
|
|
2104
2107
|
* `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
|
|
2105
2108
|
* `he` - Hebrew (e.g. "שַׁבָּת")
|
|
2109
|
+
* `he-x-NoNikud` - Hebrew without nikud (e.g. "שבת")
|
|
2106
2110
|
|
|
2107
2111
|
**Kind**: global namespace
|
|
2108
2112
|
|
|
@@ -2271,13 +2275,14 @@ Event names can be rendered in several languges using the `locale` option.
|
|
|
2271
2275
|
|
|
2272
2276
|
* [HebrewCalendar](#HebrewCalendar)
|
|
2273
2277
|
* [.calendar([options])](#HebrewCalendar.calendar) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2274
|
-
* [.getBirthdayOrAnniversary(hyear, gdate)](#HebrewCalendar.getBirthdayOrAnniversary) ⇒ <code>HDate</code>
|
|
2275
|
-
* [.getYahrzeit(hyear, gdate)](#HebrewCalendar.getYahrzeit) ⇒ <code>HDate</code>
|
|
2278
|
+
* [.getBirthdayOrAnniversary(hyear, gdate)](#HebrewCalendar.getBirthdayOrAnniversary) ⇒ [<code>HDate</code>](#HDate)
|
|
2279
|
+
* [.getYahrzeit(hyear, gdate)](#HebrewCalendar.getYahrzeit) ⇒ [<code>HDate</code>](#HDate)
|
|
2276
2280
|
* [.getHolidaysForYear(year)](#HebrewCalendar.getHolidaysForYear) ⇒ <code>Map.<string, Array.<Event>></code>
|
|
2277
2281
|
* [.getHolidaysForYearArray(year, il)](#HebrewCalendar.getHolidaysForYearArray) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2278
2282
|
* [.getHolidaysOnDate(date, [il])](#HebrewCalendar.getHolidaysOnDate) ⇒ [<code>Array.<Event></code>](#Event)
|
|
2279
2283
|
* [.reformatTimeStr(timeStr, suffix, options)](#HebrewCalendar.reformatTimeStr) ⇒ <code>string</code>
|
|
2280
2284
|
* [.version()](#HebrewCalendar.version) ⇒ <code>string</code>
|
|
2285
|
+
* [.getSedra(hyear, il)](#HebrewCalendar.getSedra) ⇒ [<code>Sedra</code>](#Sedra)
|
|
2281
2286
|
* [.Options](#HebrewCalendar.Options) : <code>Object</code>
|
|
2282
2287
|
|
|
2283
2288
|
<a name="HebrewCalendar.calendar"></a>
|
|
@@ -2295,7 +2300,7 @@ The date range returned by this function can be controlled by:
|
|
|
2295
2300
|
* `options.numYears` - generate calendar for multiple years (default 1)
|
|
2296
2301
|
* `options.month` - Gregorian or Hebrew month (to filter results to a single month)
|
|
2297
2302
|
|
|
2298
|
-
Alternatively, specify start and end days with `Date` or [HDate](HDate) instances:
|
|
2303
|
+
Alternatively, specify start and end days with `Date` or [HDate](#HDate) instances:
|
|
2299
2304
|
* `options.start` - use specific start date (requires `end` date)
|
|
2300
2305
|
* `options.end` - use specific end date (requires `start` date)
|
|
2301
2306
|
|
|
@@ -2388,7 +2393,7 @@ for (const ev of events) {
|
|
|
2388
2393
|
```
|
|
2389
2394
|
<a name="HebrewCalendar.getBirthdayOrAnniversary"></a>
|
|
2390
2395
|
|
|
2391
|
-
### HebrewCalendar.getBirthdayOrAnniversary(hyear, gdate) ⇒ <code>HDate</code>
|
|
2396
|
+
### HebrewCalendar.getBirthdayOrAnniversary(hyear, gdate) ⇒ [<code>HDate</code>](#HDate)
|
|
2392
2397
|
Calculates a birthday or anniversary (non-yahrzeit).
|
|
2393
2398
|
`hyear` must be after original `gdate` of anniversary.
|
|
2394
2399
|
Returns `undefined` when requested year preceeds or is same as original year.
|
|
@@ -2407,12 +2412,12 @@ has his birthday postponed until the first of the following month in
|
|
|
2407
2412
|
years where that day does not occur. [Calendrical Calculations p. 111]
|
|
2408
2413
|
|
|
2409
2414
|
**Kind**: static method of [<code>HebrewCalendar</code>](#HebrewCalendar)
|
|
2410
|
-
**Returns**: <code>HDate</code> - anniversary occurring in `hyear`
|
|
2415
|
+
**Returns**: [<code>HDate</code>](#HDate) - anniversary occurring in `hyear`
|
|
2411
2416
|
|
|
2412
2417
|
| Param | Type | Description |
|
|
2413
2418
|
| --- | --- | --- |
|
|
2414
2419
|
| hyear | <code>number</code> | Hebrew year |
|
|
2415
|
-
| gdate | <code>Date</code> \| <code>HDate</code> | Gregorian or Hebrew date of event |
|
|
2420
|
+
| gdate | <code>Date</code> \| [<code>HDate</code>](#HDate) | Gregorian or Hebrew date of event |
|
|
2416
2421
|
|
|
2417
2422
|
**Example**
|
|
2418
2423
|
```js
|
|
@@ -2423,7 +2428,7 @@ console.log(hd.greg().toLocaleDateString('en-US')); // '3/26/2020'
|
|
|
2423
2428
|
```
|
|
2424
2429
|
<a name="HebrewCalendar.getYahrzeit"></a>
|
|
2425
2430
|
|
|
2426
|
-
### HebrewCalendar.getYahrzeit(hyear, gdate) ⇒ <code>HDate</code>
|
|
2431
|
+
### HebrewCalendar.getYahrzeit(hyear, gdate) ⇒ [<code>HDate</code>](#HDate)
|
|
2427
2432
|
Calculates yahrzeit.
|
|
2428
2433
|
`hyear` must be after original `gdate` of death.
|
|
2429
2434
|
Returns `undefined` when requested year preceeds or is same as original year.
|
|
@@ -2450,12 +2455,12 @@ There are several cases:
|
|
|
2450
2455
|
of the date of death. [Calendrical Calculations p. 113]
|
|
2451
2456
|
|
|
2452
2457
|
**Kind**: static method of [<code>HebrewCalendar</code>](#HebrewCalendar)
|
|
2453
|
-
**Returns**: <code>HDate</code> - anniversary occurring in hyear
|
|
2458
|
+
**Returns**: [<code>HDate</code>](#HDate) - anniversary occurring in hyear
|
|
2454
2459
|
|
|
2455
2460
|
| Param | Type | Description |
|
|
2456
2461
|
| --- | --- | --- |
|
|
2457
2462
|
| hyear | <code>number</code> | Hebrew year |
|
|
2458
|
-
| gdate | <code>Date</code> \| <code>HDate</code> | Gregorian or Hebrew date of death |
|
|
2463
|
+
| gdate | <code>Date</code> \| [<code>HDate</code>](#HDate) | Gregorian or Hebrew date of death |
|
|
2459
2464
|
|
|
2460
2465
|
**Example**
|
|
2461
2466
|
```js
|
|
@@ -2498,7 +2503,7 @@ Returns an array of Events on this date (or undefined if no events)
|
|
|
2498
2503
|
|
|
2499
2504
|
| Param | Type | Description |
|
|
2500
2505
|
| --- | --- | --- |
|
|
2501
|
-
| date | <code>HDate</code> \| <code>Date</code> \| <code>number</code> | Hebrew Date, Gregorian date, or absolute R.D. day number |
|
|
2506
|
+
| date | [<code>HDate</code>](#HDate) \| <code>Date</code> \| <code>number</code> | Hebrew Date, Gregorian date, or absolute R.D. day number |
|
|
2502
2507
|
| [il] | <code>boolean</code> | use the Israeli schedule for holidays |
|
|
2503
2508
|
|
|
2504
2509
|
<a name="HebrewCalendar.reformatTimeStr"></a>
|
|
@@ -2520,6 +2525,19 @@ locale.
|
|
|
2520
2525
|
|
|
2521
2526
|
### HebrewCalendar.version() ⇒ <code>string</code>
|
|
2522
2527
|
**Kind**: static method of [<code>HebrewCalendar</code>](#HebrewCalendar)
|
|
2528
|
+
<a name="HebrewCalendar.getSedra"></a>
|
|
2529
|
+
|
|
2530
|
+
### HebrewCalendar.getSedra(hyear, il) ⇒ [<code>Sedra</code>](#Sedra)
|
|
2531
|
+
Convenience function to create an instance of `Sedra` or reuse a previously
|
|
2532
|
+
created and cached instance.
|
|
2533
|
+
|
|
2534
|
+
**Kind**: static method of [<code>HebrewCalendar</code>](#HebrewCalendar)
|
|
2535
|
+
|
|
2536
|
+
| Param | Type |
|
|
2537
|
+
| --- | --- |
|
|
2538
|
+
| hyear | <code>number</code> |
|
|
2539
|
+
| il | <code>boolean</code> |
|
|
2540
|
+
|
|
2523
2541
|
<a name="HebrewCalendar.Options"></a>
|
|
2524
2542
|
|
|
2525
2543
|
### HebrewCalendar.Options : <code>Object</code>
|
|
@@ -2535,8 +2553,8 @@ Options to configure which events are returned
|
|
|
2535
2553
|
| isHebrewYear | <code>boolean</code> | to interpret year as Hebrew year |
|
|
2536
2554
|
| month | <code>number</code> | Gregorian or Hebrew month (to filter results to a single month) |
|
|
2537
2555
|
| numYears | <code>number</code> | generate calendar for multiple years (default 1) |
|
|
2538
|
-
| start | <code>Date</code> \| <code>HDate</code> \| <code>number</code> | use specific start date (requires end date) |
|
|
2539
|
-
| end | <code>Date</code> \| <code>HDate</code> \| <code>number</code> | use specific end date (requires start date) |
|
|
2556
|
+
| start | <code>Date</code> \| [<code>HDate</code>](#HDate) \| <code>number</code> | use specific start date (requires end date) |
|
|
2557
|
+
| end | <code>Date</code> \| [<code>HDate</code>](#HDate) \| <code>number</code> | use specific end date (requires start date) |
|
|
2540
2558
|
| candlelighting | <code>boolean</code> | calculate candle-lighting and havdalah times |
|
|
2541
2559
|
| candleLightingMins | <code>number</code> | minutes before sundown to light candles (default 18) |
|
|
2542
2560
|
| 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. |
|