function dateCover(str) {
let isDate = new Date( + str);
let year = isDate.getFullYear();
let monthGet = (isDate.getMonth() + 1);
let month = monthGet < 10 ? "0" + monthGet: monthGet;
let datesGet = isDate.getDate();
let dates = datesGet < 10 ? "0" + datesGet: datesGet;
return year + ‘-‘ + month + ‘-‘ + dates
};
dateCover(str);
时间: 2024-11-10 01:29:15