毫秒级时间戳转换封装
2018-03-14 本文已影响4人
余生社会
const dateFormat = (time) => {
var date = new Date()
date.setTime(time)
var timeString = date.getFullYear() + "年" + date.getMonth() + 1 + "月" + date.getDay() + "日" + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds()
return timeString
}