add days and get new date javascript code example
Example 1: javascript add day to date
function addDays(date, days) {
var result = new Date(date);
result.setDate(result.getDate() + days);
return result;
}
Example 2: nodejs date add days
date.setTime( date.getTime() + days * 86400000 );