📅  最后修改于: 2022-03-11 15:02:54.502000             🧑  作者: Mango
var dateString = "20120515";
var year = dateString.substring(0,4);
var month = dateString.substring(4,6);
var day = dateString.substring(6,8);
var date = new Date(year, month-1, day);