📅  最后修改于: 2022-03-11 15:02:01.540000             🧑  作者: Mango
let dateToday = new Date();
let lastDayOfMonth = new Date(dateToday.getFullYear(), dateToday.getMonth()+1, 0).getDate();
let daysUntilEndOfMonth = lastDayOfMonth - dateToday.getDate();
console.log(daysUntilEndOfMonth)