@hebcal/core 5.0.0 → 5.0.1

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
@@ -69,9 +69,7 @@ holidays. <code>@hebcal/core</code> supports four locales by default</p>
69
69
  </dd>
70
70
  <dt><a href="#GeoLocation">GeoLocation</a></dt>
71
71
  <dd><p>A class that contains location information such as latitude and longitude required for astronomical calculations. The
72
- elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for
73
- specific implementations of the <a href="AstronomicalCalculator">AstronomicalCalculator</a> to see if elevation is calculated as part of the
74
- algorithm.</p>
72
+ elevation field may not be used by some calculation engines and would be ignored if set.</p>
75
73
  </dd>
76
74
  <dt><a href="#NOAACalculator">NOAACalculator</a></dt>
77
75
  <dd><p>Implementation of sunrise and sunset methods to calculate astronomical times based on the <a
@@ -216,45 +214,8 @@ A leap Hebrew calendar year can have a length of 383, 384 or 385 days</p>
216
214
  <dt><a href="#shortKislev">shortKislev(year)</a> ⇒ <code>boolean</code></dt>
217
215
  <dd><p>true if Kislev is short in Hebrew year</p>
218
216
  </dd>
219
- <dt><a href="#getYahrzeit">getYahrzeit(hyear, date)</a> ⇒ <code>Date</code></dt>
220
- <dd><p>Calculates yahrzeit.
221
- <code>hyear</code> must be after original <code>date</code> of death.
222
- Returns <code>undefined</code> when requested year preceeds or is same as original year.</p>
223
- <p>Hebcal uses the algorithm defined in &quot;Calendrical Calculations&quot;
224
- by Edward M. Reingold and Nachum Dershowitz.</p>
225
- <p>The customary anniversary date of a death is more complicated and depends
226
- also on the character of the year in which the first anniversary occurs.
227
- There are several cases:</p>
228
- <ul>
229
- <li>If the date of death is Marcheshvan 30, the anniversary in general depends
230
- on the first anniversary; if that first anniversary was not Marcheshvan 30,
231
- use the day before Kislev 1.</li>
232
- <li>If the date of death is Kislev 30, the anniversary in general again depends
233
- on the first anniversary — if that was not Kislev 30, use the day before
234
- Tevet 1.</li>
235
- <li>If the date of death is Adar II, the anniversary is the same day in the
236
- last month of the Hebrew year (Adar or Adar II).</li>
237
- <li>If the date of death is Adar I 30, the anniversary in a Hebrew year that
238
- is not a leap year (in which Adar only has 29 days) is the last day in
239
- Shevat.</li>
240
- <li>In all other cases, use the normal (that is, same month number) anniversary
241
- of the date of death. [Calendrical Calculations p. 113]</li>
242
- </ul>
243
- </dd>
244
- <dt><a href="#getBirthdayOrAnniversary">getBirthdayOrAnniversary(hyear, date)</a> ⇒ <code>Date</code></dt>
245
- <dd><p>Calculates a birthday or anniversary (non-yahrzeit).
246
- <code>hyear</code> must be after original <code>date</code> of anniversary.
247
- Returns <code>undefined</code> when requested year preceeds or is same as original year.</p>
248
- <p>Hebcal uses the algorithm defined in &quot;Calendrical Calculations&quot;
249
- by Edward M. Reingold and Nachum Dershowitz.</p>
250
- <p>The birthday of someone born in Adar of an ordinary year or Adar II of
251
- a leap year is also always in the last month of the year, be that Adar
252
- or Adar II. The birthday in an ordinary year of someone born during the
253
- first 29 days of Adar I in a leap year is on the corresponding day of Adar;
254
- in a leap year, the birthday occurs in Adar I, as expected.</p>
255
- <p>Someone born on the thirtieth day of Marcheshvan, Kislev, or Adar I
256
- has his birthday postponed until the first of the following month in
257
- years where that day does not occur. [Calendrical Calculations p. 111]</p>
217
+ <dt><a href="#monthFromName">monthFromName(monthName)</a> ⇒ <code>number</code></dt>
218
+ <dd><p>Converts Hebrew month string name to numeric</p>
258
219
  </dd>
259
220
  </dl>
260
221
 
@@ -894,7 +855,7 @@ Converts Hebrew month string name to numeric
894
855
 
895
856
  | Param | Type | Description |
896
857
  | --- | --- | --- |
897
- | monthName | <code>string</code> | monthName |
858
+ | monthName | <code>string</code> \| <code>number</code> | monthName |
898
859
 
899
860
  <a name="HDate.dayOnOrBefore"></a>
900
861
 
@@ -1165,9 +1126,7 @@ console.log(ev.renderBrief('he')); // 'ט״ו חֶשְׁוָן'
1165
1126
 
1166
1127
  ## GeoLocation
1167
1128
  A class that contains location information such as latitude and longitude required for astronomical calculations. The
1168
- elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for
1169
- specific implementations of the [AstronomicalCalculator](AstronomicalCalculator) to see if elevation is calculated as part of the
1170
- algorithm.
1129
+ elevation field may not be used by some calculation engines and would be ignored if set.
1171
1130
 
1172
1131
  **Kind**: global class
1173
1132
  **Version**: 1.1
@@ -1182,7 +1141,7 @@ algorithm.
1182
1141
  * [.getLocationName()](#GeoLocation+getLocationName) ⇒ <code>string</code> \| <code>null</code>
1183
1142
  * [.setLocationName(name)](#GeoLocation+setLocationName)
1184
1143
  * [.getTimeZone()](#GeoLocation+getTimeZone) ⇒ <code>string</code>
1185
- * [.setTimeZone(timeZone)](#GeoLocation+setTimeZone)
1144
+ * [.setTimeZone(timeZoneId)](#GeoLocation+setTimeZone)
1186
1145
 
1187
1146
  <a name="new_GeoLocation_new"></a>
1188
1147
 
@@ -1214,7 +1173,7 @@ Method to set the elevation in Meters <b>above </b> sea level.
1214
1173
 
1215
1174
  | Param | Type | Description |
1216
1175
  | --- | --- | --- |
1217
- | elevation | <code>number</code> | The elevation to set in Meters. An IllegalArgumentException will be thrown if the value is a negative. |
1176
+ | elevation | <code>number</code> | The elevation to set in Meters. An Error will be thrown if the value is a negative. |
1218
1177
 
1219
1178
  <a name="GeoLocation+getLatitude"></a>
1220
1179
 
@@ -1247,19 +1206,14 @@ Method to set the elevation in Meters <b>above </b> sea level.
1247
1206
  **Returns**: <code>string</code> - Returns the timeZone.
1248
1207
  <a name="GeoLocation+setTimeZone"></a>
1249
1208
 
1250
- ### geoLocation.setTimeZone(timeZone)
1251
- Method to set the TimeZone. If this is ever set after the GeoLocation is set in the
1252
- [AstronomicalCalendar](AstronomicalCalendar), it is critical that
1253
- [AstronomicalCalendar#getCalendar()](AstronomicalCalendar#getCalendar()).
1254
- [setTimeZone(TimeZone)](java.util.Calendar#setTimeZone(TimeZone)) be called in order for the
1255
- AstronomicalCalendar to output times in the expected offset. This situation will arise if the
1256
- AstronomicalCalendar is ever [cloned](AstronomicalCalendar#clone()).
1209
+ ### geoLocation.setTimeZone(timeZoneId)
1210
+ Method to set the TimeZone.
1257
1211
 
1258
1212
  **Kind**: instance method of [<code>GeoLocation</code>](#GeoLocation)
1259
1213
 
1260
1214
  | Param | Type | Description |
1261
1215
  | --- | --- | --- |
1262
- | timeZone | <code>string</code> | The timeZone to set. |
1216
+ | timeZoneId | <code>string</code> | The timeZone to set. |
1263
1217
 
1264
1218
  <a name="NOAACalculator"></a>
1265
1219
 
@@ -1275,12 +1229,14 @@ to account for elevation. The algorithm can be found in the <a
1275
1229
  href="http://en.wikipedia.org/wiki/Sunrise_equation">Wikipedia Sunrise Equation</a> article.
1276
1230
 
1277
1231
  **Kind**: global class
1278
- **See**: #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.
1279
1232
  **Author**: &copy; Eliyahu Hershfeld 2011 - 2019
1280
1233
 
1281
1234
  * [NOAACalculator](#NOAACalculator)
1282
1235
  * [new NOAACalculator(geoLocation, date)](#new_NOAACalculator_new)
1283
1236
  * _instance_
1237
+ * [.CIVIL_ZENITH](#NOAACalculator+CIVIL_ZENITH)
1238
+ * [.NAUTICAL_ZENITH](#NOAACalculator+NAUTICAL_ZENITH)
1239
+ * [.ASTRONOMICAL_ZENITH](#NOAACalculator+ASTRONOMICAL_ZENITH)
1284
1240
  * [.getSunrise()](#NOAACalculator+getSunrise) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1285
1241
  * [.getSeaLevelSunrise()](#NOAACalculator+getSeaLevelSunrise) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1286
1242
  * [.getBeginCivilTwilight()](#NOAACalculator+getBeginCivilTwilight) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
@@ -1299,15 +1255,12 @@ href="http://en.wikipedia.org/wiki/Sunrise_equation">Wikipedia Sunrise Equation<
1299
1255
  * [.getUTCSeaLevelSunset(zenith)](#NOAACalculator+getUTCSeaLevelSunset) ⇒ <code>number</code>
1300
1256
  * [.getElevationAdjustment(elevation)](#NOAACalculator+getElevationAdjustment) ⇒ <code>number</code>
1301
1257
  * [.adjustZenith(zenith, elevation)](#NOAACalculator+adjustZenith) ⇒ <code>number</code>
1302
- * [.getUTCSunrise()](#NOAACalculator+getUTCSunrise)
1303
- * [.getUTCSunset()](#NOAACalculator+getUTCSunset)
1258
+ * [.getUTCSunrise(date, geoLocation, zenith, adjustForElevation)](#NOAACalculator+getUTCSunrise)
1259
+ * [.getUTCSunset(date, geoLocation, zenith, adjustForElevation)](#NOAACalculator+getUTCSunset)
1304
1260
  * [.getTemporalHour(startOfDay, endOfDay)](#NOAACalculator+getTemporalHour) ⇒ <code>number</code>
1305
1261
  * [.getSunTransit(startOfDay, endOfDay)](#NOAACalculator+getSunTransit) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1306
1262
  * [.getDateFromTime(time, isSunrise)](#NOAACalculator+getDateFromTime) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1307
1263
  * _static_
1308
- * [.CIVIL_ZENITH](#NOAACalculator.CIVIL_ZENITH)
1309
- * [.NAUTICAL_ZENITH](#NOAACalculator.NAUTICAL_ZENITH)
1310
- * [.ASTRONOMICAL_ZENITH](#NOAACalculator.ASTRONOMICAL_ZENITH)
1311
1264
  * [.getTimeOffset(time, offset)](#NOAACalculator.getTimeOffset) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1312
1265
  * [.getSolarElevation(date, lat, lon)](#NOAACalculator.getSolarElevation) ⇒ <code>number</code>
1313
1266
  * [.getSolarAzimuth(date, latitude, lon)](#NOAACalculator.getSolarAzimuth) ⇒ <code>number</code>
@@ -1316,8 +1269,7 @@ href="http://en.wikipedia.org/wiki/Sunrise_equation">Wikipedia Sunrise Equation<
1316
1269
 
1317
1270
  ### new NOAACalculator(geoLocation, date)
1318
1271
  A constructor that takes in <a href="http://en.wikipedia.org/wiki/Geolocation">geolocation</a> information as a
1319
- parameter. The default [AstronomicalCalculator](AstronomicalCalculator#getDefault()) used for solar
1320
- calculations is the the [NOAACalculator](#NOAACalculator).
1272
+ parameter.
1321
1273
 
1322
1274
 
1323
1275
  | Param | Type | Description |
@@ -1325,16 +1277,33 @@ calculations is the the [NOAACalculator](#NOAACalculator).
1325
1277
  | geoLocation | [<code>GeoLocation</code>](#GeoLocation) | The location information used for calculating astronomical sun times. |
1326
1278
  | date | <code>Temporal.PlainDate</code> | |
1327
1279
 
1280
+ <a name="NOAACalculator+CIVIL_ZENITH"></a>
1281
+
1282
+ ### noaaCalculator.CIVIL\_ZENITH
1283
+ Sun's zenith at civil twilight (96&deg;).
1284
+
1285
+ **Kind**: instance property of [<code>NOAACalculator</code>](#NOAACalculator)
1286
+ <a name="NOAACalculator+NAUTICAL_ZENITH"></a>
1287
+
1288
+ ### noaaCalculator.NAUTICAL\_ZENITH
1289
+ Sun's zenith at nautical twilight (102&deg;).
1290
+
1291
+ **Kind**: instance property of [<code>NOAACalculator</code>](#NOAACalculator)
1292
+ <a name="NOAACalculator+ASTRONOMICAL_ZENITH"></a>
1293
+
1294
+ ### noaaCalculator.ASTRONOMICAL\_ZENITH
1295
+ Sun's zenith at astronomical twilight (108&deg;).
1296
+
1297
+ **Kind**: instance property of [<code>NOAACalculator</code>](#NOAACalculator)
1328
1298
  <a name="NOAACalculator+getSunrise"></a>
1329
1299
 
1330
1300
  ### noaaCalculator.getSunrise() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1331
1301
  The getSunrise method Returns a `Date` representing the
1332
- [elevation adjusted](AstronomicalCalculator#getElevationAdjustment(double)) sunrise time. The zenith used
1333
- for the calculation uses [geometric zenith](#GEOMETRIC_ZENITH) of 90&deg; plus
1334
- [AstronomicalCalculator#getElevationAdjustment(double)](AstronomicalCalculator#getElevationAdjustment(double)). This is adjusted by the
1335
- [AstronomicalCalculator](AstronomicalCalculator) to add approximately 50/60 of a degree to account for 34 archminutes of refraction
1336
- and 16 archminutes for the sun's radius for a total of [90.83333&deg;](AstronomicalCalculator#adjustZenith).
1337
- See documentation for the specific implementation of the [AstronomicalCalculator](AstronomicalCalculator) that you are using.
1302
+ [elevation adjusted](getElevationAdjustment) sunrise time. The zenith used
1303
+ for the calculation uses [geometric zenith](GEOMETRIC_ZENITH) of 90&deg; plus
1304
+ [getElevationAdjustment](getElevationAdjustment). This is adjusted
1305
+ to add approximately 50/60 of a degree to account for 34 archminutes of refraction
1306
+ and 16 archminutes for the sun's radius for a total of [90.83333&deg;](adjustZenith).
1338
1307
 
1339
1308
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1340
1309
  **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - the `Date` representing the exact sunrise time. If the calculation can't be computed such as
@@ -1342,15 +1311,15 @@ See documentation for the specific implementation of the [AstronomicalCalculator
1342
1311
  does not set, a null will be returned. See detailed explanation on top of the page.
1343
1312
  **See**
1344
1313
 
1345
- - AstronomicalCalculator#adjustZenith
1346
- - #getSeaLevelSunrise()
1347
- - AstronomicalCalendar#getUTCSunrise
1314
+ - adjustZenith
1315
+ - getSeaLevelSunrise()
1316
+ - getUTCSunrise
1348
1317
 
1349
1318
  <a name="NOAACalculator+getSeaLevelSunrise"></a>
1350
1319
 
1351
1320
  ### noaaCalculator.getSeaLevelSunrise() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1352
1321
  A method that returns the sunrise without [elevation
1353
- adjustment](AstronomicalCalculator#getElevationAdjustment(double)). Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,
1322
+ adjustment](getElevationAdjustment). Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,
1354
1323
  something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the
1355
1324
  base for dawn calculations that are calculated as a dip below the horizon before sunrise.
1356
1325
 
@@ -1360,47 +1329,47 @@ base for dawn calculations that are calculated as a dip below the horizon before
1360
1329
  where it does not set, a null will be returned. See detailed explanation on top of the page.
1361
1330
  **See**
1362
1331
 
1363
- - AstronomicalCalendar#getSunrise
1364
- - AstronomicalCalendar#getUTCSeaLevelSunrise
1365
- - #getSeaLevelSunset()
1332
+ - getSunrise
1333
+ - getUTCSeaLevelSunrise
1334
+ - getSeaLevelSunset()
1366
1335
 
1367
1336
  <a name="NOAACalculator+getBeginCivilTwilight"></a>
1368
1337
 
1369
1338
  ### noaaCalculator.getBeginCivilTwilight() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1370
- A method that returns the beginning of civil twilight (dawn) using a zenith of [96&deg;](#CIVIL_ZENITH).
1339
+ A method that returns the beginning of civil twilight (dawn) using a zenith of [96&deg;](CIVIL_ZENITH).
1371
1340
 
1372
1341
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1373
1342
  **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the beginning of civil twilight using a zenith of 96&deg;. If the calculation
1374
1343
  can't be computed, null will be returned. See detailed explanation on top of the page.
1375
- **See**: #CIVIL_ZENITH
1344
+ **See**: CIVIL_ZENITH
1376
1345
  <a name="NOAACalculator+getBeginNauticalTwilight"></a>
1377
1346
 
1378
1347
  ### noaaCalculator.getBeginNauticalTwilight() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1379
- A method that returns the beginning of nautical twilight using a zenith of [102&deg;](#NAUTICAL_ZENITH).
1348
+ A method that returns the beginning of nautical twilight using a zenith of [102&deg;](NAUTICAL_ZENITH).
1380
1349
 
1381
1350
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1382
1351
  **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the beginning of nautical twilight using a zenith of 102&deg;. If the
1383
1352
  calculation can't be computed null will be returned. See detailed explanation on top of the page.
1384
- **See**: #NAUTICAL_ZENITH
1353
+ **See**: NAUTICAL_ZENITH
1385
1354
  <a name="NOAACalculator+getBeginAstronomicalTwilight"></a>
1386
1355
 
1387
1356
  ### noaaCalculator.getBeginAstronomicalTwilight() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1388
- A method that returns the beginning of astronomical twilight using a zenith of [108&deg;](#ASTRONOMICAL_ZENITH).
1357
+ A method that returns the beginning of astronomical twilight using a zenith of [108&deg;](ASTRONOMICAL_ZENITH).
1389
1358
 
1390
1359
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1391
1360
  **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the beginning of astronomical twilight using a zenith of 108&deg;. If the
1392
1361
  calculation can't be computed, null will be returned. See detailed explanation on top of the page.
1393
- **See**: #ASTRONOMICAL_ZENITH
1362
+ **See**: ASTRONOMICAL_ZENITH
1394
1363
  <a name="NOAACalculator+getSunset"></a>
1395
1364
 
1396
1365
  ### noaaCalculator.getSunset() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1397
1366
  The getSunset method Returns a `Date` representing the
1398
- [elevation adjusted](AstronomicalCalculator#getElevationAdjustment(double)) sunset time. The zenith used for
1399
- the calculation uses [geometric zenith](#GEOMETRIC_ZENITH) of 90&deg; plus
1400
- [AstronomicalCalculator#getElevationAdjustment(double)](AstronomicalCalculator#getElevationAdjustment(double)). This is adjusted by the
1401
- [AstronomicalCalculator](AstronomicalCalculator) to add approximately 50/60 of a degree to account for 34 archminutes of refraction
1402
- and 16 archminutes for the sun's radius for a total of [90.83333&deg;](AstronomicalCalculator#adjustZenith).
1403
- See documentation for the specific implementation of the [AstronomicalCalculator](AstronomicalCalculator) that you are using. Note:
1367
+ [elevation adjusted](getElevationAdjustment) sunset time. The zenith used for
1368
+ the calculation uses [geometric zenith](GEOMETRIC_ZENITH) of 90&deg; plus
1369
+ [getElevationAdjustment](getElevationAdjustment). This is adjusted
1370
+ to add approximately 50/60 of a degree to account for 34 archminutes of refraction
1371
+ and 16 archminutes for the sun's radius for a total of [90.83333&deg;](adjustZenith).
1372
+ Note:
1404
1373
  In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone
1405
1374
  other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this
1406
1375
  case the sunset date will be incremented to the following date.
@@ -1411,15 +1380,15 @@ case the sunset date will be incremented to the following date.
1411
1380
  does not set, a null will be returned. See detailed explanation on top of the page.
1412
1381
  **See**
1413
1382
 
1414
- - AstronomicalCalculator#adjustZenith
1415
- - #getSeaLevelSunset()
1416
- - AstronomicalCalendar#getUTCSunset
1383
+ - adjustZenith
1384
+ - getSeaLevelSunset()
1385
+ - getUTCSunset
1417
1386
 
1418
1387
  <a name="NOAACalculator+getSeaLevelSunset"></a>
1419
1388
 
1420
1389
  ### noaaCalculator.getSeaLevelSunset() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1421
1390
  A method that returns the sunset without [elevation
1422
- adjustment](AstronomicalCalculator#getElevationAdjustment(double)). Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,
1391
+ adjustment](getElevationAdjustment). Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,
1423
1392
  something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the
1424
1393
  base for dusk calculations that are calculated as a dip below the horizon after sunset.
1425
1394
 
@@ -1429,69 +1398,69 @@ base for dusk calculations that are calculated as a dip below the horizon after
1429
1398
  where it does not set, a null will be returned. See detailed explanation on top of the page.
1430
1399
  **See**
1431
1400
 
1432
- - AstronomicalCalendar#getSunset
1433
- - AstronomicalCalendar#getUTCSeaLevelSunset 2see [#getSunset()](#getSunset())
1401
+ - getSunset
1402
+ - getUTCSeaLevelSunset
1434
1403
 
1435
1404
  <a name="NOAACalculator+getEndCivilTwilight"></a>
1436
1405
 
1437
1406
  ### noaaCalculator.getEndCivilTwilight() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1438
- A method that returns the end of civil twilight using a zenith of [96&deg;](#CIVIL_ZENITH).
1407
+ A method that returns the end of civil twilight using a zenith of [96&deg;](CIVIL_ZENITH).
1439
1408
 
1440
1409
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1441
- **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the end of civil twilight using a zenith of [96&deg;](#CIVIL_ZENITH). If
1410
+ **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the end of civil twilight using a zenith of [96&deg;](CIVIL_ZENITH). If
1442
1411
  the calculation can't be computed, null will be returned. See detailed explanation on top of the page.
1443
- **See**: #CIVIL_ZENITH
1412
+ **See**: CIVIL_ZENITH
1444
1413
  <a name="NOAACalculator+getEndNauticalTwilight"></a>
1445
1414
 
1446
1415
  ### noaaCalculator.getEndNauticalTwilight() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1447
- A method that returns the end of nautical twilight using a zenith of [102&deg;](#NAUTICAL_ZENITH).
1416
+ A method that returns the end of nautical twilight using a zenith of [102&deg;](NAUTICAL_ZENITH).
1448
1417
 
1449
1418
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1450
- **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the end of nautical twilight using a zenith of [102&deg;](#NAUTICAL_ZENITH)
1419
+ **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the end of nautical twilight using a zenith of [102&deg;](NAUTICAL_ZENITH)
1451
1420
  . If the calculation can't be computed, null will be returned. See detailed explanation on top of the
1452
1421
  page.
1453
- **See**: #NAUTICAL_ZENITH
1422
+ **See**: NAUTICAL_ZENITH
1454
1423
  <a name="NOAACalculator+getEndAstronomicalTwilight"></a>
1455
1424
 
1456
1425
  ### noaaCalculator.getEndAstronomicalTwilight() ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1457
- A method that returns the end of astronomical twilight using a zenith of [108&deg;](#ASTRONOMICAL_ZENITH).
1426
+ A method that returns the end of astronomical twilight using a zenith of [108&deg;](ASTRONOMICAL_ZENITH).
1458
1427
 
1459
1428
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1460
- **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the end of astronomical twilight using a zenith of [108&deg;](#ASTRONOMICAL_ZENITH). If the calculation can't be computed, null will be returned. See detailed explanation on top
1429
+ **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the end of astronomical twilight using a zenith of [108&deg;](ASTRONOMICAL_ZENITH). If the calculation can't be computed, null will be returned. See detailed explanation on top
1461
1430
  of the page.
1462
- **See**: #ASTRONOMICAL_ZENITH
1431
+ **See**: ASTRONOMICAL_ZENITH
1463
1432
  <a name="NOAACalculator+getSunriseOffsetByDegrees"></a>
1464
1433
 
1465
1434
  ### noaaCalculator.getSunriseOffsetByDegrees(offsetZenith) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1466
1435
  A utility method that returns the time of an offset by degrees below or above the horizon of
1467
- [sunrise](#getSunrise()). Note that the degree offset is from the vertical, so for a calculation of 14&deg;
1468
- before sunrise, an offset of 14 + [#GEOMETRIC_ZENITH](#GEOMETRIC_ZENITH) = 104 would have to be passed as a parameter.
1436
+ [sunrise](getSunrise()). Note that the degree offset is from the vertical, so for a calculation of 14&deg;
1437
+ before sunrise, an offset of 14 + [GEOMETRIC_ZENITH](GEOMETRIC_ZENITH) = 104 would have to be passed as a parameter.
1469
1438
 
1470
1439
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1471
- **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the offset after (or before) [#getSunrise()](#getSunrise()). If the calculation
1440
+ **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date` of the offset after (or before) [getSunrise](getSunrise). If the calculation
1472
1441
  can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does
1473
1442
  not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
1474
1443
  page.
1475
1444
 
1476
1445
  | Param | Type | Description |
1477
1446
  | --- | --- | --- |
1478
- | offsetZenith | <code>number</code> | the degrees before [#getSunrise()](#getSunrise()) to use in the calculation. For time after sunrise use negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14&deg; before sunrise, an offset of 14 + [#GEOMETRIC_ZENITH](#GEOMETRIC_ZENITH) = 104 would have to be passed as a parameter. |
1447
+ | offsetZenith | <code>number</code> | the degrees before [getSunrise](getSunrise) to use in the calculation. For time after sunrise use negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14&deg; before sunrise, an offset of 14 + [GEOMETRIC_ZENITH](GEOMETRIC_ZENITH) = 104 would have to be passed as a parameter. |
1479
1448
 
1480
1449
  <a name="NOAACalculator+getSunsetOffsetByDegrees"></a>
1481
1450
 
1482
1451
  ### noaaCalculator.getSunsetOffsetByDegrees(offsetZenith) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
1483
- A utility method that returns the time of an offset by degrees below or above the horizon of [sunset](#getSunset()). Note that the degree offset is from the vertical, so for a calculation of 14&deg; after sunset, an
1484
- offset of 14 + [#GEOMETRIC_ZENITH](#GEOMETRIC_ZENITH) = 104 would have to be passed as a parameter.
1452
+ A utility method that returns the time of an offset by degrees below or above the horizon of [sunset](getSunset()). Note that the degree offset is from the vertical, so for a calculation of 14&deg; after sunset, an
1453
+ offset of 14 + [GEOMETRIC_ZENITH](GEOMETRIC_ZENITH) = 104 would have to be passed as a parameter.
1485
1454
 
1486
1455
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1487
- **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date`of the offset after (or before) [#getSunset()](#getSunset()). If the calculation can't
1456
+ **Returns**: <code>Temporal.ZonedDateTime</code> \| <code>null</code> - The `Date`of the offset after (or before) [getSunset](getSunset). If the calculation can't
1488
1457
  be computed such as in the Arctic Circle where there is at least one day a year where the sun does not
1489
1458
  rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
1490
1459
  page.
1491
1460
 
1492
1461
  | Param | Type | Description |
1493
1462
  | --- | --- | --- |
1494
- | offsetZenith | <code>number</code> | the degrees after [#getSunset()](#getSunset()) to use in the calculation. For time before sunset use negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14&deg; after sunset, an offset of 14 + [#GEOMETRIC_ZENITH](#GEOMETRIC_ZENITH) = 104 would have to be passed as a parameter. |
1463
+ | offsetZenith | <code>number</code> | the degrees after [getSunset](getSunset) to use in the calculation. For time before sunset use negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14&deg; after sunset, an offset of 14 + [GEOMETRIC_ZENITH](GEOMETRIC_ZENITH) = 104 would have to be passed as a parameter. |
1495
1464
 
1496
1465
  <a name="NOAACalculator+getUTCSunrise0"></a>
1497
1466
 
@@ -1502,7 +1471,7 @@ daylight savings time.
1502
1471
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1503
1472
  **Returns**: <code>number</code> - The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
1504
1473
  Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
1505
- not set, [Double#NaN](Double#NaN) will be returned. See detailed explanation on top of the page.
1474
+ not set, `NaN` will be returned. See detailed explanation on top of the page.
1506
1475
 
1507
1476
  | Param | Type | Description |
1508
1477
  | --- | --- | --- |
@@ -1519,11 +1488,11 @@ forms the base for dawn calculations that are calculated as a dip below the hori
1519
1488
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1520
1489
  **Returns**: <code>number</code> - The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
1521
1490
  Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
1522
- not set, [Double#NaN](Double#NaN) will be returned. See detailed explanation on top of the page.
1491
+ not set, `NaN` will be returned. See detailed explanation on top of the page.
1523
1492
  **See**
1524
1493
 
1525
- - AstronomicalCalendar#getUTCSunrise
1526
- - AstronomicalCalendar#getUTCSeaLevelSunset
1494
+ - getUTCSunrise
1495
+ - getUTCSeaLevelSunset
1527
1496
 
1528
1497
 
1529
1498
  | Param | Type | Description |
@@ -1539,8 +1508,8 @@ daylight savings time.
1539
1508
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1540
1509
  **Returns**: <code>number</code> - The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
1541
1510
  Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
1542
- not set, [Double#NaN](Double#NaN) will be returned. See detailed explanation on top of the page.
1543
- **See**: AstronomicalCalendar#getUTCSeaLevelSunset
1511
+ not set, `NaN` will be returned. See detailed explanation on top of the page.
1512
+ **See**: getUTCSeaLevelSunset
1544
1513
 
1545
1514
  | Param | Type | Description |
1546
1515
  | --- | --- | --- |
@@ -1558,11 +1527,11 @@ sunset.
1558
1527
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1559
1528
  **Returns**: <code>number</code> - The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the
1560
1529
  Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
1561
- not set, [Double#NaN](Double#NaN) will be returned. See detailed explanation on top of the page.
1530
+ not set, `NaN` will be returned. See detailed explanation on top of the page.
1562
1531
  **See**
1563
1532
 
1564
- - AstronomicalCalendar#getUTCSunset
1565
- - AstronomicalCalendar#getUTCSeaLevelSunrise
1533
+ - getUTCSunset
1534
+ - getUTCSeaLevelSunrise
1566
1535
 
1567
1536
 
1568
1537
  | Param | Type | Description |
@@ -1575,9 +1544,9 @@ sunset.
1575
1544
  Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher
1576
1545
  elevation can see farther below the horizon, the calculation for sunrise / sunset is calculated below the horizon
1577
1546
  used at sea level. This is only used for sunrise and sunset and not times before or after it such as
1578
- [nautical twilight](AstronomicalCalendar#getBeginNauticalTwilight()) since those
1547
+ [nautical twilight](getBeginNauticalTwilight()) since those
1579
1548
  calculations are based on the level of available light at the given dip below the horizon, something that is not
1580
- affected by elevation, the adjustment should only made if the zenith == 90&deg; [adjusted](#adjustZenith)
1549
+ affected by elevation, the adjustment should only made if the zenith == 90&deg; [adjusted](adjustZenith)
1581
1550
  for refraction and solar radius. The algorithm used is
1582
1551
 
1583
1552
  <pre>
@@ -1609,50 +1578,75 @@ Earth were without an atmosphere, true sunset and sunrise would correspond to a
1609
1578
  is not a point, and because the atmosphere refracts light, this 90&deg; zenith does not, in fact, correspond to
1610
1579
  true sunset or sunrise, instead the centre of the Sun's disk must lie just below the horizon for the upper edge
1611
1580
  to be obscured. This means that a zenith of just above 90&deg; must be used. The Sun subtends an angle of 16
1612
- minutes of arc (this can be changed via the [#setSolarRadius(double)](#setSolarRadius(double)) method , and atmospheric refraction
1613
- accounts for 34 minutes or so (this can be changed via the [#setRefraction(double)](#setRefraction(double)) method), giving a total
1581
+ minutes of arc, and atmospheric refraction
1582
+ accounts for 34 minutes or so, giving a total
1614
1583
  of 50 arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333&deg; for true sunrise/sunset. Since a
1615
1584
  person at an elevation can see blow the horizon of a person at sea level, this will also adjust the zenith to
1616
1585
  account for elevation if available. Note that this will only adjust the value if the zenith is exactly 90 degrees.
1617
1586
  For values below and above this no correction is done. As an example, astronomical twilight is when the sun is
1618
1587
  18&deg; below the horizon or [108&deg;
1619
- below the zenith](AstronomicalCalendar#ASTRONOMICAL_ZENITH). This is traditionally calculated with none of the above mentioned adjustments. The same goes
1588
+ below the zenith](ASTRONOMICAL_ZENITH). This is traditionally calculated with none of the above mentioned adjustments. The same goes
1620
1589
  for various <em>tzais</em> and <em>alos</em> times such as the
1621
1590
  [16.1&deg;](ZmanimCalendar#ZENITH_16_POINT_1) dip used in
1622
- [ComplexZmanimCalendar#getAlos16Point1Degrees()](ComplexZmanimCalendar#getAlos16Point1Degrees()).
1591
+ [ComplexZmanimCalendar#getAlos16Point1Degrees](ComplexZmanimCalendar#getAlos16Point1Degrees).
1623
1592
 
1624
1593
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1625
- **Returns**: <code>number</code> - The zenith adjusted to include the [sun's radius](#getSolarRadius), [refraction](#getRefraction) and [elevation](#getElevationAdjustment) adjustment. This will only be adjusted for
1594
+ **Returns**: <code>number</code> - The zenith adjusted to include the sun's radius, refracton
1595
+ and [elevation](getElevationAdjustment) adjustment. This will only be adjusted for
1626
1596
  sunrise and sunset (if the zenith == 90&deg;)
1627
- **See**: #getElevationAdjustment(double)
1597
+ **See**: getElevationAdjustment
1628
1598
 
1629
1599
  | Param | Type | Description |
1630
1600
  | --- | --- | --- |
1631
- | zenith | <code>number</code> | the azimuth below the vertical zenith of 90&deg;. For sunset typically the [zenith](#adjustZenith) used for the calculation uses geometric zenith of 90&deg; and [adjusts](#adjustZenith) this slightly to account for solar refraction and the sun's radius. Another example would be [AstronomicalCalendar#getEndNauticalTwilight()](AstronomicalCalendar#getEndNauticalTwilight()) that passes [AstronomicalCalendar#NAUTICAL_ZENITH](AstronomicalCalendar#NAUTICAL_ZENITH) to this method. |
1601
+ | zenith | <code>number</code> | the azimuth below the vertical zenith of 90&deg;. For sunset typically the [zenith](adjustZenith) used for the calculation uses geometric zenith of 90&deg; and [adjusts](adjustZenith) this slightly to account for solar refraction and the sun's radius. Another example would be [getEndNauticalTwilight](getEndNauticalTwilight) that passes [NAUTICAL_ZENITH](NAUTICAL_ZENITH) to this method. |
1632
1602
  | elevation | <code>number</code> | elevation in Meters. |
1633
1603
 
1634
1604
  <a name="NOAACalculator+getUTCSunrise"></a>
1635
1605
 
1636
- ### noaaCalculator.getUTCSunrise()
1606
+ ### noaaCalculator.getUTCSunrise(date, geoLocation, zenith, adjustForElevation)
1607
+ A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise.
1608
+
1637
1609
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1638
- **See**: AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)
1610
+ **Returns**: The UTC time of sunrise in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in
1611
+ the calculation (expected behavior for some locations such as near the poles,
1612
+ `NaN` will be returned.
1613
+
1614
+ | Param | Description |
1615
+ | --- | --- |
1616
+ | date | Used to calculate day of year. |
1617
+ | geoLocation | The location information used for astronomical calculating sun times. |
1618
+ | zenith | the azimuth below the vertical zenith of 90 degrees. for sunrise typically the [zenith](adjustZenith) used for the calculation uses geometric zenith of 90&deg; and [adjusts](adjustZenith) this slightly to account for solar refraction and the sun's radius. Another example would be [getBeginNauticalTwilight](getBeginNauticalTwilight) that passes [NAUTICAL_ZENITH](NAUTICAL_ZENITH) to this method. |
1619
+ | adjustForElevation | Should the time be adjusted for elevation |
1620
+
1639
1621
  <a name="NOAACalculator+getUTCSunset"></a>
1640
1622
 
1641
- ### noaaCalculator.getUTCSunset()
1623
+ ### noaaCalculator.getUTCSunset(date, geoLocation, zenith, adjustForElevation)
1624
+ A method that calculates UTC sunset as well as any time based on an angle above or below sunset.
1625
+
1642
1626
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1643
- **See**: AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)
1627
+ **Returns**: The UTC time of sunset in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in
1628
+ the calculation (expected behavior for some locations such as near the poles,
1629
+ `NaN` will be returned.
1630
+
1631
+ | Param | Description |
1632
+ | --- | --- |
1633
+ | date | Used to calculate day of year. |
1634
+ | geoLocation | The location information used for astronomical calculating sun times. |
1635
+ | zenith | the azimuth below the vertical zenith of 90&deg;. For sunset typically the [zenith](adjustZenith) used for the calculation uses geometric zenith of 90&deg; and [adjusts](adjustZenith) this slightly to account for solar refraction and the sun's radius. Another example would be [getEndNauticalTwilight](getEndNauticalTwilight) that passes [NAUTICAL_ZENITH](NAUTICAL_ZENITH) to this method. |
1636
+ | adjustForElevation | Should the time be adjusted for elevation |
1637
+
1644
1638
  <a name="NOAACalculator+getTemporalHour"></a>
1645
1639
 
1646
1640
  ### noaaCalculator.getTemporalHour(startOfDay, endOfDay) ⇒ <code>number</code>
1647
1641
  A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset
1648
1642
  passed as parameters to this method. An example of the use of this method would be the calculation of a
1649
- non-elevation adjusted temporal hour by passing in [sea level sunrise](#getSeaLevelSunrise()) and
1650
- [sea level sunset](#getSeaLevelSunset()) as parameters.
1643
+ non-elevation adjusted temporal hour by passing in [sea level sunrise](getSeaLevelSunrise()) and
1644
+ [sea level sunset](getSeaLevelSunset()) as parameters.
1651
1645
 
1652
1646
  **Kind**: instance method of [<code>NOAACalculator</code>](#NOAACalculator)
1653
1647
  **Returns**: <code>number</code> - the <code>long</code> millisecond length of the temporal hour. If the calculation can't be computed a
1654
- [Long#MIN_VALUE](Long#MIN_VALUE) will be returned. See detailed explanation on top of the page.
1655
- **See**: #getTemporalHour()
1648
+ `NaN` will be returned. See detailed explanation on top of the page.
1649
+ **See**: getTemporalHour()
1656
1650
 
1657
1651
  | Param | Type | Description |
1658
1652
  | --- | --- | --- |
@@ -1692,24 +1686,6 @@ A method that returns a `Date` from the time passed in as a parameter.
1692
1686
  | time | <code>number</code> | The time to be set as the time for the `Date`. The time expected is in the format: 18.75 for 6:45:00 PM. |
1693
1687
  | isSunrise | <code>boolean</code> | true if the time is sunrise, and false if it is sunset |
1694
1688
 
1695
- <a name="NOAACalculator.CIVIL_ZENITH"></a>
1696
-
1697
- ### NOAACalculator.CIVIL\_ZENITH
1698
- Sun's zenith at civil twilight (96&deg;).
1699
-
1700
- **Kind**: static property of [<code>NOAACalculator</code>](#NOAACalculator)
1701
- <a name="NOAACalculator.NAUTICAL_ZENITH"></a>
1702
-
1703
- ### NOAACalculator.NAUTICAL\_ZENITH
1704
- Sun's zenith at nautical twilight (102&deg;).
1705
-
1706
- **Kind**: static property of [<code>NOAACalculator</code>](#NOAACalculator)
1707
- <a name="NOAACalculator.ASTRONOMICAL_ZENITH"></a>
1708
-
1709
- ### NOAACalculator.ASTRONOMICAL\_ZENITH
1710
- Sun's zenith at astronomical twilight (108&deg;).
1711
-
1712
- **Kind**: static property of [<code>NOAACalculator</code>](#NOAACalculator)
1713
1689
  <a name="NOAACalculator.getTimeOffset"></a>
1714
1690
 
1715
1691
  ### NOAACalculator.getTimeOffset(time, offset) ⇒ <code>Temporal.ZonedDateTime</code> \| <code>null</code>
@@ -3381,82 +3357,17 @@ true if Kislev is short in Hebrew year
3381
3357
  | --- | --- | --- |
3382
3358
  | year | <code>number</code> | Hebrew year |
3383
3359
 
3384
- <a name="getYahrzeit"></a>
3385
-
3386
- ## getYahrzeit(hyear, date) ⇒ <code>Date</code>
3387
- Calculates yahrzeit.
3388
- `hyear` must be after original `date` of death.
3389
- Returns `undefined` when requested year preceeds or is same as original year.
3390
-
3391
- Hebcal uses the algorithm defined in "Calendrical Calculations"
3392
- by Edward M. Reingold and Nachum Dershowitz.
3393
-
3394
- The customary anniversary date of a death is more complicated and depends
3395
- also on the character of the year in which the first anniversary occurs.
3396
- There are several cases:
3397
-
3398
- * If the date of death is Marcheshvan 30, the anniversary in general depends
3399
- on the first anniversary; if that first anniversary was not Marcheshvan 30,
3400
- use the day before Kislev 1.
3401
- * If the date of death is Kislev 30, the anniversary in general again depends
3402
- on the first anniversary — if that was not Kislev 30, use the day before
3403
- Tevet 1.
3404
- * If the date of death is Adar II, the anniversary is the same day in the
3405
- last month of the Hebrew year (Adar or Adar II).
3406
- * If the date of death is Adar I 30, the anniversary in a Hebrew year that
3407
- is not a leap year (in which Adar only has 29 days) is the last day in
3408
- Shevat.
3409
- * In all other cases, use the normal (that is, same month number) anniversary
3410
- of the date of death. [Calendrical Calculations p. 113]
3411
-
3412
- **Kind**: global function
3413
- **Returns**: <code>Date</code> - anniversary occurring in `hyear`
3414
-
3415
- | Param | Type | Description |
3416
- | --- | --- | --- |
3417
- | hyear | <code>number</code> | Hebrew year |
3418
- | date | <code>Date</code> \| <code>SimpleHebrewDate</code> \| <code>number</code> | Gregorian or Hebrew date of death |
3419
-
3420
- **Example**
3421
- ```js
3422
- import {getYahrzeit} from '@hebcal/hdate';
3423
- const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'
3424
- const anniversary = getYahrzeit(5780, dt); // '2/25/2020' == '30 Sh\'vat 5780'
3425
- ```
3426
- <a name="getBirthdayOrAnniversary"></a>
3427
-
3428
- ## getBirthdayOrAnniversary(hyear, date) ⇒ <code>Date</code>
3429
- Calculates a birthday or anniversary (non-yahrzeit).
3430
- `hyear` must be after original `date` of anniversary.
3431
- Returns `undefined` when requested year preceeds or is same as original year.
3432
-
3433
- Hebcal uses the algorithm defined in "Calendrical Calculations"
3434
- by Edward M. Reingold and Nachum Dershowitz.
3360
+ <a name="monthFromName"></a>
3435
3361
 
3436
- The birthday of someone born in Adar of an ordinary year or Adar II of
3437
- a leap year is also always in the last month of the year, be that Adar
3438
- or Adar II. The birthday in an ordinary year of someone born during the
3439
- first 29 days of Adar I in a leap year is on the corresponding day of Adar;
3440
- in a leap year, the birthday occurs in Adar I, as expected.
3441
-
3442
- Someone born on the thirtieth day of Marcheshvan, Kislev, or Adar I
3443
- has his birthday postponed until the first of the following month in
3444
- years where that day does not occur. [Calendrical Calculations p. 111]
3362
+ ## monthFromName(monthName) <code>number</code>
3363
+ Converts Hebrew month string name to numeric
3445
3364
 
3446
3365
  **Kind**: global function
3447
- **Returns**: <code>Date</code> - anniversary occurring in `hyear`
3448
3366
 
3449
3367
  | Param | Type | Description |
3450
3368
  | --- | --- | --- |
3451
- | hyear | <code>number</code> | Hebrew year |
3452
- | date | <code>Date</code> \| <code>SimpleHebrewDate</code> \| <code>number</code> | Gregorian or Hebrew date of event |
3369
+ | monthName | <code>string</code> | monthName |
3453
3370
 
3454
- **Example**
3455
- ```js
3456
- import {getBirthdayOrAnniversary} from '@hebcal/hdate';
3457
- const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'
3458
- const anniversary = getBirthdayOrAnniversary(5780, dt); // '3/26/2020' == '1 Nisan 5780'
3459
- ```
3460
3371
  <a name="SedraResult"></a>
3461
3372
 
3462
3373
  ## SedraResult : <code>Object</code>