A filter to cast the input to a moment.duration and call the method humanize on it.
The first argument is to use the suffix in the humanize function
moment.duration(-3,'m').humanize() : 3 minutesmoment.duration(3,'m').humanize() : 3 minutesmoment.duration(-3,'m').humanize(true) : 3 minutes agomoment.duration(3,'m').humanize(true) : in 3 minutes
{{ myValue | luifHumanize }}
{{ myValue | luifHumanize : usePrefix }}
Set myValue to
myValue humanized : {{ myValue | luifHumanize }}
myValue humanized with a suffix : {{ myValue | luifHumanize : true }}