moment("20111031", "YYYYMMDD").fromNow(); // 9 years ago
moment("20120620", "YYYYMMDD").fromNow(); // 8 years ago
moment().startOf('day').fromNow(); // 13 hours ago
moment().endOf('day').fromNow(); // in 11 hours
moment().startOf('hour').fromNow(); // 4 minutes ago
moment("20111031", "YYYYMMDD").fromNow(); // 11 years ago
moment("20120620", "YYYYMMDD").fromNow(); // 10 years ago
moment().startOf('day')
// 11 hours ago
moment().endOf('day').fromNow(); // in 13 hours
moment().startOf('hour').fromNow(); // 19 minutes ago
moment("20111031", "YYYYMMDD").fromNow(); // 11 years ago
moment("20120620", "YYYYMMDD").fromNow(); // 10 years ago
moment().startOf('day').fromNow(); // 20 hours ago
moment().endOf('day').fromNow(); // in 4 hours
moment().startOf('hour').fromNow(); // 10 minutes ago
/*let answer = mdArray.find(el=> el.date == moment(da, 'YYYY-MM-DD').format('MMMM Do YYYY'));*/
Inside of moment, you add your date object(can be in many formats).
moment().format('YYYY-MM-DD');// FECHA DE ACTUAL: 2022-12-04
moment().format('DD-MM-YYYY');// FECHA DE ACTUAL: 04-12-2022
moment('2022-12-12').add(10, 'days').format('DD-MM-YYYY');//SUMA 10 DIAS: 22-12-2022