Показать сообщение отдельно
  #3 (permalink)  
Старый 26.01.2014, 19:43
sinistral
Посмотреть профиль Найти все сообщения от melky
 
Регистрация: 28.03.2011
Сообщений: 5,418

попробуйте
amount = Math.floor(amount / 1e3);
days = Math.floor(amount / 86400);
amount = amount % 86400;
hours = Math.floor(amount / 3600);
amount = amount % 3600;
mins = Math.floor(amount / 60);
amount = amount % 60;
secs = Math.floor(amount);

заменить на
amount = Math.floor(amount / 1e3);
days = Math.floor(amount / 86400);
days = (days < 10) ? ('0' + days) : days;
amount = amount % 86400;
hours = Math.floor(amount / 3600);
hours = (hours < 10) ? ('0' + hours) : hours;
amount = amount % 3600;
mins = Math.floor(amount / 60);
mins = (mins < 10) ? ('0' + mins) : mins;
amount = amount % 60;
secs = Math.floor(amount);
secs = (secs < 10) ? ('0' + secs) : secs;
Ответить с цитированием