fix: 🐛 Fix human time seconds readout

This commit is contained in:
Kenny 2022-05-29 22:50:44 -04:00 committed by Alex
parent 0ef591f9a7
commit cd7e78feee
1 changed files with 8 additions and 1 deletions

View File

@ -155,7 +155,14 @@ const module = {
} else {
returntext = returntext.substring(1);
} // Prevent Time Starting With 0 (eg. 01:00)
// console.log("Human Time:", returntext);
if (!returntext.includes(":")) {
if (returntext.length == 1) {
returntext = "0" + returntext; // Make tens digit in seconds always visible (eg. 0:09)
}
returntext = "0:" + returntext; // Make minutes visible as 0 when sub 60 seconds (eg. 0:51)
}
return returntext;
},
//--- End Convert Time To Human Readable String ---//