Hi,
what is the best/correct way to show a seconds-value as HH:MM:SS?
I can't find any helpful methods in the documentation. Maybe it is because I am a beginner.
What be nice if anybody can give me a hint!
cheers
var timeString = Lang.format("$1$:$2$:$3$", [
hours.format("%02d"),
minutes.format("%02d"),
seconds.format("%02d")
]);
function secondsToTimeString(totalSeconds) {
var hours = totalSeconds / 3600;
var minutes = (totalSeconds /60) % 60;
var seconds = totalSeconds % 60;
var timeString = format("$1$:$2$:$3$", [hours.format("%01d"), minutes.format("%02d"), seconds.format("%02d")]);
return timeString;
}