时间格式
formatDate(date) {
let GETMONTH = date.getMonth() + 1
if(GETMONTH<10){
return `${date.getYear()+1900}-0${date.getMonth() + 1}-${date.getDate()}`;
}else{
return `${date.getYear()+1900}-${date.getMonth() + 1}-${date.getDate()}`;
}
// return `${date.getYear()+1900}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`;
},
网友评论