let dateNow = new Date(),
monthNow = dateNow.getMonth(),
dayNow = dateNow.getDate()
if (monthNow < 10) {
monthNow = '0' + '' + monthNow
}
if (dayNow < 10) {
dayNow = '0' + '' + dateNow.getDate()
}
let nowDay = dateNow.getFullYear() + '-' + monthNow + '-' + dayNow
当前时间简单转换成xxxx-xx-xx时间
最新推荐文章于 2023-07-11 16:46:42 发布