Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
71
rated 0 times [  74] [ 3]  / answers: 1 / hits: 54068  / 7 Years ago, thu, june 29, 2017, 12:00:00

I want to add 30 days to current date and get in a format.



Im confused to add a 30 to a date and get new.



Its pure JS Solution needed.



Format : June 10, 2017


More From » datejs

 Answers
7
var date = new Date(); // Now
date.setDate(date.getDate() + 30); // Set now + 30 days as the new date
console.log(date);

[#57267] Monday, June 26, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jonrened

Total Points: 627
Total Questions: 114
Total Answers: 99

Location: Zimbabwe
Member since Thu, Jul 21, 2022
2 Years ago
jonrened questions
Mon, Nov 2, 20, 00:00, 4 Years ago
Tue, May 19, 20, 00:00, 4 Years ago
Tue, Jan 21, 20, 00:00, 4 Years ago
Thu, Nov 7, 19, 00:00, 5 Years ago
;