function fnMsToTime(duration) {
var milliseconds = parseInt((duration%1000)/100)
, seconds = parseInt((duration/1000)%60)
, minutes = parseInt((duration/(1000*60))%60)
, hours = parseInt((duration/(1000*60*60))%24)
, days = parseInt(duration/(1000*60*60*24));
hours = (hours < 10) ? "0" + hours : hours; minutes = (minutes < 10) ? "0" + minutes : minutes; seconds = (seconds < 10) ? "0" + seconds : seconds;
return days + "일 " + hours + "시간 " + minutes + "분 " + seconds + "초 " + milliseconds + ' 남음';}
http://hangaebal.blogspot.kr/2015/07/javascript-milliseconds-to-time-string.html
'Blogger 이사' 카테고리의 다른 글
[Javascript] 최대 바이트 제한 (string max byte length) (0) | 2016.04.04 |
---|---|
[cakephp] .htaccess mod_rewrite edit for exclude folder or url (0) | 2016.04.04 |
[php] increase max upload size (wordpress) (0) | 2016.04.04 |
[apache] change run user, group (0) | 2016.04.04 |
[cakephp] not found the requested url (apache) (0) | 2016.04.04 |