Fix seconds under 10 seconds

This commit is contained in:
Bingus_Violet 2024-01-25 23:11:19 -06:00
parent 8e5bb8a552
commit 12daa5f24b

View file

@ -48,6 +48,9 @@ function timeFormatter(seconds) {
seconds = Math.ceil(seconds)
var minutes = Math.floor(seconds / 60)
if (seconds < 10) {
return `${minutes}:0${seconds % 60}`
}
return `${minutes}:${seconds % 60}`
}
@ -59,9 +62,10 @@ function gameTimeFormatter(seconds) {
return 'Under a minute ago'
} else if (minutes < 60) {
return `${minutes} Minutes`
} else {
return `${hours} hours and ${minutes % 60} minutes`
}
return `${hours} hours and ${minutes % 60} minutes`
}
function pageUpdate() {