We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I just noticed that setting the inUTC parameter in the getMoonTimes method to true, results to incorrect time, which leads to wrong set/rise results.
As an example:
SunCalc.getMoonTimes(new Date(2020,4,13,12,16,0), 48.2026, 16.3684, true)
results to invalid rise parameter:
rise: null set: Wed May 13 2020 10:37:56 GMT+0200
Shouldn't be the time set (when inUTC parameter is true) as following:
t = new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate(), 0, 0, 0);
instead of:
t.setUTCHours(0, 0, 0, 0); which still gets the offset into consideration and outputs wrong resuls? Or I am doing something wrong
t.setUTCHours(0, 0, 0, 0);
Doing it as I mentioned above I get following hopefully correct results:
rise: Wed May 13 2020 01:41:10 GMT+0200 set: Wed May 13 2020 10:37:56 GMT+0200
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I just noticed that setting the inUTC parameter in the getMoonTimes method to true, results to incorrect time, which leads to wrong set/rise results.
As an example:
SunCalc.getMoonTimes(new Date(2020,4,13,12,16,0), 48.2026, 16.3684, true)
results to invalid rise parameter:
Shouldn't be the time set (when inUTC parameter is true) as following:
t = new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate(), 0, 0, 0);
instead of:
t.setUTCHours(0, 0, 0, 0);
which still gets the offset into consideration and outputs wrong resuls? Or I am doing something wrongDoing it as I mentioned above I get following hopefully correct results:
The text was updated successfully, but these errors were encountered: