moment(Date.now()).subtract(, ); year code example
Example 1: moment js subtract years
let min_date = moment().subtract(18, 'years');
Example 2: moment(endDate).subtract(1, 'month')
moment().subtract(7, 'days');
let min_date = moment().subtract(18, 'years');
moment().subtract(7, 'days');