@hebcal/core 6.14.6 → 6.15.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 +26 -1
- package/dist/bundle.js +627 -380
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +7 -7
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.js +1 -1
- package/dist/esm/KiddushLevanaEvent.d.ts +15 -1
- package/dist/esm/KiddushLevanaEvent.js +17 -7
- package/dist/esm/KiddushLevanaEvent.js.map +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +1 -1
- package/dist/esm/TimedEvent.js +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.js +1 -1
- package/dist/esm/calendar.js +5 -5
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.js +7 -7
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/cities.json.js +1 -1
- package/dist/esm/event.js +1 -1
- package/dist/esm/getStartAndEnd.js +2 -2
- package/dist/esm/getStartAndEnd.js.map +1 -1
- package/dist/esm/hallel.js +1 -1
- package/dist/esm/he-x-NoNikud.po.js +1 -1
- package/dist/esm/he.po.js +1 -1
- package/dist/esm/hebcal.js +1 -1
- package/dist/esm/holidays.js +1 -1
- package/dist/esm/horizon.d.ts +94 -0
- package/dist/esm/horizon.js +146 -0
- package/dist/esm/horizon.js.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/isAssurBemlacha.js +2 -2
- package/dist/esm/isAssurBemlacha.js.map +1 -1
- package/dist/esm/isAveilut.js +1 -1
- package/dist/esm/isFastDay.js +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.js +3 -3
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.js +1 -1
- package/dist/esm/moladBase.js +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/omer.js +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.js +1 -1
- package/dist/esm/pkgVersion.d.ts +1 -1
- package/dist/esm/pkgVersion.js +2 -2
- package/dist/esm/pkgVersion.js.map +1 -1
- package/dist/esm/reformatTimeStr.js +1 -1
- package/dist/esm/sedra.js +2 -2
- package/dist/esm/sedra.js.map +1 -1
- package/dist/esm/sefira.json.js +1 -1
- package/dist/esm/staticHolidays.js +1 -1
- package/dist/esm/string.js +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/zenith.d.ts +2 -1
- package/dist/esm/zenith.js +4 -3
- package/dist/esm/zenith.js.map +1 -1
- package/dist/esm/zmanim.d.ts +117 -5
- package/dist/esm/zmanim.js +209 -15
- package/dist/esm/zmanim.js.map +1 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -241,6 +241,31 @@ sunset. Note that degree-based zmanim estimate the amount of light in the sky an
|
|
|
241
241
|
so are unaffected by elevation by design; `chatzot` is also always computed at sea
|
|
242
242
|
level.
|
|
243
243
|
|
|
244
|
+
`Zmanim.visibleSunrise()` and `visibleSunset()` (_netz ha-nireh_ / _shkiah
|
|
245
|
+
nireit_) return when the sun's upper limb clears the real terrain skyline rather
|
|
246
|
+
than the flat sea-level horizon — the time many printed Israeli calendars list
|
|
247
|
+
for mountainous locations. They take a horizon profile describing the apparent
|
|
248
|
+
altitude of the skyline in each direction: a constant angle, a list of
|
|
249
|
+
`{azimuth, elevation}` samples, or a function of azimuth. Refraction follows the
|
|
250
|
+
Chai Tables (Sinclair/Bennett at standard atmosphere) and no safety cushion is
|
|
251
|
+
added. Building a profile from terrain or digital-elevation-model data is outside
|
|
252
|
+
this library.
|
|
253
|
+
|
|
254
|
+
```javascript
|
|
255
|
+
import {GeoLocation, Zmanim} from '@hebcal/core';
|
|
256
|
+
const gloc = new GeoLocation('Jerusalem', 31.78, 35.22, 0, 'Asia/Jerusalem');
|
|
257
|
+
const zmanim = new Zmanim(gloc, new Date(2026, 9, 29), false);
|
|
258
|
+
// a 5° ridge to the east (azimuth 90° = due east), flat elsewhere
|
|
259
|
+
const skyline = [
|
|
260
|
+
{azimuth: 60, elevation: 0},
|
|
261
|
+
{azimuth: 80, elevation: 5},
|
|
262
|
+
{azimuth: 100, elevation: 5},
|
|
263
|
+
{azimuth: 120, elevation: 0},
|
|
264
|
+
];
|
|
265
|
+
zmanim.visibleSunrise(skyline); // about 17 minutes after zmanim.sunrise()
|
|
266
|
+
zmanim.visibleSunset(0); // flat horizon: matches zmanim.sunset() to the second
|
|
267
|
+
```
|
|
268
|
+
|
|
244
269
|
For zmanim outside the calendar-generation flow, use the
|
|
245
270
|
[`Zmanim`](https://hebcal.github.io/api/core/classes/Zmanim.html) class directly.
|
|
246
271
|
|
|
@@ -339,7 +364,7 @@ doesn't cross the relevant angle — it returns an `Invalid Date`; the
|
|
|
339
364
|
|
|
340
365
|
That split is transitional. The intent is to move the library to `Temporal`
|
|
341
366
|
throughout, which is a breaking change and so is planned for `@hebcal/core` version 7.
|
|
342
|
-
Until then, checking `isNaN(dt.getTime())` on `Date` results and `=== null` on
|
|
367
|
+
Until then, checking `Number.isNaN(dt.getTime())` on `Date` results and `=== null` on
|
|
343
368
|
`Temporal` results is the portable approach.
|
|
344
369
|
|
|
345
370
|
## Usage
|