/**
* 获取当前日期
*/
getNowDate() {
const timeOne = new Date()
const year = timeOne.getFullYear()
let month = timeOne.getMonth() + 1
let day = timeOne.getDate()
month = month < 10 ? '0' + month : month
day = day < 10 ? '0' + day : day
const NOW_MONTHS_AGO = `${year}-${month}-${day}`
return NOW_MONTHS_AGO
}
获取当前日期(年月日)
最新推荐文章于 2024-07-23 17:38:26 发布