Answers for "momentjs get all years"

2

moment js subtract years

let min_date = moment().subtract(18, 'years');
Posted by: Guest on November-19-2020
0

Moment js get first and last day of current month

const startOfMonth = moment().startOf('month').format('YYYY-MM-DD hh:mm');
const endOfMonth   = moment().endOf('month').format('YYYY-MM-DD hh:mm');
Posted by: Guest on April-07-2022

Browse Popular Code Answers by Language