Answers for "javascript days until end of month"

0

javascript days until end of month

let dateToday = new Date();
let lastDayOfMonth = new Date(dateToday.getFullYear(), dateToday.getMonth()+1, 0).getDate();
let daysUntilEndOfMonth = lastDayOfMonth - dateToday.getDate();
console.log(daysUntilEndOfMonth)
Posted by: Guest on February-13-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language