im dumb
This commit is contained in:
parent
12daa5f24b
commit
cbe3a92bf6
1 changed files with 4 additions and 2 deletions
6
index.js
6
index.js
|
@ -48,10 +48,12 @@ function timeFormatter(seconds) {
|
||||||
seconds = Math.ceil(seconds)
|
seconds = Math.ceil(seconds)
|
||||||
var minutes = Math.floor(seconds / 60)
|
var minutes = Math.floor(seconds / 60)
|
||||||
|
|
||||||
if (seconds < 10) {
|
if (seconds % 60 < 10) {
|
||||||
return `${minutes}:0${seconds % 60}`
|
return `${minutes}:0${seconds % 60}`
|
||||||
}
|
} else {
|
||||||
return `${minutes}:${seconds % 60}`
|
return `${minutes}:${seconds % 60}`
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function gameTimeFormatter(seconds) {
|
function gameTimeFormatter(seconds) {
|
||||||
|
|
Loading…
Reference in a new issue