Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

subtract 18 years from today javascript

eighteenYearsAgo = new Date();
eighteenYearsAgo = eighteenYearsAgo.setFullYear(eighteenYearsAgo.getFullYear()-18);
console.log(eighteenYearsAgo);
Source by codereview.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #subtract #years #today #javascript
ADD COMMENT
Topic
Name
7+3 =