Sunrise and sunset are not exact
avrAhituv opened this issue · 4 comments
Thank you very much, but i find a bug..
You use the suncalc library to calculate sunrise and sunset times.
but times are not accurate, for example:
today, 30-08-2018 the sunrise is: 06:13 in jerusalem as can be seen on the site yeshiva.org.il.
but the library tells me that time is 06:25..
i see the suncalc calculate the sunrise like this:
var times = SunCalc.times = [ [-0.833, 'sunrise', 'sunset' ], [ -0.3, 'sunriseEnd', 'sunsetStart' ], [ -6, 'dawn', 'dusk' ], [ -12, 'nauticalDawn', 'nauticalDusk'], [ -18, 'nightEnd', 'night' ], [ 6, 'goldenHourEnd', 'goldenHour' ] ];
and in order for me to get the right times, I have to run over the sunrise to -2.4
the same is true of sunset..
Who can help me??
Thanks!
I think there are differing opinions as to when sunrise/sunset get counted. You can try to add your time to suncalc's list, and then overwrite HDate.prototype.sunrise and sunset, so that Hebcal will calculate zmanim according to your adjustment.
On second thought, this is likely connected to #48, where latitude and longitude had gotten reversed and as such it was calculating for the wrong place.
Yep, seems to have been #48. Should be fixed now.
I checked now, and it works fine!
Thanks!!!