JavaScript:日期函数Date

var date = new Date(data.comm_time);
var dateT = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" +  date.getMinutes();
posted @ 2019-01-09 17:42  xuejianbest  阅读(155)  评论(0编辑  收藏  举报