You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
443 B

- var timeAgo = moment.duration(moment.utc(new Date()).diff(moment.utc(new Date(parseInt(timeAgoTime) * 1000))));
if (timeAgo.asHours() < 1)
if (timeAgo.asMinutes() < 1)
span #{timeAgo.seconds()}s
else
span #{timeAgo.minutes()}m
else
if (timeAgo.asHours() >= 1 && timeAgo.asHours() < 24)
span #{timeAgo.hours()}h
if (timeAgo.minutes() > 0)
span #{timeAgo.minutes()}m
else
span #{utils.shortenTimeDiff(timeAgo.format())}