@hebcal/leyning 4.17.0 → 4.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,6 +23,7 @@ the third section of the parashah.
23
23
 
24
24
  [Modification of the Triennial Cycle Readings for Combined Parashot in Certain Years](https://www.rabbinicalassembly.org/sites/default/files/2021-09/cohen-triennial.pdf), Rabbi Miles B. Cohen
25
25
 
26
+ Update August 2022: Incorporated [An Emendation to Richard Eisenberg’s Complete Triennial System for Reading Torah, to Address a Rare Situation](https://www.rabbinicalassembly.org/sites/default/files/public/halakhah/teshuvot/2011-2020/heller-triennial-emendation.pdf), Rabbi Joshua Heller, 2012
26
27
 
27
28
  ## Installation
28
29
  ```bash
@@ -105,7 +106,17 @@ of full kriyah aliyot, special Maftir, special Haftarah</p>
105
106
  <dd><p>Looks up regular leyning for a weekly parsha with no special readings</p>
106
107
  </dd>
107
108
  <dt><a href="#getLeyningForParshaHaShavua">getLeyningForParshaHaShavua(ev, [il])</a> ⇒ <code><a href="#Leyning">Leyning</a></code></dt>
108
- <dd><p>Looks up leyning for a regular Shabbat parsha.</p>
109
+ <dd><p>Looks up leyning for a regular Shabbat parsha, including any special
110
+ maftir or Haftara.</p>
111
+ </dd>
112
+ <dt><a href="#getLeyningOnDate">getLeyningOnDate(hdate, il)</a> ⇒ <code><a href="#Leyning">Leyning</a></code></dt>
113
+ <dd><p>Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.</p>
114
+ <p>If <code>hdate</code> coincides with a holiday that has Torah reading, returns the
115
+ reading for that day (see <a href="#getLeyningForHoliday">getLeyningForHoliday</a>)</p>
116
+ <p>Otherwise, if <code>hdate</code> is a Saturday, returns <a href="#getLeyningForParshaHaShavua">getLeyningForParshaHaShavua</a></p>
117
+ <p>Otherwise, if <code>hdate</code> is a Monday or Thursday, returns <a href="#Leyning">Leyning</a> for the
118
+ Parashat haShavua, containing only the <code>weekday</code> aliyot (no <code>fullkriyah</code>).</p>
119
+ <p>Otherwise, returns <code>undefined</code>.</p>
109
120
  </dd>
110
121
  <dt><a href="#getTriennial">getTriennial(year)</a> ⇒ <code><a href="#Triennial">Triennial</a></code></dt>
111
122
  <dd><p>Calculates the 3-year readings for a given year</p>
@@ -113,6 +124,9 @@ of full kriyah aliyot, special Maftir, special Haftarah</p>
113
124
  <dt><a href="#getTriennialForParshaHaShavua">getTriennialForParshaHaShavua(ev, [context])</a> ⇒ <code><a href="#TriennialAliyot">TriennialAliyot</a></code> | <code>Object.&lt;string, Aliyah&gt;</code></dt>
114
125
  <dd><p>Looks up the triennial leyning for this Parashat HaShavua</p>
115
126
  </dd>
127
+ <dt><a href="#getTriennialHaftaraForHoliday">getTriennialHaftaraForHoliday(key, yearNum)</a> ⇒ <code>Object</code></dt>
128
+ <dd><p>Looks up the alternative triennial Haftara for a holiday</p>
129
+ </dd>
116
130
  </dl>
117
131
 
118
132
  ## Typedefs
@@ -313,7 +327,8 @@ Looks up regular leyning for a weekly parsha with no special readings
313
327
  <a name="getLeyningForParshaHaShavua"></a>
314
328
 
315
329
  ## getLeyningForParshaHaShavua(ev, [il]) ⇒ [<code>Leyning</code>](#Leyning)
316
- Looks up leyning for a regular Shabbat parsha.
330
+ Looks up leyning for a regular Shabbat parsha, including any special
331
+ maftir or Haftara.
317
332
 
318
333
  **Kind**: global function
319
334
  **Returns**: [<code>Leyning</code>](#Leyning) - map of aliyot
@@ -323,6 +338,29 @@ Looks up leyning for a regular Shabbat parsha.
323
338
  | ev | <code>Event</code> | | the Hebcal event associated with this leyning |
324
339
  | [il] | <code>boolean</code> | <code>false</code> | in Israel |
325
340
 
341
+ <a name="getLeyningOnDate"></a>
342
+
343
+ ## getLeyningOnDate(hdate, il) ⇒ [<code>Leyning</code>](#Leyning)
344
+ Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.
345
+
346
+ If `hdate` coincides with a holiday that has Torah reading, returns the
347
+ reading for that day (see [getLeyningForHoliday](#getLeyningForHoliday))
348
+
349
+ Otherwise, if `hdate` is a Saturday, returns [getLeyningForParshaHaShavua](#getLeyningForParshaHaShavua)
350
+
351
+ Otherwise, if `hdate` is a Monday or Thursday, returns [Leyning](#Leyning) for the
352
+ Parashat haShavua, containing only the `weekday` aliyot (no `fullkriyah`).
353
+
354
+ Otherwise, returns `undefined`.
355
+
356
+ **Kind**: global function
357
+ **Returns**: [<code>Leyning</code>](#Leyning) - map of aliyot
358
+
359
+ | Param | Type | Description |
360
+ | --- | --- | --- |
361
+ | hdate | <code>HDate</code> | Hebrew Date |
362
+ | il | <code>boolean</code> | in Israel |
363
+
326
364
  <a name="getTriennial"></a>
327
365
 
328
366
  ## getTriennial(year) ⇒ [<code>Triennial</code>](#Triennial)
@@ -347,6 +385,18 @@ Looks up the triennial leyning for this Parashat HaShavua
347
385
  | ev | <code>Event</code> | | |
348
386
  | [context] | <code>boolean</code> | <code>false</code> | returns a reading wrapper object which includes `date`, `yearNum` and `aliyot` |
349
387
 
388
+ <a name="getTriennialHaftaraForHoliday"></a>
389
+
390
+ ## getTriennialHaftaraForHoliday(key, yearNum) ⇒ <code>Object</code>
391
+ Looks up the alternative triennial Haftara for a holiday
392
+
393
+ **Kind**: global function
394
+
395
+ | Param | Type |
396
+ | --- | --- |
397
+ | key | <code>string</code> |
398
+ | yearNum | <code>number</code> |
399
+
350
400
  <a name="Aliyah"></a>
351
401
 
352
402
  ## Aliyah : <code>Object</code>