subtract month and year from date javascript code example Example: js date minus 18 years use moment.js