getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
dateMat(value, type) {
let sj = this.$moment(value).format(type);
return sj;
},
js格式化时间(YYYY-MM-DD)
最新推荐文章于 2024-07-08 17:32:19 发布