subtract 18 years from today javascript code example
Example 1: js date minus 18 years
use moment.js
Example 2: subtract 18 years from today javascript
eighteenYearsAgo = new Date();
eighteenYearsAgo = eighteenYearsAgo.setFullYear(eighteenYearsAgo.getFullYear()-18);
console.log(eighteenYearsAgo);