const my_date = new Date();
console.log(my_date);
// Add 3 months to today's date
new Date(my_date.setMonth(my_date.getMonth() + 3));
console.log(my_date);
We are using the Date.setMonth() function to add some months to the date. In the above code example, we are adding 3 months to the current date using javascript.
0 Comments