Not sure if this is possible with Moment's own methods, but you can easily create your own Moment extension:
moment.fn.minutesFromNow = function() { return Math.floor((+new Date() - (+this))/60000) + ' mins ago'; }
Fiddle
Note that other moment methods will not be bound after minutesFromNow() , since my extension returns a string.
change
Fixed plural extension (0 min s , 1 min, 2 min s ):
moment.fn.minutesFromNow = function() { var r = Math.floor((+new Date() - (+this))/60000); return r + ' min' + ((r===1) ? '' : 's') + ' ago'; }
You can also replace “min” with “minute” if you prefer a long shape.
Fiddle
Fabrício matté
source share