var date1 = new Date(); var date2 = new Date(date1); date2.setDate(date1.getDate() + 30); console.log(date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate() + "-"+ date2.getDay());