udivankin / sunrise-sunset

Sunrise and sunset time calculation for given coordinates. ~1kb minified with zero dependencies.
74 stars 17 forks source link

invalid date #1

Closed p-3 closed 5 years ago

p-3 commented 5 years ago

i am getting invalid date with getSunrise(67.8557995, 20.225282, new Date("2018-12-19"));

udivankin commented 5 years ago

Well, it sounds so funny to me (but not for residents of Kiruna, Sweden for sure) - there was no single sunrise there between Dec 11th 2018 and Jan 1st 2019. That's why "Invalid date" seems to be correct result for given input.