udivankin / sunrise-sunset

Sunrise and sunset time calculation for given coordinates. ~1kb minified with zero dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Innaccuracies at extreme latitudes

markmcconnell opened this issue · comments

During calculate(), when cosLocalHourAngle > 1 or < -1, then the sun does not actually rise or set at the location on the given day. It would be nice if the library provided some optional way to detect this, perhaps by returning null or throwing an error in these conditions.

Otherwise, this is perfect. Thank you.