毫秒级时间戳转换封装

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
}

你可能感兴趣的:(毫秒级时间戳转换封装)