📌  相关文章
📜  javascript 天数到月底 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:01.540000             🧑  作者: Mango

代码示例1
let dateToday = new Date();
let lastDayOfMonth = new Date(dateToday.getFullYear(), dateToday.getMonth()+1, 0).getDate();
let daysUntilEndOfMonth = lastDayOfMonth - dateToday.getDate();
console.log(daysUntilEndOfMonth)