jq实现 特殊日期格式转换//2018-12-03T17:17:36.000+08:00 转化为2018-12-03 00:00:00(正则表达式的方法)

	//2018-12-03T17:17:36.000+08:00 转化为2018-12-03 00:00:00
	
$(function(){
	 var dateee = new Date("2018-12-04T00:00:00.000+08:00").toJSON();
			console.log(dateee);
        var date = new Date(+new Date(dateee)+8*3600*1000).toISOString().replace(/T/g,' ').replace(/\.[\d]{3}Z/,'')  
        
           alert(date);
           console.log("时间2==="+date);
});

猜你喜欢

转载自blog.csdn.net/u012967454/article/details/84789206