var totalSeconds = 1 * 60 * 60 * 24 * 2 + 1 + 60 + 60 * 60 * 5;
var days = Math.floor(totalSeconds / 86400);
totalSeconds %= 86400;
var hours = Math.floor(totalSeconds / 3600);
totalSeconds %= 3600;
var minutes = Math.floor(totalSeconds / 60);
var seconds = totalSeconds % 60;
console.log(days + ' ' + hours + ':' + minutes + ':' + seconds);
125
ОтветитьУдалить