about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2023-10-16 15:06:28 -0500
committerStarfall <us@starfall.systems>2023-10-16 15:06:28 -0500
commit2e036ba5479c9c805e263a40f121238d9cc974f2 (patch)
treedb80772fbb7ab4fbcc1a79fb08b9733baac23b8a
parent6bf95f889c8933a18789d043cd20359e00de075b (diff)
fix off by one
-rw-r--r--js/moon-phase.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/moon-phase.js b/js/moon-phase.js
index 9554597..a8a3bae 100644
--- a/js/moon-phase.js
+++ b/js/moon-phase.js
@@ -31,13 +31,13 @@ function getMoonsString(date) {
 	str = str.concat('\u2500'.repeat(next_four_phases[0] - date))
 		.concat(icons[next_phase % 4])
 
-		.concat('\u2500'.repeat(next_four_phases[1] - next_four_phases[0]))
+		.concat('\u2500'.repeat(next_four_phases[1] - next_four_phases[0] - 1))
 		.concat(icons[(next_phase + 1) % 4])
 
-		.concat('\u2500'.repeat(next_four_phases[2] - next_four_phases[1]))
+		.concat('\u2500'.repeat(next_four_phases[2] - next_four_phases[1] - 1))
 		.concat(icons[(next_phase + 2) % 4])
 
-		.concat('\u2500'.repeat(next_four_phases[3] - next_four_phases[2]))
+		.concat('\u2500'.repeat(next_four_phases[3] - next_four_phases[2] - 1))
 		.concat(icons[(next_phase + 3) % 4])
 
 	return str