diff options
author | Starfall <us@starfall.systems> | 2023-10-16 15:06:28 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-10-16 15:06:28 -0500 |
commit | 2e036ba5479c9c805e263a40f121238d9cc974f2 (patch) | |
tree | db80772fbb7ab4fbcc1a79fb08b9733baac23b8a /js/moon-phase.js | |
parent | 6bf95f889c8933a18789d043cd20359e00de075b (diff) |
fix off by one
Diffstat (limited to 'js/moon-phase.js')
-rw-r--r-- | js/moon-phase.js | 6 |
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 |