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