@hebcal/core 5.0.6 → 5.0.8

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
@@ -167,17 +167,6 @@ parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[53]
167
167
  ## Functions
168
168
 
169
169
  <dl>
170
- <dt><a href="#gematriya">gematriya(number)</a> ⇒ <code>string</code></dt>
171
- <dd><p>Converts a numerical value to a string of Hebrew letters.</p>
172
- <p>When specifying years of the Hebrew calendar in the present millennium,
173
- we omit the thousands (which is presently 5 [ה]).</p>
174
- </dd>
175
- <dt><a href="#gematriyaStrToNum">gematriyaStrToNum(str)</a> ⇒ <code>number</code></dt>
176
- <dd><p>Converts a string of Hebrew letters to a numerical value.</p>
177
- <p>Only considers the value of Hebrew letters <code>א</code> through <code>ת</code>.
178
- Ignores final Hebrew letters such as <code>ך</code> (kaf sofit) or <code>ם</code> (mem sofit)
179
- and vowels (nekudot).</p>
180
- </dd>
181
170
  <dt><a href="#hebrew2abs">hebrew2abs(year, month, day)</a> ⇒ <code>number</code></dt>
182
171
  <dd><p>Converts Hebrew date to R.D. (Rata Die) fixed days.
183
172
  R.D. 1 is the imaginary date Monday, January 1, 1 on the Gregorian
@@ -217,6 +206,17 @@ A leap Hebrew calendar year can have a length of 383, 384 or 385 days</p>
217
206
  <dt><a href="#monthFromName">monthFromName(monthName)</a> ⇒ <code>number</code></dt>
218
207
  <dd><p>Converts Hebrew month string name to numeric</p>
219
208
  </dd>
209
+ <dt><a href="#gematriya">gematriya(num)</a> ⇒ <code>string</code></dt>
210
+ <dd><p>Converts a numerical value to a string of Hebrew letters.</p>
211
+ <p>When specifying years of the Hebrew calendar in the present millennium,
212
+ we omit the thousands (which is presently 5 [ה]).</p>
213
+ </dd>
214
+ <dt><a href="#gematriyaStrToNum">gematriyaStrToNum(str)</a> ⇒ <code>number</code></dt>
215
+ <dd><p>Converts a string of Hebrew letters to a numerical value.</p>
216
+ <p>Only considers the value of Hebrew letters <code>א</code> through <code>ת</code>.
217
+ Ignores final Hebrew letters such as <code>ך</code> (kaf sofit) or <code>ם</code> (mem sofit)
218
+ and vowels (nekudot).</p>
219
+ </dd>
220
220
  </dl>
221
221
 
222
222
  ## Typedefs
@@ -1916,7 +1916,9 @@ https://gml.noaa.gov/grad/solcalc/calcdetails.html
1916
1916
  * [.sofZmanShma()](#Zmanim+sofZmanShma) ⇒ <code>Date</code>
1917
1917
  * [.sofZmanTfilla()](#Zmanim+sofZmanTfilla) ⇒ <code>Date</code>
1918
1918
  * [.sofZmanShmaMGA()](#Zmanim+sofZmanShmaMGA) ⇒ <code>Date</code>
1919
+ * [.sofZmanShmaMGA16Point1()](#Zmanim+sofZmanShmaMGA16Point1) ⇒ <code>Date</code>
1919
1920
  * [.sofZmanTfillaMGA()](#Zmanim+sofZmanTfillaMGA) ⇒ <code>Date</code>
1921
+ * [.sofZmanTfillaMGA16Point1()](#Zmanim+sofZmanTfillaMGA16Point1) ⇒ <code>Date</code>
1920
1922
  * [.minchaGedola()](#Zmanim+minchaGedola) ⇒ <code>Date</code>
1921
1923
  * [.minchaKetana()](#Zmanim+minchaKetana) ⇒ <code>Date</code>
1922
1924
  * [.plagHaMincha()](#Zmanim+plagHaMincha) ⇒ <code>Date</code>
@@ -2053,7 +2055,18 @@ Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra
2053
2055
  <a name="Zmanim+sofZmanShmaMGA"></a>
2054
2056
 
2055
2057
  ### zmanim.sofZmanShmaMGA() ⇒ <code>Date</code>
2056
- Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham
2058
+ Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
2059
+ Based on the opinion of the MGA that the day is calculated from
2060
+ dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed
2061
+ 72 minutes after sea-level sunset.
2062
+
2063
+ **Kind**: instance method of [<code>Zmanim</code>](#Zmanim)
2064
+ <a name="Zmanim+sofZmanShmaMGA16Point1"></a>
2065
+
2066
+ ### zmanim.sofZmanShmaMGA16Point1() ⇒ <code>Date</code>
2067
+ Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
2068
+ Based on the opinion of the MGA that the day is calculated from
2069
+ dawn to nightfall with both being 16.1° below the horizon.
2057
2070
 
2058
2071
  **Kind**: instance method of [<code>Zmanim</code>](#Zmanim)
2059
2072
  <a name="Zmanim+sofZmanTfillaMGA"></a>
@@ -2061,6 +2074,14 @@ Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham
2061
2074
  ### zmanim.sofZmanTfillaMGA() ⇒ <code>Date</code>
2062
2075
  Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
2063
2076
 
2077
+ **Kind**: instance method of [<code>Zmanim</code>](#Zmanim)
2078
+ <a name="Zmanim+sofZmanTfillaMGA16Point1"></a>
2079
+
2080
+ ### zmanim.sofZmanTfillaMGA16Point1() ⇒ <code>Date</code>
2081
+ Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
2082
+ Based on the opinion of the MGA that the day is calculated from
2083
+ dawn to nightfall with both being 16.1° below the horizon.
2084
+
2064
2085
  **Kind**: instance method of [<code>Zmanim</code>](#Zmanim)
2065
2086
  <a name="Zmanim+minchaGedola"></a>
2066
2087
 
@@ -2182,14 +2203,14 @@ An event that has an `eventTime` and `eventTimeStr`
2182
2203
  **Kind**: global class
2183
2204
 
2184
2205
  * [TimedEvent](#TimedEvent)
2185
- * [new TimedEvent(date, desc, mask, eventTime, location, linkedEvent)](#new_TimedEvent_new)
2206
+ * [new TimedEvent(date, desc, mask, eventTime, location, linkedEvent, options)](#new_TimedEvent_new)
2186
2207
  * [.render([locale])](#TimedEvent+render) ⇒ <code>string</code>
2187
2208
  * [.renderBrief([locale])](#TimedEvent+renderBrief) ⇒ <code>string</code>
2188
2209
  * [.getCategories()](#TimedEvent+getCategories) ⇒ <code>Array.&lt;string&gt;</code>
2189
2210
 
2190
2211
  <a name="new_TimedEvent_new"></a>
2191
2212
 
2192
- ### new TimedEvent(date, desc, mask, eventTime, location, linkedEvent)
2213
+ ### new TimedEvent(date, desc, mask, eventTime, location, linkedEvent, options)
2193
2214
 
2194
2215
  | Param | Type | Description |
2195
2216
  | --- | --- | --- |
@@ -2199,6 +2220,7 @@ An event that has an `eventTime` and `eventTimeStr`
2199
2220
  | eventTime | <code>Date</code> | |
2200
2221
  | location | [<code>Location</code>](#Location) | |
2201
2222
  | linkedEvent | [<code>Event</code>](#Event) | |
2223
+ | options | [<code>CalOptions</code>](#CalOptions) | |
2202
2224
 
2203
2225
  <a name="TimedEvent+render"></a>
2204
2226
 
@@ -2232,14 +2254,14 @@ Havdalah after Shabbat or holiday
2232
2254
  **Kind**: global class
2233
2255
 
2234
2256
  * [HavdalahEvent](#HavdalahEvent)
2235
- * [new HavdalahEvent(date, mask, eventTime, location, havdalahMins, linkedEvent)](#new_HavdalahEvent_new)
2257
+ * [new HavdalahEvent(date, mask, eventTime, location, havdalahMins, linkedEvent, options)](#new_HavdalahEvent_new)
2236
2258
  * [.render([locale])](#HavdalahEvent+render) ⇒ <code>string</code>
2237
2259
  * [.renderBrief([locale])](#HavdalahEvent+renderBrief) ⇒ <code>string</code>
2238
2260
  * [.getEmoji()](#HavdalahEvent+getEmoji) ⇒ <code>string</code>
2239
2261
 
2240
2262
  <a name="new_HavdalahEvent_new"></a>
2241
2263
 
2242
- ### new HavdalahEvent(date, mask, eventTime, location, havdalahMins, linkedEvent)
2264
+ ### new HavdalahEvent(date, mask, eventTime, location, havdalahMins, linkedEvent, options)
2243
2265
 
2244
2266
  | Param | Type |
2245
2267
  | --- | --- |
@@ -2249,6 +2271,7 @@ Havdalah after Shabbat or holiday
2249
2271
  | location | [<code>Location</code>](#Location) |
2250
2272
  | havdalahMins | <code>number</code> |
2251
2273
  | linkedEvent | [<code>Event</code>](#Event) |
2274
+ | options | [<code>CalOptions</code>](#CalOptions) |
2252
2275
 
2253
2276
  <a name="HavdalahEvent+render"></a>
2254
2277
 
@@ -2282,12 +2305,12 @@ Candle lighting before Shabbat or holiday
2282
2305
  **Kind**: global class
2283
2306
 
2284
2307
  * [CandleLightingEvent](#CandleLightingEvent)
2285
- * [new CandleLightingEvent(date, mask, eventTime, location, linkedEvent)](#new_CandleLightingEvent_new)
2308
+ * [new CandleLightingEvent(date, mask, eventTime, location, linkedEvent, options)](#new_CandleLightingEvent_new)
2286
2309
  * [.getEmoji()](#CandleLightingEvent+getEmoji) ⇒ <code>string</code>
2287
2310
 
2288
2311
  <a name="new_CandleLightingEvent_new"></a>
2289
2312
 
2290
- ### new CandleLightingEvent(date, mask, eventTime, location, linkedEvent)
2313
+ ### new CandleLightingEvent(date, mask, eventTime, location, linkedEvent, options)
2291
2314
 
2292
2315
  | Param | Type |
2293
2316
  | --- | --- |
@@ -2296,6 +2319,7 @@ Candle lighting before Shabbat or holiday
2296
2319
  | eventTime | <code>Date</code> |
2297
2320
  | location | [<code>Location</code>](#Location) |
2298
2321
  | linkedEvent | [<code>Event</code>](#Event) |
2322
+ | options | [<code>CalOptions</code>](#CalOptions) |
2299
2323
 
2300
2324
  <a name="CandleLightingEvent+getEmoji"></a>
2301
2325
 
@@ -2317,6 +2341,7 @@ Represents a molad, the moment when the new moon is "born"
2317
2341
  * [.getHour()](#Molad+getHour) ⇒ <code>number</code>
2318
2342
  * [.getMinutes()](#Molad+getMinutes) ⇒ <code>number</code>
2319
2343
  * [.getChalakim()](#Molad+getChalakim) ⇒ <code>number</code>
2344
+ * [.render([locale], options)](#Molad+render) ⇒ <code>string</code>
2320
2345
 
2321
2346
  <a name="new_Molad_new"></a>
2322
2347
 
@@ -2361,6 +2386,16 @@ Calculates the molad for a Hebrew month
2361
2386
  ### molad.getChalakim() ⇒ <code>number</code>
2362
2387
  **Kind**: instance method of [<code>Molad</code>](#Molad)
2363
2388
  **Returns**: <code>number</code> - parts of a minute (0-17)
2389
+ <a name="Molad+render"></a>
2390
+
2391
+ ### molad.render([locale], options) ⇒ <code>string</code>
2392
+ **Kind**: instance method of [<code>Molad</code>](#Molad)
2393
+
2394
+ | Param | Type | Description |
2395
+ | --- | --- | --- |
2396
+ | [locale] | <code>string</code> | Optional locale name (defaults to active locale) |
2397
+ | options | [<code>CalOptions</code>](#CalOptions) | |
2398
+
2364
2399
  <a name="MoladEvent"></a>
2365
2400
 
2366
2401
  ## MoladEvent
@@ -2369,18 +2404,19 @@ Represents a Molad announcement on Shabbat Mevarchim
2369
2404
  **Kind**: global class
2370
2405
 
2371
2406
  * [MoladEvent](#MoladEvent)
2372
- * [new MoladEvent(date, hyear, hmonth)](#new_MoladEvent_new)
2407
+ * [new MoladEvent(date, hyear, hmonth, options)](#new_MoladEvent_new)
2373
2408
  * [.render([locale])](#MoladEvent+render) ⇒ <code>string</code>
2374
2409
 
2375
2410
  <a name="new_MoladEvent_new"></a>
2376
2411
 
2377
- ### new MoladEvent(date, hyear, hmonth)
2412
+ ### new MoladEvent(date, hyear, hmonth, options)
2378
2413
 
2379
2414
  | Param | Type | Description |
2380
2415
  | --- | --- | --- |
2381
2416
  | date | [<code>HDate</code>](#HDate) | Hebrew date event occurs |
2382
2417
  | hyear | <code>number</code> | molad year |
2383
2418
  | hmonth | <code>number</code> | molad month |
2419
+ | options | [<code>CalOptions</code>](#CalOptions) | |
2384
2420
 
2385
2421
  <a name="MoladEvent+render"></a>
2386
2422
 
@@ -2489,6 +2525,7 @@ Represents Parashah HaShavua for an entire Hebrew year
2489
2525
  * [.getString(hDate, [locale])](#Sedra+getString) ⇒ <code>string</code>
2490
2526
  * [.isParsha(hDate)](#Sedra+isParsha) ⇒ <code>boolean</code>
2491
2527
  * [.find(parsha)](#Sedra+find) ⇒ [<code>HDate</code>](#HDate)
2528
+ * [.getSedraArray()](#Sedra+getSedraArray) ⇒ <code>Array.&lt;Object&gt;</code>
2492
2529
  * [.getFirstSaturday()](#Sedra+getFirstSaturday) ⇒ <code>number</code>
2493
2530
  * [.getYear()](#Sedra+getYear) ⇒ <code>number</code>
2494
2531
  * [.lookup(hDate)](#Sedra+lookup) ⇒ [<code>SedraResult</code>](#SedraResult)
@@ -2550,6 +2587,10 @@ Returns the date that a parsha occurs
2550
2587
  | --- | --- |
2551
2588
  | parsha | <code>number</code> \| <code>string</code> \| <code>Array.&lt;string&gt;</code> |
2552
2589
 
2590
+ <a name="Sedra+getSedraArray"></a>
2591
+
2592
+ ### sedra.getSedraArray() ⇒ <code>Array.&lt;Object&gt;</code>
2593
+ **Kind**: instance method of [<code>Sedra</code>](#Sedra)
2553
2594
  <a name="Sedra+getFirstSaturday"></a>
2554
2595
 
2555
2596
  ### sedra.getFirstSaturday() ⇒ <code>number</code>
@@ -3025,7 +3066,7 @@ Returns an array of holidays for the year
3025
3066
  <a name="HebrewCalendar.getHolidaysOnDate"></a>
3026
3067
 
3027
3068
  ### HebrewCalendar.getHolidaysOnDate(date, [il]) ⇒ [<code>Array.&lt;Event&gt;</code>](#Event)
3028
- Returns an array of Events on this date (or undefined if no events)
3069
+ Returns an array of Events on this date (or `undefined` if no events)
3029
3070
 
3030
3071
  **Kind**: static method of [<code>HebrewCalendar</code>](#HebrewCalendar)
3031
3072
 
@@ -3193,43 +3234,6 @@ parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[53] == "Ha'azinu".
3193
3234
 
3194
3235
  **Kind**: global constant
3195
3236
  **Read only**: true
3196
- <a name="gematriya"></a>
3197
-
3198
- ## gematriya(number) ⇒ <code>string</code>
3199
- Converts a numerical value to a string of Hebrew letters.
3200
-
3201
- When specifying years of the Hebrew calendar in the present millennium,
3202
- we omit the thousands (which is presently 5 [ה]).
3203
-
3204
- **Kind**: global function
3205
-
3206
- | Param | Type |
3207
- | --- | --- |
3208
- | number | <code>number</code> |
3209
-
3210
- **Example**
3211
- ```js
3212
- gematriya(5774) // 'תשע״ד' - cropped to 774
3213
- gematriya(25) // 'כ״ה'
3214
- gematriya(60) // 'ס׳'
3215
- gematriya(3761) // 'ג׳תשס״א'
3216
- gematriya(1123) // 'א׳קכ״ג'
3217
- ```
3218
- <a name="gematriyaStrToNum"></a>
3219
-
3220
- ## gematriyaStrToNum(str) ⇒ <code>number</code>
3221
- Converts a string of Hebrew letters to a numerical value.
3222
-
3223
- Only considers the value of Hebrew letters `א` through `ת`.
3224
- Ignores final Hebrew letters such as `ך` (kaf sofit) or `ם` (mem sofit)
3225
- and vowels (nekudot).
3226
-
3227
- **Kind**: global function
3228
-
3229
- | Param | Type |
3230
- | --- | --- |
3231
- | str | <code>string</code> |
3232
-
3233
3237
  <a name="hebrew2abs"></a>
3234
3238
 
3235
3239
  ## hebrew2abs(year, month, day) ⇒ <code>number</code>
@@ -3361,6 +3365,43 @@ Converts Hebrew month string name to numeric
3361
3365
  | --- | --- | --- |
3362
3366
  | monthName | <code>string</code> | monthName |
3363
3367
 
3368
+ <a name="gematriya"></a>
3369
+
3370
+ ## gematriya(num) ⇒ <code>string</code>
3371
+ Converts a numerical value to a string of Hebrew letters.
3372
+
3373
+ When specifying years of the Hebrew calendar in the present millennium,
3374
+ we omit the thousands (which is presently 5 [ה]).
3375
+
3376
+ **Kind**: global function
3377
+
3378
+ | Param | Type |
3379
+ | --- | --- |
3380
+ | num | <code>number</code> |
3381
+
3382
+ **Example**
3383
+ ```js
3384
+ gematriya(5774) // 'תשע״ד' - cropped to 774
3385
+ gematriya(25) // 'כ״ה'
3386
+ gematriya(60) // 'ס׳'
3387
+ gematriya(3761) // 'ג׳תשס״א'
3388
+ gematriya(1123) // 'א׳קכ״ג'
3389
+ ```
3390
+ <a name="gematriyaStrToNum"></a>
3391
+
3392
+ ## gematriyaStrToNum(str) ⇒ <code>number</code>
3393
+ Converts a string of Hebrew letters to a numerical value.
3394
+
3395
+ Only considers the value of Hebrew letters `א` through `ת`.
3396
+ Ignores final Hebrew letters such as `ך` (kaf sofit) or `ם` (mem sofit)
3397
+ and vowels (nekudot).
3398
+
3399
+ **Kind**: global function
3400
+
3401
+ | Param | Type |
3402
+ | --- | --- |
3403
+ | str | <code>string</code> |
3404
+
3364
3405
  <a name="SedraResult"></a>
3365
3406
 
3366
3407
  ## SedraResult : <code>Object</code>