Contact: aviboots(AT)netvision.net.il
43,939 questions
57,344 answers
573 users
function addMonthsToDate(months, date = new Date()) { date.setMonth(date.getMonth() + months); return date; } const date = new Date('2022-01-14'); console.log(addMonthsToDate(5, date).toDateString()); /* run: "Tue Jun 14 2022" */