Js获取当前时间的月初月末
程序员文章站
2022-05-15 09:50:51
...
// 获取当前时间的月初月末
let currentDay = new Date()
currentDay.setDate(1)
console.info('firstDay:', currentDay)
let endDay = new Date(currentDay)
endDay.setMonth(currentDay.getMonth() + 1)
endDay.setDate(0)
console.info('endDay..........:', endDay)
下一篇: php获取指定年月的月初月末时间戳