moment toString subtract day code example Example: moment(endDate).subtract(1, 'month') moment().subtract(7, 'days');