Fixed width minutes

This commit is contained in:
Emil Bay
2017-08-28 19:41:30 +02:00
parent 90347c72e0
commit 4b501ab90b

View File

@@ -652,9 +652,10 @@ function formatTime (time, total) {
}
let totalHours = Math.floor(total / 3600)
let totalMinutes = Math.floor(total % 3600 / 60)
let hours = Math.floor(time / 3600)
let minutes = Math.floor(time % 3600 / 60)
if (totalHours > 0) {
if (totalMinutes > 9) {
minutes = zeroFill(2, minutes)
}
let seconds = zeroFill(2, Math.floor(time % 60))