I\'d like the moment().fromNow() functionality, but when the date is close it is too precise - ex. I don\'t want it to show \'in 3 hours\' but \'today\' - so basica
moment().fromNow()
Here is how I do that using moment:
let today = moment().format('DD MMMM YYYY'); let tomorrow = moment().add(1, 'days').format('DD MMMM YYYY').toString(); let yesterday = moment().subtract(1, 'days').startOf('day').format('DD MMMM YYYY').toString();