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/,'')
var format = function (time, format) { var t = new Date(time); var tf = function (i) { return (i < 10 ? '0' : '') + i }; return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a) { switch (a) { case 'yyyy': return tf(t.getFullYear()); break; case 'MM
//格式化后日期为:yyyy-MM-dd HH:mm:ss function FormatAllDate(sDate) { var date = new Date(sDate); var seperator1 = "-"; var seperator2 = ":"; ; var strDate = date.getDate(); var hours = date.getHours(); var minutes = date.getMinutes(); var sec
/*将JSON Date 格式转换为JavaScript 的Date 类型JSON Date 格式:"/Date(146471041000)/"*/function JSONDateToJSDate(jsondate) { if (jsondate != "" && jsondate != null) { var date = new Date(parseInt(jsondate.replace("/Date(", "&