Fix sunset/sunrise calculation
parent
8f959117ef
commit
1b535d99cb
|
|
@ -457,7 +457,7 @@ function getSunProgress() {
|
||||||
|
|
||||||
if (isDay()) {
|
if (isDay()) {
|
||||||
// during day, progress until sunSet
|
// during day, progress until sunSet
|
||||||
return (now - sunSet) / (sunSet - sunRise);
|
return (sunSet - now) / (sunSet - sunRise);
|
||||||
} else {
|
} else {
|
||||||
// during night, progress until sunrise:
|
// during night, progress until sunrise:
|
||||||
if (now > sunRise) {
|
if (now > sunRise) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue