📜  javascript代码示例中的字符串日期到日期

📅  最后修改于: 2022-03-11 15:04:33.058000             🧑  作者: Mango

代码示例6
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