I want to know how long ago a moment(date) is.
moment.duration(moment() - date)
Works, but I think it's a bit clunky. Is there a cleaner way of doing it? Can I otherwise extend duration with a method like this and should I?
I want to know how long ago a moment(date) is.
moment.duration(moment() - date)
Works, but I think it's a bit clunky. Is there a cleaner way of doing it? Can I otherwise extend duration with a method like this and should I?