📜  js中的日期字符串到日期 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:46.239000             🧑  作者: Mango

代码示例3
var ts = '1471793029764';
ts = Number(ts); // cast it to a Number
var date = new Date(ts); // works

var invalidDate = new Date('1471793029764'); // does not work. Invalid Date