@hebcal/core 5.0.0-rc3 → 5.0.0-rc5

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
@@ -1194,7 +1194,7 @@ GeoLocation constructor with parameters for all required fields.
1194
1194
  | --- | --- | --- |
1195
1195
  | name | <code>string</code> | The location name for display use such as &quot;Lakewood, NJ&quot; |
1196
1196
  | latitude | <code>number</code> | the latitude in a double format such as 40.095965 for Lakewood, NJ. <b>Note: </b> For latitudes south of the equator, a negative value should be used. |
1197
- | longitude | <code>number</code> | double the longitude in a double format such as -74.222130 for Lakewood, NJ. <b>Note: </b> For longitudes east of the <a href="http://en.wikipedia.org/wiki/Prime_Meridian">Prime Meridian </a> (Greenwich), a negative value should be used. |
1197
+ | longitude | <code>number</code> | double the longitude in a double format such as -74.222130 for Lakewood, NJ. <b>Note: </b> For longitudes west of the <a href="http://en.wikipedia.org/wiki/Prime_Meridian">Prime Meridian </a> (Greenwich), a negative value should be used. |
1198
1198
  | elevation | <code>number</code> | the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating sunrise and set. |
1199
1199
  | timeZoneId | <code>string</code> | the <code>TimeZone</code> for the location. |
1200
1200
 
@@ -1922,7 +1922,7 @@ https://gml.noaa.gov/grad/solcalc/calcdetails.html
1922
1922
  **Kind**: global class
1923
1923
 
1924
1924
  * [Zmanim](#Zmanim)
1925
- * [new Zmanim(gloc, date)](#new_Zmanim_new)
1925
+ * [new Zmanim(gloc, date, useElevation)](#new_Zmanim_new)
1926
1926
  * _instance_
1927
1927
  * [.timeAtAngle(angle, rising)](#Zmanim+timeAtAngle) ⇒ <code>Date</code>
1928
1928
  * [.sunrise()](#Zmanim+sunrise) ⇒ <code>Date</code>
@@ -1947,8 +1947,8 @@ https://gml.noaa.gov/grad/solcalc/calcdetails.html
1947
1947
  * [.tzeit([angle])](#Zmanim+tzeit) ⇒ <code>Date</code>
1948
1948
  * [.neitzHaChama()](#Zmanim+neitzHaChama) ⇒ <code>Date</code>
1949
1949
  * [.shkiah()](#Zmanim+shkiah) ⇒ <code>Date</code>
1950
- * [.sunriseOffset(offset, roundMinute, seaLevel)](#Zmanim+sunriseOffset) ⇒ <code>Date</code>
1951
- * [.sunsetOffset(offset, roundMinute, seaLevel)](#Zmanim+sunsetOffset) ⇒ <code>Date</code>
1950
+ * [.sunriseOffset(offset, roundMinute, forceSeaLevel)](#Zmanim+sunriseOffset) ⇒ <code>Date</code>
1951
+ * [.sunsetOffset(offset, roundMinute, forceSeaLevel)](#Zmanim+sunsetOffset) ⇒ <code>Date</code>
1952
1952
  * _static_
1953
1953
  * [.formatTime(dt, timeFormat)](#Zmanim.formatTime) ⇒ <code>string</code>
1954
1954
  * [.roundTime(dt)](#Zmanim.roundTime) ⇒ <code>Date</code>
@@ -1957,7 +1957,7 @@ https://gml.noaa.gov/grad/solcalc/calcdetails.html
1957
1957
 
1958
1958
  <a name="new_Zmanim_new"></a>
1959
1959
 
1960
- ### new Zmanim(gloc, date)
1960
+ ### new Zmanim(gloc, date, useElevation)
1961
1961
  Initialize a Zmanim instance.
1962
1962
 
1963
1963
 
@@ -1965,6 +1965,7 @@ Initialize a Zmanim instance.
1965
1965
  | --- | --- | --- |
1966
1966
  | gloc | [<code>GeoLocation</code>](#GeoLocation) | GeoLocation including latitude, longitude, and timezone |
1967
1967
  | date | <code>Date</code> \| [<code>HDate</code>](#HDate) | Regular or Hebrew Date. If `date` is a regular `Date`, hours, minutes, seconds and milliseconds are ignored. |
1968
+ | useElevation | <code>boolean</code> | use elevation for calculations (default `false`). If `true`, use elevation to affect the calculation of all sunrise/sunset based zmanim. Note: there are some zmanim such as degree-based zmanim that are driven by the amount of light in the sky and are not impacted by elevation. These zmanim intentionally do not support elevation adjustment. |
1968
1969
 
1969
1970
  **Example**
1970
1971
  ```js
@@ -1974,7 +1975,7 @@ const longitude = -71.448292;
1974
1975
  const tzid = 'America/New_York';
1975
1976
  const friday = new Date(2023, 8, 8);
1976
1977
  const gloc = new GeoLocation(null, latitude, longitude, 0, tzid);
1977
- const zmanim = new Zmanim(gloc, friday);
1978
+ const zmanim = new Zmanim(gloc, friday, false);
1978
1979
  const candleLighting = zmanim.sunsetOffset(-18, true);
1979
1980
  const timeStr = Zmanim.formatISOWithTimeZone(tzid, candleLighting);
1980
1981
  ```
@@ -2126,7 +2127,7 @@ Alias for sunset
2126
2127
  **Kind**: instance method of [<code>Zmanim</code>](#Zmanim)
2127
2128
  <a name="Zmanim+sunriseOffset"></a>
2128
2129
 
2129
- ### zmanim.sunriseOffset(offset, roundMinute, seaLevel) ⇒ <code>Date</code>
2130
+ ### zmanim.sunriseOffset(offset, roundMinute, forceSeaLevel) ⇒ <code>Date</code>
2130
2131
  Returns sunrise + `offset` minutes (either positive or negative).
2131
2132
 
2132
2133
  **Kind**: instance method of [<code>Zmanim</code>](#Zmanim)
@@ -2135,11 +2136,11 @@ Returns sunrise + `offset` minutes (either positive or negative).
2135
2136
  | --- | --- | --- | --- |
2136
2137
  | offset | <code>number</code> | | minutes |
2137
2138
  | roundMinute | <code>boolean</code> | <code>true</code> | round time to nearest minute (default true) |
2138
- | seaLevel | <code>boolean</code> | <code>false</code> | use sea-level sunrise (default false) |
2139
+ | forceSeaLevel | <code>boolean</code> | <code>false</code> | use sea-level sunrise (default false) |
2139
2140
 
2140
2141
  <a name="Zmanim+sunsetOffset"></a>
2141
2142
 
2142
- ### zmanim.sunsetOffset(offset, roundMinute, seaLevel) ⇒ <code>Date</code>
2143
+ ### zmanim.sunsetOffset(offset, roundMinute, forceSeaLevel) ⇒ <code>Date</code>
2143
2144
  Returns sunset + `offset` minutes (either positive or negative).
2144
2145
 
2145
2146
  **Kind**: instance method of [<code>Zmanim</code>](#Zmanim)
@@ -2148,7 +2149,7 @@ Returns sunset + `offset` minutes (either positive or negative).
2148
2149
  | --- | --- | --- | --- |
2149
2150
  | offset | <code>number</code> | | minutes |
2150
2151
  | roundMinute | <code>boolean</code> | <code>true</code> | round time to nearest minute (default true) |
2151
- | seaLevel | <code>boolean</code> | <code>false</code> | use sea-level sunset (default false) |
2152
+ | forceSeaLevel | <code>boolean</code> | <code>false</code> | use sea-level sunset (default false) |
2152
2153
 
2153
2154
  <a name="Zmanim.formatTime"></a>
2154
2155
 
@@ -3492,6 +3493,7 @@ Options to configure which events are returned
3492
3493
  | havdalahMins | <code>number</code> | minutes after sundown for Havdalah (typical values are 42, 50, or 72). If `undefined` (the default), calculate Havdalah according to Tzeit Hakochavim - Nightfall (the point when 3 small stars are observable in the night time sky with the naked eye). If `0`, Havdalah times are suppressed. |
3493
3494
  | havdalahDeg | <code>number</code> | degrees for solar depression for Havdalah. Default is 8.5 degrees for 3 small stars. use 7.083 degrees for 3 medium-sized stars (observed by Dr. Baruch (Berthold) Cohn in his luach published in France in 1899). If `0`, Havdalah times are suppressed. |
3494
3495
  | fastEndDeg | <code>number</code> | degrees for solar depression for end of fast days. Default is 7.083 degrees for 3 medium-sized stars. Other commonly-used values include 6.45 degrees, as calculated by Rabbi Yechiel Michel Tucazinsky. |
3496
+ | useElevation | <code>boolean</code> | use elevation for calculations (default `false`). If `true`, use elevation to affect the calculation of all sunrise/sunset based zmanim. Note: there are some zmanim such as degree-based zmanim that are driven by the amount of light in the sky and are not impacted by elevation. These zmanim intentionally do not support elevation adjustment. |
3495
3497
  | sedrot | <code>boolean</code> | calculate parashah hashavua on Saturdays |
3496
3498
  | il | <code>boolean</code> | Israeli holiday and sedra schedule |
3497
3499
  | noMinorFast | <code>boolean</code> | suppress minor fasts |