Answers for "javascript date subtract years"

0

javascript subtract years from date

var date = new Date(); 
date.setDate(date.getDate() + days);
date.setMonth(date.getMonth() + months);
date.setFullYear(date.getFullYear() + years);
console.log((date.getMonth() ) + '/' + (date.getDate()) + '/' + (date.getFullYear()));
Posted by: Guest on February-10-2021
1

js date minus 18 years

use moment.js
Posted by: Guest on November-19-2020

Code answers related to "javascript date subtract years"

Code answers related to "Javascript"

Browse Popular Code Answers by Language