duration.humanize has thresholds that determine when a unit is considered a minute, an hour, and so on. For example, by default, more than 45 seconds is considered a minute, more than 22 hours is considered a day, and so on.
To change these moment.relativeTimeThreshold(unit, limit) , use moment.relativeTimeThreshold(unit, limit) , where the limit is one of s , m , h , d , m .
s seconds is the least number of seconds considered to be a minutem minutes is the least number of minutes considered to be hoursh hours is the least number of hours considered to be a dayd days the smallest number of days to be considered a monthm months is the smallest number of months considered a year
NOTE The resulting thresholds were added in 2.8.1 .
Epokk source share