JS一行代码获取下个月时间

in 前端 with 0 comment
console.log(new Date((new Date).getFullYear(), (new Date).getMonth() + 1, 1, 12))

参见:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Date

Comments are closed.