mourner / suncalc

A tiny JavaScript library for calculating sun/moon positions and phases.
BSD 2-Clause "Simplified" License
3.06k stars 410 forks source link

nadir vs solarMidnight #83

Open ghost opened 7 years ago

ghost commented 7 years ago

what is the difference between nadir and solarMidnight?

I think solarMidnight would make better sense to users.

frankjoke commented 7 years ago

I have another problem with nadir. It uses noon -0.5 which is in my region 99% in the past. It's calculation should use noon+0.5 which will give next nadir. The reason seems to be that in the toJulian function already half a day is subtracted and in the nadir another half which mean that it is not anymore the same day.

If I use +0.5 in nadir calc it forks for me.