@hebcal/core 3.32.1 → 3.33.3

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
@@ -14,7 +14,7 @@ by similar functionality written in Emacs Lisp. The initial JavaScript port was
14
14
  by Michael J. Radwin. `@hebcal/core` targets both
15
15
  browser-based JavaScript and server-side Node.js.
16
16
 
17
- Many users of this library will utilize the [HebrewCalendar.calendar()](#HebrewCalendar.calendar)
17
+ Many users of this library will utilize the [HebrewCalendar](#HebrewCalendar)
18
18
  and [HDate](#HDate) interfaces.
19
19
 
20
20
  ## Installation
@@ -104,6 +104,13 @@ we subclass HolidayEvent to override the <code>url()</code> method.</p>
104
104
  <dt><a href="#MevarchimChodeshEvent">MevarchimChodeshEvent</a></dt>
105
105
  <dd><p>Represents Mevarchim haChodesh, the announcement of the new month</p>
106
106
  </dd>
107
+ <dt><a href="#MishnaYomiIndex">MishnaYomiIndex</a></dt>
108
+ <dd><p>A program of daily learning in which participants study two Mishnahs
109
+ each day in order to finish the entire Mishnah in ~6 years.</p>
110
+ </dd>
111
+ <dt><a href="#MishnaYomiEvent">MishnaYomiEvent</a></dt>
112
+ <dd><p>Event wrapper around a Mishna Yomi instance</p>
113
+ </dd>
107
114
  </dl>
108
115
 
109
116
  ## Objects
@@ -143,7 +150,9 @@ Event names can be rendered in several languges using the <code>locale</code> op
143
150
 
144
151
  <dl>
145
152
  <dt><a href="#gematriya">gematriya(number)</a> ⇒ <code>string</code></dt>
146
- <dd><p>Converts a numerical value to a string of Hebrew letters</p>
153
+ <dd><p>Converts a numerical value to a string of Hebrew letters.</p>
154
+ <p>When specifying years of the Hebrew calendar in the present millennium,
155
+ we omit the thousands (which is presently 5 [ה]).</p>
147
156
  </dd>
148
157
  </dl>
149
158
 
@@ -155,6 +164,9 @@ Event names can be rendered in several languges using the <code>locale</code> op
155
164
  <dt><a href="#SedraResult">SedraResult</a> : <code>Object</code></dt>
156
165
  <dd><p>Result of Sedra.lookup</p>
157
166
  </dd>
167
+ <dt><a href="#MishnaYomi">MishnaYomi</a> : <code>Object</code></dt>
168
+ <dd><p>Options to configure which events are returned</p>
169
+ </dd>
158
170
  </dl>
159
171
 
160
172
  <a name="HDate"></a>
@@ -1646,7 +1658,7 @@ Initializes a daf yomi instance
1646
1658
 
1647
1659
  | Param | Type | Description |
1648
1660
  | --- | --- | --- |
1649
- | gregdate | <code>Date</code> | Gregorian date |
1661
+ | gregdate | <code>Date</code> \| [<code>HDate</code>](#HDate) \| <code>number</code> | Gregorian date |
1650
1662
 
1651
1663
  <a name="DafYomi+getBlatt"></a>
1652
1664
 
@@ -2004,6 +2016,77 @@ Returns (translated) description of this event
2004
2016
  | --- | --- | --- |
2005
2017
  | [locale] | <code>string</code> | Optional locale name (defaults to active locale). |
2006
2018
 
2019
+ <a name="MishnaYomiIndex"></a>
2020
+
2021
+ ## MishnaYomiIndex
2022
+ A program of daily learning in which participants study two Mishnahs
2023
+ each day in order to finish the entire Mishnah in ~6 years.
2024
+
2025
+ **Kind**: global class
2026
+
2027
+ * [MishnaYomiIndex](#MishnaYomiIndex)
2028
+ * [new MishnaYomiIndex()](#new_MishnaYomiIndex_new)
2029
+ * [.days](#MishnaYomiIndex+days) : [<code>Array.&lt;MishnaYomi&gt;</code>](#MishnaYomi)
2030
+ * [.lookup(date)](#MishnaYomiIndex+lookup) ⇒ [<code>Array.&lt;MishnaYomi&gt;</code>](#MishnaYomi)
2031
+
2032
+ <a name="new_MishnaYomiIndex_new"></a>
2033
+
2034
+ ### new MishnaYomiIndex()
2035
+ Initializes a Mishna Yomi instance
2036
+
2037
+ <a name="MishnaYomiIndex+days"></a>
2038
+
2039
+ ### mishnaYomiIndex.days : [<code>Array.&lt;MishnaYomi&gt;</code>](#MishnaYomi)
2040
+ **Kind**: instance property of [<code>MishnaYomiIndex</code>](#MishnaYomiIndex)
2041
+ <a name="MishnaYomiIndex+lookup"></a>
2042
+
2043
+ ### mishnaYomiIndex.lookup(date) ⇒ [<code>Array.&lt;MishnaYomi&gt;</code>](#MishnaYomi)
2044
+ Looks up a Mishna Yomi
2045
+
2046
+ **Kind**: instance method of [<code>MishnaYomiIndex</code>](#MishnaYomiIndex)
2047
+
2048
+ | Param | Type | Description |
2049
+ | --- | --- | --- |
2050
+ | date | <code>Date</code> \| [<code>HDate</code>](#HDate) \| <code>number</code> | Gregorian date |
2051
+
2052
+ <a name="MishnaYomiEvent"></a>
2053
+
2054
+ ## MishnaYomiEvent
2055
+ Event wrapper around a Mishna Yomi instance
2056
+
2057
+ **Kind**: global class
2058
+
2059
+ * [MishnaYomiEvent](#MishnaYomiEvent)
2060
+ * [new MishnaYomiEvent(date, mishnaYomi)](#new_MishnaYomiEvent_new)
2061
+ * [.render([locale])](#MishnaYomiEvent+render) ⇒ <code>string</code>
2062
+ * [.url()](#MishnaYomiEvent+url) ⇒ <code>string</code>
2063
+
2064
+ <a name="new_MishnaYomiEvent_new"></a>
2065
+
2066
+ ### new MishnaYomiEvent(date, mishnaYomi)
2067
+
2068
+ | Param | Type |
2069
+ | --- | --- |
2070
+ | date | [<code>HDate</code>](#HDate) |
2071
+ | mishnaYomi | [<code>Array.&lt;MishnaYomi&gt;</code>](#MishnaYomi) |
2072
+
2073
+ <a name="MishnaYomiEvent+render"></a>
2074
+
2075
+ ### mishnaYomiEvent.render([locale]) ⇒ <code>string</code>
2076
+ Returns Mishna Yomi name (e.g. "Bava Metzia 10:5-6" or "Berakhot 9:5-Peah 1:1").
2077
+
2078
+ **Kind**: instance method of [<code>MishnaYomiEvent</code>](#MishnaYomiEvent)
2079
+
2080
+ | Param | Type | Description |
2081
+ | --- | --- | --- |
2082
+ | [locale] | <code>string</code> | Optional locale name (defaults to active locale). |
2083
+
2084
+ <a name="MishnaYomiEvent+url"></a>
2085
+
2086
+ ### mishnaYomiEvent.url() ⇒ <code>string</code>
2087
+ Returns a link to sefaria.org
2088
+
2089
+ **Kind**: instance method of [<code>MishnaYomiEvent</code>](#MishnaYomiEvent)
2007
2090
  <a name="greg"></a>
2008
2091
 
2009
2092
  ## greg : <code>object</code>
@@ -2102,7 +2185,7 @@ Clamen, Software--Practice and Experience, Volume 23, Number 4
2102
2185
 
2103
2186
  ## Locale : <code>object</code>
2104
2187
  A locale in Hebcal is used for translations/transliterations of
2105
- holidays. `@hebcal/core` supports three locales by default
2188
+ holidays. `@hebcal/core` supports four locales by default
2106
2189
  * `en` - default, Sephardic transliterations (e.g. "Shabbat")
2107
2190
  * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
2108
2191
  * `he` - Hebrew (e.g. "שַׁבָּת")
@@ -2116,6 +2199,7 @@ holidays. `@hebcal/core` supports three locales by default
2116
2199
  * [.addLocale(locale, data)](#Locale.addLocale)
2117
2200
  * [.useLocale(locale)](#Locale.useLocale) ⇒ <code>LocaleData</code>
2118
2201
  * [.getLocaleName()](#Locale.getLocaleName) ⇒ <code>string</code>
2202
+ * [.getLocaleNames()](#Locale.getLocaleNames) ⇒ <code>Array.&lt;string&gt;</code>
2119
2203
  * [.ordinal(n, [locale])](#Locale.ordinal) ⇒ <code>string</code>
2120
2204
  * [.hebrewStripNikkud(str)](#Locale.hebrewStripNikkud) ⇒ <code>string</code>
2121
2205
 
@@ -2174,6 +2258,12 @@ will be represented by the corresponding translation in the specified locale.
2174
2258
  ### Locale.getLocaleName() ⇒ <code>string</code>
2175
2259
  Returns the name of the active locale (i.e. 'he', 'ashkenazi', 'fr')
2176
2260
 
2261
+ **Kind**: static method of [<code>Locale</code>](#Locale)
2262
+ <a name="Locale.getLocaleNames"></a>
2263
+
2264
+ ### Locale.getLocaleNames() ⇒ <code>Array.&lt;string&gt;</code>
2265
+ Returns the names of registered locales
2266
+
2177
2267
  **Kind**: static method of [<code>Locale</code>](#Locale)
2178
2268
  <a name="Locale.ordinal"></a>
2179
2269
 
@@ -2254,6 +2344,7 @@ Holiday flags for Event
2254
2344
  | MINOR_HOLIDAY | <code>number</code> | <code>MINOR_HOLIDAY$2</code> | A holiday that's not major, modern, rosh chodesh, or a fast day |
2255
2345
  | EREV | <code>number</code> | <code>EREV$2</code> | Evening before a major or minor holiday |
2256
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 |
2257
2348
 
2258
2349
  <a name="parshiot"></a>
2259
2350
 
@@ -2319,6 +2410,7 @@ Additional non-default event types can be specified:
2319
2410
  * Parashat HaShavua - weekly Torah Reading on Saturdays (`options.sedrot`)
2320
2411
  * Counting of the Omer (`options.omer`)
2321
2412
  * Daf Yomi (`options.dafyomi`)
2413
+ * Mishna Yomi (`options.mishnaYomi`)
2322
2414
  * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
2323
2415
  * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
2324
2416
 
@@ -2568,6 +2660,7 @@ Options to configure which events are returned
2568
2660
  | noSpecialShabbat | <code>boolean</code> | suppress Special Shabbat |
2569
2661
  | noHolidays | <code>boolean</code> | suppress regular holidays |
2570
2662
  | dafyomi | <code>boolean</code> | include Daf Yomi |
2663
+ | mishnaYomi | <code>boolean</code> | include Mishna Yomi |
2571
2664
  | omer | <code>boolean</code> | include Days of the Omer |
2572
2665
  | molad | <code>boolean</code> | include event announcing the molad |
2573
2666
  | ashkenazi | <code>boolean</code> | use Ashkenazi transliterations for event titles (default Sephardi transliterations) |
@@ -2579,7 +2672,10 @@ Options to configure which events are returned
2579
2672
  <a name="gematriya"></a>
2580
2673
 
2581
2674
  ## gematriya(number) ⇒ <code>string</code>
2582
- Converts a numerical value to a string of Hebrew letters
2675
+ Converts a numerical value to a string of Hebrew letters.
2676
+
2677
+ When specifying years of the Hebrew calendar in the present millennium,
2678
+ we omit the thousands (which is presently 5 [ה]).
2583
2679
 
2584
2680
  **Kind**: global function
2585
2681
 
@@ -2589,7 +2685,11 @@ Converts a numerical value to a string of Hebrew letters
2589
2685
 
2590
2686
  **Example**
2591
2687
  ```js
2592
- gematriya(5774) // תשע״ד - cropped to 774
2688
+ gematriya(5774) // 'תשע״ד' - cropped to 774
2689
+ gematriya(25) // 'כ״ה'
2690
+ gematriya(60) // 'ס׳'
2691
+ gematriya(3761) // 'ג׳תשס״א'
2692
+ gematriya(1123) // 'א׳קכ״ג'
2593
2693
  ```
2594
2694
  <a name="ZmanimTimesResult"></a>
2595
2695
 
@@ -2629,3 +2729,16 @@ Result of Sedra.lookup
2629
2729
  | --- | --- | --- |
2630
2730
  | parsha | <code>Array.&lt;string&gt;</code> | Name of the parsha (or parshiyot) read on Hebrew date, e.g. `['Noach']` or `['Matot', 'Masei']` |
2631
2731
  | chag | <code>boolean</code> | True if this is a regular parasha HaShavua Torah reading, false if it's a special holiday reading |
2732
+
2733
+ <a name="MishnaYomi"></a>
2734
+
2735
+ ## MishnaYomi : <code>Object</code>
2736
+ Options to configure which events are returned
2737
+
2738
+ **Kind**: global typedef
2739
+ **Properties**
2740
+
2741
+ | Name | Type | Description |
2742
+ | --- | --- | --- |
2743
+ | k | <code>string</code> | tractate name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan") |
2744
+ | v | <code>string</code> | verse (e.g. "2:1") |