📌  相关文章
📜  将 8-aug-2021 转换为日期 javascript - 任何代码示例

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

代码示例1
var parts ='2014-04-03'.split('-');
// Please pay attention to the month (parts[1]); JavaScript counts months from 0:
// January - 0, February - 1, etc.
var mydate = new Date(parts[0], parts[1] - 1, parts[2]); 
console.log(mydate.toDateString());