diff options
author | Starfall <us@starfall.systems> | 2023-09-06 08:31:57 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-09-06 08:31:57 -0500 |
commit | d6b23df7afd20e12b4175c56d05d884445e993a7 (patch) | |
tree | c0edad479aac739aa153c6b1e4ed391020483533 /js | |
parent | b31c7b8f282ec3cf71e70a0fe4c7dd984d1e3a19 (diff) |
fix moon-phase off by one
Diffstat (limited to 'js')
-rw-r--r-- | js/moon-phase.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/moon-phase.js b/js/moon-phase.js index e8114f2..5511bca 100644 --- a/js/moon-phase.js +++ b/js/moon-phase.js @@ -26,7 +26,7 @@ icons_inverted = ['\u{1f315}', '\u{1f317}', '\u{1f311}', '\u{1f313}'] function getMoonsString(disable_emoji, inverted_icons) { today = Math.floor((Date.now() - 18e6) / 86.4e6) - next_index = moons.findIndex((element) => element > today) + next_index = moons.findIndex((element) => element >= today) next_days = moons.slice(next_index, next_index + 4) str = "" |