Javascript method to find number of milliseconds from 1970
This question already has an answer here:
使用getTime函数:
var dt = new Date('2012-01-01');
var time = dt.getTime();
You can get it with:
new Date('2012-01-01').getTime();
The getTime()
method returns the number of milliseconds between midnight of January 1, 1970 and the specified date.
上一篇: Web浏览器的时间戳?