码迷,mamicode.com
首页 > Web开发 > 详细

js转换后台接受的日期格式

时间:2019-08-17 12:26:54      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:get   common   转换   cti   comm   local   unix   ref   后台   

var html = "--";
if(data.createTime!=null&&data.createTime!=""){
Date.prototype.toLocaleString = function() {
return this.getFullYear() + "-" + (this.getMonth() + 1) + "-" + this.getDate() ;
};
var unixTimestamp = new Date(data.createTime) ;
commonTime = unixTimestamp.toLocaleString();

html=commonTime;
}
return html;

友情链接:https://www.cnblogs.com/zhanghaoliang/p/5997619.html

js转换后台接受的日期格式

标签:get   common   转换   cti   comm   local   unix   ref   后台   

原文地址:https://www.cnblogs.com/zzguan/p/11367987.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!