mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 02:33:18 +00:00
Fixing bug in msToTime.js
This commit is contained in:
parent
960b98e177
commit
9c913cf2e5
@ -2,7 +2,7 @@ module.exports = function msToTime(duration, format) {
|
|||||||
var seconds = Math.floor((duration / 1000) % 60),
|
var seconds = Math.floor((duration / 1000) % 60),
|
||||||
minutes = Math.floor((duration / (1000 * 60)) % 60),
|
minutes = Math.floor((duration / (1000 * 60)) % 60),
|
||||||
hours = Math.floor((duration / (1000 * 60 * 60)) % 24);
|
hours = Math.floor((duration / (1000 * 60 * 60)) % 24);
|
||||||
days = Math.floor((duration / (1000 * 60 * 60 * 24)) % 24);
|
days = Math.floor((duration / (1000 * 60 * 60 * 24)));
|
||||||
|
|
||||||
days = (days < 10) ? "0" + days : days;
|
days = (days < 10) ? "0" + days : days;
|
||||||
hours = (hours < 10) ? "0" + hours : hours;
|
hours = (hours < 10) ? "0" + hours : hours;
|
||||||
|
Loading…
Reference in New Issue
Block a user