mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:17:09 +00:00
Ensure that timestamp is always a Date object
This commit is contained in:
@@ -440,6 +440,7 @@ export default {
|
||||
function isDay (srss, ts, lat, lng) {
|
||||
if (isNaN(srss.sunriseEnd) || isNaN(srss.sunsetStart)) {
|
||||
// Between March and September
|
||||
ts = new Date(ts);
|
||||
if (ts.getMonth() >= 2 && ts.getMonth() <= 8) {
|
||||
// Polar day in the Northern hemisphere, night in the South
|
||||
return lat > 0;
|
||||
|
||||
Reference in New Issue
Block a user