忽然笑
也许moment.js能够开箱即用地解析它,但是,如果您不愿意附加外部库并为此目的保持其与环境其余部分的兼容性,您可以自己解析:const dateStr = "August 24th, 2020", parseDate = s => { const [, month, dd, yyyy] = s.match(/([a-z]+)\s(\d+)[a-z]+,\s(\d+)/i)||[], months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] return new Date(Date.UTC(yyyy, months.indexOf(month), dd)) } console.log(parseDate(dateStr))