js 毫秒转日期

Date.prototype.toLocaleString = function() {
    return this.getFullYear() + "-" + (this.getMonth() + 1) + "-" + this.getDate() + " " 
    + this.getHours() + ":" + this.getMinutes() + ":" + this.getSeconds();
};

var date = new Date(毫秒数).toLocaleString();
原文地址:https://www.cnblogs.com/ljl-blog/p/6909328.html