我在一个 .php 文件中找到了这个 js 代码,用于倒计时。有人知道它是哪种日期格式吗?我不明白。。
startDate : "1932248800",
endDate : "2132248800",
now : Math.round(+new Date()/1000)
});
谢谢。
看起来像以秒为单位的 unix 时间戳:
const dates = {
startDate: "1932248800",
endDate: "2132248800",
now: Math.round(+new Date()/1000)
}
console.log(Object.keys(dates).map(key =>
`${key}: ${dates[key]} = ${new Date(dates[key] * 1000)}`
).join('\n'))
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句