Handle past-time
This commit is contained in:
parent
324536e10d
commit
a5819c492e
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,9 @@
|
|||
};
|
||||
function prettyPrintTime(value) {
|
||||
var sec_num = parseInt(value, 10);
|
||||
if (sec_num < 0) {
|
||||
return '00:00';
|
||||
}
|
||||
var hours = Math.floor(sec_num / 3600);
|
||||
var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
|
||||
var seconds = sec_num - (hours * 3600) - (minutes * 60);
|
||||
|
|
Loading…
Reference in a new issue