1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 06:43:17 +00:00

Update msToTime.js

This commit is contained in:
MatteZ02 2020-02-10 21:36:12 +02:00
parent 531790edbe
commit 0829af0d3a

View File

@ -9,9 +9,10 @@ module.exports = function msToTime(duration, format) {
minutes = (minutes < 10) ? "0" + minutes : minutes;
seconds = (seconds < 10) ? "0" + seconds : seconds;
if (format = "hh:mm:ss") {
if (format === "hh:mm:ss") {
console.log(format)
return `${hours}:${minutes}:${seconds}`;
} else if (format = "dd:hh:mm:ss") {
} else if (format === "dd:hh:mm:ss") {
return `${days}:${hours}:${minutes}:${seconds}`;
}
}