@hebcal/core 3.45.5 → 3.46.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
@@ -1,17 +1,19 @@
1
1
  # @hebcal/core
2
- Hebcal is a perpetual Jewish Calendar. This library converts between Hebrew and Gregorian
3
- dates, and generates lists of Jewish holidays for any year (past, present or future).
4
- Shabbat and holiday candle lighting and havdalah times are approximated based on
5
- location. Torah readings (Parashat HaShavua), Daf Yomi, and counting of the Omer can
6
- also be specified. Hebcal also includes algorithms to calculate yahrzeits,
7
- birthdays and anniversaries.
2
+ Hebcal is a perpetual Jewish Calendar. This library converts between
3
+ Hebrew and Gregorian dates, and generates lists of Jewish holidays for
4
+ any year (past, present or future). Shabbat and holiday candle
5
+ lighting and havdalah times are approximated based on location. Torah
6
+ readings (Parashat HaShavua), Daf Yomi, and counting of the Omer can
7
+ also be specified. Hebcal also includes algorithms to calculate
8
+ yahrzeits, birthdays and anniversaries.
8
9
 
9
10
  [![Build Status](https://github.com/hebcal/hebcal-es6/actions/workflows/node.js.yml/badge.svg)](https://github.com/hebcal/hebcal-es6/actions/workflows/node.js.yml)
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. 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
12
+ Hebcal was created in 1994 by Danny Sadinoff as a Unix/Linux program
13
+ written in C, inspired by similar functionality written in Emacs
14
+ Lisp. The initial JavaScript port was released in 2014 by Eyal
15
+ Schachter (age 15). This ECMAScript 2015 implementation was released
16
+ in 2020 by Michael J. Radwin. `@hebcal/core` targets both
15
17
  browser-based JavaScript and server-side Node.js.
16
18
 
17
19
  Many users of this library will utilize the [HebrewCalendar](#HebrewCalendar)
@@ -124,6 +126,9 @@ each day in order to finish the entire Mishnah in ~6 years.</p>
124
126
  <dt><a href="#MishnaYomiEvent">MishnaYomiEvent</a></dt>
125
127
  <dd><p>Event wrapper around a Mishna Yomi instance</p>
126
128
  </dd>
129
+ <dt><a href="#YerushalmiYomiEvent">YerushalmiYomiEvent</a></dt>
130
+ <dd><p>Event wrapper around a Yerushalmi Yomi result</p>
131
+ </dd>
127
132
  <dt><a href="#HebrewCalendar">HebrewCalendar</a></dt>
128
133
  <dd><p>HebrewCalendar is the main interface to the <code>@hebcal/core</code> library.
129
134
  This namespace is used to calculate holidays, rosh chodesh, candle lighting &amp; havdalah times,
@@ -149,6 +154,19 @@ parshiot[0] == &#39;Bereshit&#39;, parshiot[1] == &#39;Noach&#39;, parshiot[53]
149
154
  <p>When specifying years of the Hebrew calendar in the present millennium,
150
155
  we omit the thousands (which is presently 5 [ה]).</p>
151
156
  </dd>
157
+ <dt><a href="#yerushalmiYomi">yerushalmiYomi(date, config)</a> ⇒ <code>any</code></dt>
158
+ <dd><p>Using the Vilna edition, the Yerushalmi Daf Yomi program takes
159
+ ~4.25 years or 51 months.
160
+ Unlike the Daf Yomi Bavli cycle, this Yerushalmi cycle skips both
161
+ Yom Kippur and Tisha B&#39;Av (returning <code>null</code>).
162
+ The page numbers are according to the Vilna
163
+ Edition which is used since 1900.</p>
164
+ <p>The Schottenstein edition uses different page numbers and takes
165
+ ~6 years to complete.</p>
166
+ <p>Throws an exception if the date is before Daf Yomi Yerushalmi
167
+ cycle began (2 February 1980 for Vilna,
168
+ 14 November 2022 for Schottenstein).</p>
169
+ </dd>
152
170
  </dl>
153
171
 
154
172
  ## Typedefs
@@ -2371,6 +2389,37 @@ Returns Mishna Yomi name (e.g. "Bava Metzia 10:5-6" or "Berakhot 9:5-Peah 1:1").
2371
2389
  Returns a link to sefaria.org
2372
2390
 
2373
2391
  **Kind**: instance method of [<code>MishnaYomiEvent</code>](#MishnaYomiEvent)
2392
+ <a name="YerushalmiYomiEvent"></a>
2393
+
2394
+ ## YerushalmiYomiEvent
2395
+ Event wrapper around a Yerushalmi Yomi result
2396
+
2397
+ **Kind**: global class
2398
+
2399
+ * [YerushalmiYomiEvent](#YerushalmiYomiEvent)
2400
+ * [new YerushalmiYomiEvent(date, daf)](#new_YerushalmiYomiEvent_new)
2401
+ * [.render([locale])](#YerushalmiYomiEvent+render) ⇒ <code>string</code>
2402
+
2403
+ <a name="new_YerushalmiYomiEvent_new"></a>
2404
+
2405
+ ### new YerushalmiYomiEvent(date, daf)
2406
+
2407
+ | Param | Type |
2408
+ | --- | --- |
2409
+ | date | [<code>HDate</code>](#HDate) |
2410
+ | daf | <code>any</code> |
2411
+
2412
+ <a name="YerushalmiYomiEvent+render"></a>
2413
+
2414
+ ### yerushalmiYomiEvent.render([locale]) ⇒ <code>string</code>
2415
+ Returns name of tractate and page (e.g. "Yerushalmi Beitzah 21").
2416
+
2417
+ **Kind**: instance method of [<code>YerushalmiYomiEvent</code>](#YerushalmiYomiEvent)
2418
+
2419
+ | Param | Type | Description |
2420
+ | --- | --- | --- |
2421
+ | [locale] | <code>string</code> | Optional locale name (defaults to active locale). |
2422
+
2374
2423
  <a name="HebrewCalendar"></a>
2375
2424
 
2376
2425
  ## HebrewCalendar
@@ -2427,7 +2476,8 @@ Set `options.il=true` to use the Israeli schedule.
2427
2476
  Additional non-default event types can be specified:
2428
2477
  * Parashat HaShavua - weekly Torah Reading on Saturdays (`options.sedrot`)
2429
2478
  * Counting of the Omer (`options.omer`)
2430
- * Daf Yomi (`options.dafyomi`)
2479
+ * Babylonian Talmud Daf Yomi (`options.dafyomi`)
2480
+ * Jerusalem Talmud (Yerushalmi) Yomi (`options.yerushalmi`)
2431
2481
  * Mishna Yomi (`options.mishnaYomi`)
2432
2482
  * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
2433
2483
  * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
@@ -2442,7 +2492,8 @@ the times are guaranteed to be wrong.
2442
2492
 
2443
2493
  To add candle-lighting options, set `options.candlelighting=true` and set
2444
2494
  `options.location` to an instance of `Location`. By default, candle lighting
2445
- time is 18 minutes before sundown (40 minutes for Jerusalem, 30 minutes for Haifa and Zikhron Ya'akov) and Havdalah is
2495
+ time is 18 minutes before sundown (40 minutes for Jerusalem,
2496
+ 30 minutes for Haifa and Zikhron Ya'akov) and Havdalah is
2446
2497
  calculated according to Tzeit Hakochavim - Nightfall (the point when 3 small stars
2447
2498
  are observable in the night time sky with the naked eye). The default Havdalah
2448
2499
  option (Tzeit Hakochavim) is calculated when the sun is 8.5° below the horizon.
@@ -2746,7 +2797,7 @@ Holiday flags for Event
2746
2797
  | MINOR_FAST | <code>number</code> | <code>256</code> | Minor fasts like Tzom Tammuz, Ta'anit Esther, ... |
2747
2798
  | SPECIAL_SHABBAT | <code>number</code> | <code>512</code> | Shabbat Shekalim, Zachor, ... |
2748
2799
  | PARSHA_HASHAVUA | <code>number</code> | <code>1024</code> | Weekly sedrot on Saturdays |
2749
- | DAF_YOMI | <code>number</code> | <code>2048</code> | Daily page of Talmud |
2800
+ | DAF_YOMI | <code>number</code> | <code>2048</code> | Daily page of Talmud (Bavli) |
2750
2801
  | OMER_COUNT | <code>number</code> | <code>4096</code> | Days of the Omer |
2751
2802
  | MODERN_HOLIDAY | <code>number</code> | <code>8192</code> | Yom HaShoah, Yom HaAtzma'ut, ... |
2752
2803
  | MAJOR_FAST | <code>number</code> | <code>16384</code> | Yom Kippur and Tish'a B'Av |
@@ -2759,6 +2810,7 @@ Holiday flags for Event
2759
2810
  | CHOL_HAMOED | <code>number</code> | <code>2097152</code> | Chol haMoed, intermediate days of Pesach or Sukkot |
2760
2811
  | MISHNA_YOMI | <code>number</code> | <code>4194304</code> | Mishna Yomi |
2761
2812
  | YOM_KIPPUR_KATAN | <code>number</code> | <code>8388608</code> | Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh |
2813
+ | YERUSHALMI_YOMI | <code>number</code> | <code>16777216</code> | Daily page of Jerusalem Talmud (Yerushalmi) |
2762
2814
 
2763
2815
  <a name="parshiot"></a>
2764
2816
 
@@ -2790,6 +2842,30 @@ gematriya(60) // 'ס׳'
2790
2842
  gematriya(3761) // 'ג׳תשס״א'
2791
2843
  gematriya(1123) // 'א׳קכ״ג'
2792
2844
  ```
2845
+ <a name="yerushalmiYomi"></a>
2846
+
2847
+ ## yerushalmiYomi(date, config) ⇒ <code>any</code>
2848
+ Using the Vilna edition, the Yerushalmi Daf Yomi program takes
2849
+ ~4.25 years or 51 months.
2850
+ Unlike the Daf Yomi Bavli cycle, this Yerushalmi cycle skips both
2851
+ Yom Kippur and Tisha B'Av (returning `null`).
2852
+ The page numbers are according to the Vilna
2853
+ Edition which is used since 1900.
2854
+
2855
+ The Schottenstein edition uses different page numbers and takes
2856
+ ~6 years to complete.
2857
+
2858
+ Throws an exception if the date is before Daf Yomi Yerushalmi
2859
+ cycle began (2 February 1980 for Vilna,
2860
+ 14 November 2022 for Schottenstein).
2861
+
2862
+ **Kind**: global function
2863
+
2864
+ | Param | Type | Description |
2865
+ | --- | --- | --- |
2866
+ | date | [<code>HDate</code>](#HDate) \| <code>Date</code> \| <code>number</code> | Hebrew or Gregorian date |
2867
+ | config | <code>any</code> | either vilna or schottenstein |
2868
+
2793
2869
  <a name="ZmanimTimesResult"></a>
2794
2870
 
2795
2871
  ## ZmanimTimesResult : <code>Object</code>
@@ -2872,7 +2948,9 @@ Options to configure which events are returned
2872
2948
  | shabbatMevarchim | <code>boolean</code> | add Shabbat Mevarchim |
2873
2949
  | noSpecialShabbat | <code>boolean</code> | suppress Special Shabbat |
2874
2950
  | noHolidays | <code>boolean</code> | suppress regular holidays |
2875
- | dafyomi | <code>boolean</code> | include Daf Yomi |
2951
+ | dafyomi | <code>boolean</code> | Babylonian Talmud Daf Yomi |
2952
+ | yerushalmi | <code>boolean</code> | Jerusalem Talmud (Yerushalmi) Yomi |
2953
+ | yerushalmiEdition | <code>number</code> | Use 1 for Vilna, 2 for Schottenstein |
2876
2954
  | mishnaYomi | <code>boolean</code> | include Mishna Yomi |
2877
2955
  | omer | <code>boolean</code> | include Days of the Omer |
2878
2956
  | molad | <code>boolean</code> | include event announcing the molad |