将时间戳转为日期格式js代码

var time = new Date(1445270400000时间戳);

var date = time.getFullYear()+"-"+(time.getMonth()+1)+"-"+time.getDate();


你可能感兴趣的:(js代码)