转换为yyyy"/>
Thu Mar 07 2019 19:00:00 GMT+0800 (中国标准时间) 转换为yyyy
- Thu Mar 07 2019 19:00:00 GMT+0800 (中国标准时间) 转换为 2019-03-07 19:00:00
const d = new Date(Thu Mar 07 2019 19:00:00 GMT+0800 (中国标准时间))
const resDate = d.getFullYear() + '-' + this.p((d.getMonth() + 1)) + '-' + this.p(d.getDate())
const resTime = this.p(d.getHours()) + ':' + this.p(d.getMinutes()) + ':' + this.p(d.getSeconds())
p(s) {return s < 10 ? '0' + s : s
}
- 2019-03-07 19:00:00转换为 Thu Mar 07 2019 19:00:00 GMT+0800 (中国标准时间)
parserDate(date) {var t = Date.parse(date)if (!isNaN(t)) {return new Date(Date.parse(date.replace(/-/g, '/')))}
}
更多推荐
Thu Mar 07 2019 19:00:00 GMT+0800 (中国标准时间) 转换为yyyy
发布评论