JS 2019-12-03T15:53:23.000+08:00 转化为 YYYY MM DD

js时间格式转化

2019-12-03T15:53:23.000+08:00 转化为 YYYY MM DD

var dateee = new Date(createTime).toJSON();
var date = new Date(+new Date(dateee)+8*3600*1000).toISOString().replace(/T/g,' ').replace(/\.[\d]{3}Z/,'')

猜你喜欢

转载自www.cnblogs.com/torchstar/p/11977845.html