hebcal / hebcal-js

⛔️ DEPRECATED - a perpetual Jewish Calendar (JavaScript)
GNU General Public License v3.0
124 stars 40 forks source link

Wrong CandleLightning for Jerusalem #53

Closed terminaltor closed 5 years ago

terminaltor commented 6 years ago

When I set coords to Jerusalem coords the time returns for CandleLightning is 20 minutes late. Also in your REST API, for example: When I set the city by name its OK - https://www.hebcal.com/shabbat/?cfg=json&geo=city&city=IL-Jerusalem&m=50 When I set the coords return from the request above its NOT OK - https://www.hebcal.com/shabbat/?cfg=json&geo=pos&latitude=31.76904&longitude=35.21633&tzid=Asia/Jerusalem&m=50

May god be with you all the time :)

mkopinsky commented 6 years ago

I believe that the REST API is actually driven by hebcal/hebcal rather than by hebcal-js.

I don't know how they determine the offset for candlelighting (relative to Sunset) but it's not surprising that specifying the city name works (to trigger the 40 minute offset) but specifying a latitude/longitude that happens to be within the city doesn't trigger it. (I agree it's a bug, I'm just not sure how fixable it is.)

Scimonster commented 5 years ago

The REST API is the hebcal/hebcal repository. Feel free to report this issue there.

In HebcalJS, you can set the candle lighting time to be a 40 minute offset by setting Hebcal.holidays.Event.candleLighting = 40;.