about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2023-09-06 08:32:15 -0500
committerStarfall <us@starfall.systems>2023-09-06 08:32:15 -0500
commit81ab98af948196feac270a70f03dd500e7b5ca9b (patch)
tree41192bde8a4d4e786565b1705ef572c97aa01468
parent559c6387110801e35ca57f6c97261350330a1116 (diff)
fix moon-phase off by one
-rw-r--r--js/moon-phase.js2
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 = ""