@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.
Files changed (65) hide show
  1. package/README.md +26 -1
  2. package/dist/bundle.js +627 -380
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/bundle.min.js +7 -7
  5. package/dist/bundle.min.js.map +1 -1
  6. package/dist/esm/DailyLearning.js +1 -1
  7. package/dist/esm/HebrewDateEvent.js +1 -1
  8. package/dist/esm/HolidayEvent.js +1 -1
  9. package/dist/esm/KiddushLevanaEvent.d.ts +15 -1
  10. package/dist/esm/KiddushLevanaEvent.js +17 -7
  11. package/dist/esm/KiddushLevanaEvent.js.map +1 -1
  12. package/dist/esm/MevarchimChodeshEvent.js +1 -1
  13. package/dist/esm/ParshaEvent.js +1 -1
  14. package/dist/esm/TimedEvent.js +1 -1
  15. package/dist/esm/YomKippurKatanEvent.js +1 -1
  16. package/dist/esm/ashkenazi.po.js +1 -1
  17. package/dist/esm/calendar.js +5 -5
  18. package/dist/esm/calendar.js.map +1 -1
  19. package/dist/esm/candles.js +7 -7
  20. package/dist/esm/candles.js.map +1 -1
  21. package/dist/esm/cities.json.js +1 -1
  22. package/dist/esm/event.js +1 -1
  23. package/dist/esm/getStartAndEnd.js +2 -2
  24. package/dist/esm/getStartAndEnd.js.map +1 -1
  25. package/dist/esm/hallel.js +1 -1
  26. package/dist/esm/he-x-NoNikud.po.js +1 -1
  27. package/dist/esm/he.po.js +1 -1
  28. package/dist/esm/hebcal.js +1 -1
  29. package/dist/esm/holidays.js +1 -1
  30. package/dist/esm/horizon.d.ts +94 -0
  31. package/dist/esm/horizon.js +146 -0
  32. package/dist/esm/horizon.js.map +1 -0
  33. package/dist/esm/index.d.ts +2 -0
  34. package/dist/esm/index.js +1 -1
  35. package/dist/esm/isAssurBemlacha.js +2 -2
  36. package/dist/esm/isAssurBemlacha.js.map +1 -1
  37. package/dist/esm/isAveilut.js +1 -1
  38. package/dist/esm/isFastDay.js +1 -1
  39. package/dist/esm/locale.js +1 -1
  40. package/dist/esm/location.js +3 -3
  41. package/dist/esm/location.js.map +1 -1
  42. package/dist/esm/modern.js +1 -1
  43. package/dist/esm/molad.js +1 -1
  44. package/dist/esm/moladBase.js +1 -1
  45. package/dist/esm/moladDate.js +1 -1
  46. package/dist/esm/omer.js +1 -1
  47. package/dist/esm/parshaName.js +1 -1
  48. package/dist/esm/parshaYear.js +1 -1
  49. package/dist/esm/pkgVersion.d.ts +1 -1
  50. package/dist/esm/pkgVersion.js +2 -2
  51. package/dist/esm/pkgVersion.js.map +1 -1
  52. package/dist/esm/reformatTimeStr.js +1 -1
  53. package/dist/esm/sedra.js +2 -2
  54. package/dist/esm/sedra.js.map +1 -1
  55. package/dist/esm/sefira.json.js +1 -1
  56. package/dist/esm/staticHolidays.js +1 -1
  57. package/dist/esm/string.js +1 -1
  58. package/dist/esm/tachanun.js +1 -1
  59. package/dist/esm/zenith.d.ts +2 -1
  60. package/dist/esm/zenith.js +4 -3
  61. package/dist/esm/zenith.js.map +1 -1
  62. package/dist/esm/zmanim.d.ts +117 -5
  63. package/dist/esm/zmanim.js +209 -15
  64. package/dist/esm/zmanim.js.map +1 -1
  65. 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