function getDuration(second) { var days = Math.floor(second / 86400); var hours = Math.floor((second % 86400) / 3600); var minutes = Math.floor(((second % 86400) % 3600) / 60); var seconds = Math.floor(((second % 86400) % 3600) % 60); var duration = days + "天" + hours + "小时" + minutes + "分" + seconds + "秒"; return duration; }
相关文章
- 12-27js将秒转换成几天几小时几分几秒
- 12-27C#计算107653秒是几天几小时几分钟几秒?