From: Benjamin Auder Date: Tue, 3 Mar 2020 23:29:11 +0000 (+0100) Subject: days must not be a const variable X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/images/pieces/doc/screen_players.png?a=commitdiff_plain;h=ed6cfe307f9240bd83693c84550c74ca232c027f;p=vchess.git days must not be a const variable --- diff --git a/client/src/utils/datetime.js b/client/src/utils/datetime.js index c4bbea95..5f75f6de 100644 --- a/client/src/utils/datetime.js +++ b/client/src/utils/datetime.js @@ -31,7 +31,7 @@ export function ppt(t) { // "Pretty print" an amount of time given in seconds const dayInSeconds = 60 * 60 * 24; const hourInSeconds = 60 * 60; - const days = Math.floor(t / dayInSeconds); + let days = Math.floor(t / dayInSeconds); const hours = Math.floor((t % dayInSeconds) / hourInSeconds); const minutes = Math.floor((t % hourInSeconds) / 60); const seconds = Math.floor(t % 60);