Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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()));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #subtract #years #date
ADD COMMENT
Topic
Name
1+1 =