timeFormat(timestamp) {
var time = new Date(timestamp);
var year = time.getFullYear();
var month = time.getMonth() + 1;
var date = time.getDate();
var hours = time.getHours();
var minutes = time.getMinutes();
var seconds = time.getSeconds();
return year + '-' + this.addZero(month) + '-' + this.addZero(date)
// return year + '-' + this.addZero(month) + '-' + this.addZero(date) + ' ' + this.addZero(hours) + ':' + this.addZero(minutes) + ':' + this.addZero(seconds)
},
时间戳转时分秒
最新推荐文章于 2024-10-10 10:46:31 发布