@hebcal/core 3.48.3 → 3.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,9 +48,6 @@ for (const ev of events) {
48
48
  ## Classes
49
49
 
50
50
  <dl>
51
- <dt><a href="#greg">greg</a></dt>
52
- <dd><p>Gregorian date helper functions.</p>
53
- </dd>
54
51
  <dt><a href="#Locale">Locale</a></dt>
55
52
  <dd><p>A locale in Hebcal is used for translations/transliterations of
56
53
  holidays. <code>@hebcal/core</code> supports four locales by default</p>
@@ -126,6 +123,13 @@ each day in order to finish the entire Mishnah in ~6 years.</p>
126
123
  <dt><a href="#MishnaYomiEvent">MishnaYomiEvent</a></dt>
127
124
  <dd><p>Event wrapper around a Mishna Yomi instance</p>
128
125
  </dd>
126
+ <dt><a href="#NachYomiIndex">NachYomiIndex</a></dt>
127
+ <dd><p>A daily regimen of learning the books of Nevi&#39;im (Prophets)
128
+ and Ketuvim (Writings).</p>
129
+ </dd>
130
+ <dt><a href="#NachYomiEvent">NachYomiEvent</a></dt>
131
+ <dd><p>Event wrapper around a Nach Yomi instance</p>
132
+ </dd>
129
133
  <dt><a href="#YerushalmiYomiEvent">YerushalmiYomiEvent</a></dt>
130
134
  <dd><p>Event wrapper around a Yerushalmi Yomi result</p>
131
135
  </dd>
@@ -140,6 +144,9 @@ Event names can be rendered in several languges using the <code>locale</code> op
140
144
  ## Constants
141
145
 
142
146
  <dl>
147
+ <dt><a href="#greg">greg</a></dt>
148
+ <dd><p>Gregorian date helper functions.</p>
149
+ </dd>
143
150
  <dt><a href="#parshiot">parshiot</a> : <code>Array.&lt;string&gt;</code></dt>
144
151
  <dd><p>The 54 parshiyot of the Torah as transilterated strings
145
152
  parshiot[0] == &#39;Bereshit&#39;, parshiot[1] == &#39;Noach&#39;, parshiot[53] == &quot;Ha&#39;Azinu&quot;.</p>
@@ -186,6 +193,9 @@ cycle began (2 February 1980 for Vilna,
186
193
  <dt><a href="#MishnaYomi">MishnaYomi</a> : <code>Object</code></dt>
187
194
  <dd><p>Describes a mishna to be read</p>
188
195
  </dd>
196
+ <dt><a href="#NachYomi">NachYomi</a> : <code>Object</code></dt>
197
+ <dd><p>Describes a chapter to be read</p>
198
+ </dd>
189
199
  <dt><a href="#CalOptions">CalOptions</a> : <code>Object</code></dt>
190
200
  <dd><p>Options to configure which events are returned</p>
191
201
  </dd>
@@ -193,94 +203,6 @@ cycle began (2 February 1980 for Vilna,
193
203
  <dd></dd>
194
204
  </dl>
195
205
 
196
- <a name="greg"></a>
197
-
198
- ## greg
199
- Gregorian date helper functions.
200
-
201
- **Kind**: global class
202
-
203
- * [greg](#greg)
204
- * [.isLeapYear(year)](#greg.isLeapYear) ⇒ <code>boolean</code>
205
- * [.daysInMonth(month, year)](#greg.daysInMonth) ⇒ <code>number</code>
206
- * [.isDate(obj)](#greg.isDate) ⇒ <code>boolean</code>
207
- * ~~[.dayOfYear(date)](#greg.dayOfYear) ⇒ <code>number</code>~~
208
- * [.greg2abs(date)](#greg.greg2abs) ⇒ <code>number</code>
209
- * [.abs2greg(theDate)](#greg.abs2greg) ⇒ <code>Date</code>
210
-
211
- <a name="greg.isLeapYear"></a>
212
-
213
- ### greg.isLeapYear(year) ⇒ <code>boolean</code>
214
- Returns true if the Gregorian year is a leap year
215
-
216
- **Kind**: static method of [<code>greg</code>](#greg)
217
-
218
- | Param | Type | Description |
219
- | --- | --- | --- |
220
- | year | <code>number</code> | Gregorian year |
221
-
222
- <a name="greg.daysInMonth"></a>
223
-
224
- ### greg.daysInMonth(month, year) ⇒ <code>number</code>
225
- Number of days in the Gregorian month for given year
226
-
227
- **Kind**: static method of [<code>greg</code>](#greg)
228
-
229
- | Param | Type | Description |
230
- | --- | --- | --- |
231
- | month | <code>number</code> | Gregorian month (1=January, 12=December) |
232
- | year | <code>number</code> | Gregorian year |
233
-
234
- <a name="greg.isDate"></a>
235
-
236
- ### greg.isDate(obj) ⇒ <code>boolean</code>
237
- Returns true if the object is a Javascript Date
238
-
239
- **Kind**: static method of [<code>greg</code>](#greg)
240
-
241
- | Param | Type |
242
- | --- | --- |
243
- | obj | <code>Object</code> |
244
-
245
- <a name="greg.dayOfYear"></a>
246
-
247
- ### ~~greg.dayOfYear(date) ⇒ <code>number</code>~~
248
- ***Deprecated***
249
-
250
- Returns number of days since January 1 of that year
251
-
252
- **Kind**: static method of [<code>greg</code>](#greg)
253
-
254
- | Param | Type | Description |
255
- | --- | --- | --- |
256
- | date | <code>Date</code> | Gregorian date |
257
-
258
- <a name="greg.greg2abs"></a>
259
-
260
- ### greg.greg2abs(date) ⇒ <code>number</code>
261
- Converts Gregorian date to absolute R.D. (Rata Die) days
262
-
263
- **Kind**: static method of [<code>greg</code>](#greg)
264
-
265
- | Param | Type | Description |
266
- | --- | --- | --- |
267
- | date | <code>Date</code> | Gregorian date |
268
-
269
- <a name="greg.abs2greg"></a>
270
-
271
- ### greg.abs2greg(theDate) ⇒ <code>Date</code>
272
- Converts from Rata Die (R.D. number) to Gregorian date.
273
- See the footnote on page 384 of ``Calendrical Calculations, Part II:
274
- Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
275
- Clamen, Software--Practice and Experience, Volume 23, Number 4
276
- (April, 1993), pages 383-404 for an explanation.
277
-
278
- **Kind**: static method of [<code>greg</code>](#greg)
279
-
280
- | Param | Type | Description |
281
- | --- | --- | --- |
282
- | theDate | <code>number</code> | R.D. number of days |
283
-
284
206
  <a name="Locale"></a>
285
207
 
286
208
  ## Locale
@@ -2266,12 +2188,12 @@ we subclass HolidayEvent to override the `url()` method.
2266
2188
  **Kind**: global class
2267
2189
 
2268
2190
  * [AsaraBTevetEvent](#AsaraBTevetEvent)
2269
- * [new AsaraBTevetEvent(date, desc, [mask], [attrs])](#new_AsaraBTevetEvent_new)
2191
+ * [new AsaraBTevetEvent(date, desc, [mask])](#new_AsaraBTevetEvent_new)
2270
2192
  * [.urlDateSuffix()](#AsaraBTevetEvent+urlDateSuffix) ⇒ <code>string</code>
2271
2193
 
2272
2194
  <a name="new_AsaraBTevetEvent_new"></a>
2273
2195
 
2274
- ### new AsaraBTevetEvent(date, desc, [mask], [attrs])
2196
+ ### new AsaraBTevetEvent(date, desc, [mask])
2275
2197
  Constructs AsaraBTevetEvent
2276
2198
 
2277
2199
 
@@ -2280,7 +2202,6 @@ Constructs AsaraBTevetEvent
2280
2202
  | date | [<code>HDate</code>](#HDate) | | Hebrew date event occurs |
2281
2203
  | desc | <code>string</code> | | Description (not translated) |
2282
2204
  | [mask] | <code>number</code> | <code>0</code> | optional holiday flags |
2283
- | [attrs] | <code>Object</code> | <code>{}</code> | |
2284
2205
 
2285
2206
  <a name="AsaraBTevetEvent+urlDateSuffix"></a>
2286
2207
 
@@ -2395,6 +2316,72 @@ Returns Mishna Yomi name (e.g. "Bava Metzia 10:5-6" or "Berakhot 9:5-Peah 1:1").
2395
2316
  Returns a link to sefaria.org
2396
2317
 
2397
2318
  **Kind**: instance method of [<code>MishnaYomiEvent</code>](#MishnaYomiEvent)
2319
+ <a name="NachYomiIndex"></a>
2320
+
2321
+ ## NachYomiIndex
2322
+ A daily regimen of learning the books of Nevi'im (Prophets)
2323
+ and Ketuvim (Writings).
2324
+
2325
+ **Kind**: global class
2326
+
2327
+ * [NachYomiIndex](#NachYomiIndex)
2328
+ * [new NachYomiIndex()](#new_NachYomiIndex_new)
2329
+ * [.lookup(date)](#NachYomiIndex+lookup) ⇒ [<code>NachYomi</code>](#NachYomi)
2330
+
2331
+ <a name="new_NachYomiIndex_new"></a>
2332
+
2333
+ ### new NachYomiIndex()
2334
+ Initializes a Nach Yomi instance
2335
+
2336
+ <a name="NachYomiIndex+lookup"></a>
2337
+
2338
+ ### nachYomiIndex.lookup(date) ⇒ [<code>NachYomi</code>](#NachYomi)
2339
+ Looks up a Mishna Yomi
2340
+
2341
+ **Kind**: instance method of [<code>NachYomiIndex</code>](#NachYomiIndex)
2342
+
2343
+ | Param | Type | Description |
2344
+ | --- | --- | --- |
2345
+ | date | <code>Date</code> \| [<code>HDate</code>](#HDate) \| <code>number</code> | Gregorian date |
2346
+
2347
+ <a name="NachYomiEvent"></a>
2348
+
2349
+ ## NachYomiEvent
2350
+ Event wrapper around a Nach Yomi instance
2351
+
2352
+ **Kind**: global class
2353
+
2354
+ * [NachYomiEvent](#NachYomiEvent)
2355
+ * [new NachYomiEvent(date, nachYomi)](#new_NachYomiEvent_new)
2356
+ * [.render([locale])](#NachYomiEvent+render) ⇒ <code>string</code>
2357
+ * [.url()](#NachYomiEvent+url) ⇒ <code>string</code>
2358
+
2359
+ <a name="new_NachYomiEvent_new"></a>
2360
+
2361
+ ### new NachYomiEvent(date, nachYomi)
2362
+
2363
+ | Param | Type |
2364
+ | --- | --- |
2365
+ | date | [<code>HDate</code>](#HDate) |
2366
+ | nachYomi | [<code>NachYomi</code>](#NachYomi) |
2367
+
2368
+ <a name="NachYomiEvent+render"></a>
2369
+
2370
+ ### nachYomiEvent.render([locale]) ⇒ <code>string</code>
2371
+ Returns name of tractate and page (e.g. "Beitzah 21").
2372
+
2373
+ **Kind**: instance method of [<code>NachYomiEvent</code>](#NachYomiEvent)
2374
+
2375
+ | Param | Type | Description |
2376
+ | --- | --- | --- |
2377
+ | [locale] | <code>string</code> | Optional locale name (defaults to active locale). |
2378
+
2379
+ <a name="NachYomiEvent+url"></a>
2380
+
2381
+ ### nachYomiEvent.url() ⇒ <code>string</code>
2382
+ Returns a link to sefaria.org
2383
+
2384
+ **Kind**: instance method of [<code>NachYomiEvent</code>](#NachYomiEvent)
2398
2385
  <a name="YerushalmiYomiEvent"></a>
2399
2386
 
2400
2387
  ## YerushalmiYomiEvent
@@ -2406,6 +2393,7 @@ Event wrapper around a Yerushalmi Yomi result
2406
2393
  * [new YerushalmiYomiEvent(date, daf)](#new_YerushalmiYomiEvent_new)
2407
2394
  * [.render([locale])](#YerushalmiYomiEvent+render) ⇒ <code>string</code>
2408
2395
  * [.renderBrief([locale])](#YerushalmiYomiEvent+renderBrief) ⇒ <code>string</code>
2396
+ * [.url()](#YerushalmiYomiEvent+url) ⇒ <code>string</code>
2409
2397
 
2410
2398
  <a name="new_YerushalmiYomiEvent_new"></a>
2411
2399
 
@@ -2438,6 +2426,12 @@ Returns name of tractate and page (e.g. "Beitzah 21").
2438
2426
  | --- | --- | --- |
2439
2427
  | [locale] | <code>string</code> | Optional locale name (defaults to active locale). |
2440
2428
 
2429
+ <a name="YerushalmiYomiEvent+url"></a>
2430
+
2431
+ ### yerushalmiYomiEvent.url() ⇒ <code>string</code>
2432
+ Returns a link to sefaria.org
2433
+
2434
+ **Kind**: instance method of [<code>YerushalmiYomiEvent</code>](#YerushalmiYomiEvent)
2441
2435
  <a name="HebrewCalendar"></a>
2442
2436
 
2443
2437
  ## HebrewCalendar
@@ -2497,6 +2491,7 @@ Additional non-default event types can be specified:
2497
2491
  * Babylonian Talmud Daf Yomi (`options.dafyomi`)
2498
2492
  * Jerusalem Talmud (Yerushalmi) Yomi (`options.yerushalmi`)
2499
2493
  * Mishna Yomi (`options.mishnaYomi`)
2494
+ * Nach Yomi (`options.nachYomi`)
2500
2495
  * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
2501
2496
  * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
2502
2497
  * Yom Kippur Katan (`options.yomKippurKatan`)
@@ -2829,6 +2824,103 @@ Holiday flags for Event
2829
2824
  | MISHNA_YOMI | <code>number</code> | <code>4194304</code> | Mishna Yomi |
2830
2825
  | YOM_KIPPUR_KATAN | <code>number</code> | <code>8388608</code> | Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh |
2831
2826
  | YERUSHALMI_YOMI | <code>number</code> | <code>16777216</code> | Daily page of Jerusalem Talmud (Yerushalmi) |
2827
+ | NACH_YOMI | <code>number</code> | <code>33554432</code> | Nach Yomi |
2828
+
2829
+ <a name="greg"></a>
2830
+
2831
+ ## greg
2832
+ Gregorian date helper functions.
2833
+
2834
+ **Kind**: global constant
2835
+
2836
+ * [greg](#greg)
2837
+ * [.monthNames](#greg.monthNames) : <code>Array.&lt;string&gt;</code>
2838
+ * [.isLeapYear(year)](#greg.isLeapYear) ⇒ <code>boolean</code>
2839
+ * [.daysInMonth(month, year)](#greg.daysInMonth) ⇒ <code>number</code>
2840
+ * [.isDate(obj)](#greg.isDate) ⇒ <code>boolean</code>
2841
+ * ~~[.dayOfYear(date)](#greg.dayOfYear) ⇒ <code>number</code>~~
2842
+ * [.greg2abs(date)](#greg.greg2abs) ⇒ <code>number</code>
2843
+ * [.abs2greg(theDate)](#greg.abs2greg) ⇒ <code>Date</code>
2844
+
2845
+ <a name="greg.monthNames"></a>
2846
+
2847
+ ### greg.monthNames : <code>Array.&lt;string&gt;</code>
2848
+ Long names of the Gregorian months (1='January', 12='December')
2849
+
2850
+ **Kind**: static property of [<code>greg</code>](#greg)
2851
+ **Read only**: true
2852
+ <a name="greg.isLeapYear"></a>
2853
+
2854
+ ### greg.isLeapYear(year) ⇒ <code>boolean</code>
2855
+ Returns true if the Gregorian year is a leap year
2856
+
2857
+ **Kind**: static method of [<code>greg</code>](#greg)
2858
+
2859
+ | Param | Type | Description |
2860
+ | --- | --- | --- |
2861
+ | year | <code>number</code> | Gregorian year |
2862
+
2863
+ <a name="greg.daysInMonth"></a>
2864
+
2865
+ ### greg.daysInMonth(month, year) ⇒ <code>number</code>
2866
+ Number of days in the Gregorian month for given year
2867
+
2868
+ **Kind**: static method of [<code>greg</code>](#greg)
2869
+
2870
+ | Param | Type | Description |
2871
+ | --- | --- | --- |
2872
+ | month | <code>number</code> | Gregorian month (1=January, 12=December) |
2873
+ | year | <code>number</code> | Gregorian year |
2874
+
2875
+ <a name="greg.isDate"></a>
2876
+
2877
+ ### greg.isDate(obj) ⇒ <code>boolean</code>
2878
+ Returns true if the object is a Javascript Date
2879
+
2880
+ **Kind**: static method of [<code>greg</code>](#greg)
2881
+
2882
+ | Param | Type |
2883
+ | --- | --- |
2884
+ | obj | <code>Object</code> |
2885
+
2886
+ <a name="greg.dayOfYear"></a>
2887
+
2888
+ ### ~~greg.dayOfYear(date) ⇒ <code>number</code>~~
2889
+ ***Deprecated***
2890
+
2891
+ Returns number of days since January 1 of that year
2892
+
2893
+ **Kind**: static method of [<code>greg</code>](#greg)
2894
+
2895
+ | Param | Type | Description |
2896
+ | --- | --- | --- |
2897
+ | date | <code>Date</code> | Gregorian date |
2898
+
2899
+ <a name="greg.greg2abs"></a>
2900
+
2901
+ ### greg.greg2abs(date) ⇒ <code>number</code>
2902
+ Converts Gregorian date to absolute R.D. (Rata Die) days
2903
+
2904
+ **Kind**: static method of [<code>greg</code>](#greg)
2905
+
2906
+ | Param | Type | Description |
2907
+ | --- | --- | --- |
2908
+ | date | <code>Date</code> | Gregorian date |
2909
+
2910
+ <a name="greg.abs2greg"></a>
2911
+
2912
+ ### greg.abs2greg(theDate) ⇒ <code>Date</code>
2913
+ Converts from Rata Die (R.D. number) to Gregorian date.
2914
+ See the footnote on page 384 of ``Calendrical Calculations, Part II:
2915
+ Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
2916
+ Clamen, Software--Practice and Experience, Volume 23, Number 4
2917
+ (April, 1993), pages 383-404 for an explanation.
2918
+
2919
+ **Kind**: static method of [<code>greg</code>](#greg)
2920
+
2921
+ | Param | Type | Description |
2922
+ | --- | --- | --- |
2923
+ | theDate | <code>number</code> | R.D. number of days |
2832
2924
 
2833
2925
  <a name="parshiot"></a>
2834
2926
 
@@ -2951,6 +3043,19 @@ Describes a mishna to be read
2951
3043
  | k | <code>string</code> | tractate name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan") |
2952
3044
  | v | <code>string</code> | verse (e.g. "2:1") |
2953
3045
 
3046
+ <a name="NachYomi"></a>
3047
+
3048
+ ## NachYomi : <code>Object</code>
3049
+ Describes a chapter to be read
3050
+
3051
+ **Kind**: global typedef
3052
+ **Properties**
3053
+
3054
+ | Name | Type | Description |
3055
+ | --- | --- | --- |
3056
+ | k | <code>string</code> | book name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan") |
3057
+ | v | <code>number</code> | chapter (e.g. "2:1") |
3058
+
2954
3059
  <a name="CalOptions"></a>
2955
3060
 
2956
3061
  ## CalOptions : <code>Object</code>
@@ -2984,6 +3089,7 @@ Options to configure which events are returned
2984
3089
  | yerushalmi | <code>boolean</code> | Jerusalem Talmud (Yerushalmi) Yomi |
2985
3090
  | yerushalmiEdition | <code>number</code> | Use 1 for Vilna, 2 for Schottenstein |
2986
3091
  | mishnaYomi | <code>boolean</code> | include Mishna Yomi |
3092
+ | nachYomi | <code>boolean</code> | include Nach Yomi |
2987
3093
  | omer | <code>boolean</code> | include Days of the Omer |
2988
3094
  | molad | <code>boolean</code> | include event announcing the molad |
2989
3095
  | ashkenazi | <code>boolean</code> | use Ashkenazi transliterations for event titles (default Sephardi transliterations) |