我试图解释一系列代表时间的数字,以便我可以在不久的将来将它们更改为不同的数字。135671800有多长?每个是什么意思?是 DD:HH:MM:SS 吗?
{"next_timestamp":1356751800,"next_duration":9000,"next_title":"Saturday Night","next_description":"Hearing and Healing"}
解释结果的原始 javascript 是:
else if (typeof data.next_timestamp !== "undefined") {
seconds_till = data.next_timestamp - (new Date().getTime() / 1000);
days = Math.floor((seconds_till % 31536000) / 86400);
hours = Math.floor((seconds_till % 86400) / 3600);
minutes = Math.floor((seconds_till % 3600) / 60);
seconds = Math.floor(seconds_till % 60);
return intervalId = setInterval(function() {
if (--seconds < 0) {
seconds = 59;
if (--minutes < 0) {
minutes = 59;
if (--hours < 0) {
hours = 23;
if (--days < 0) {
days = 365;
}
}
}
}
谢谢!