Closed Kevin-Dunlap closed 7 years ago
Can you please cite what new Date(2017,1,29).toString()
outputs for you?
That's weird, I get Wed Mar 01 2017 00:00:00 GMT-0500 (EST).
So what's weird with JS dates is that months are 0-based. So new Date(2017, 1, 29)
actually means February under 1
, but since there are only 28 days in February this year, it "shifts" to March 1.
Ah, I feel a bit silly. Thanks for clarifying that for me and for the quick responses.
Hi,
Thank you for your work on this project, it is great.
I am running into an issue around specifying the date. If I use "new Date()" for the date then all data returned is accurate but if I try to specify a date, such as "new Date(2017,1,29)" I get data for 2/28/17.
var times = suncalc.getTimes(new Date(2017,1,29), 42.7, -83.3);
What format do we need to use to specify a custom date?
Any help would be appreciated.
Thanks!