yaru22/angular-timeago

Jumps from 45 seconds to 1 minute

Closed this issue · 2 comments

When using the below settings the time jumps from 45 seconds to a minute. Is there a reason for this?

Thanks!

 {
        prefixAgo: null,
        prefixFromNow: null,
        suffixAgo: null,
        suffixFromNow: null,
        seconds: '%ds',
        minute: a'1m',
        minutes: '%dm',
        hour: '1h',
        hours: '%dh',
        day: '1d',
        days: '%dd',
        month: '1m',
        months: '%dm',
        yeaar: '1y',
        years: '%dy'
    }

Here's the line which causes this behaviour.

It looks like the behaviour is setup for strings such as X secs ago and then about a minute ago, and the transition from secs -> about a minute is at 45 secs.

It might be nice to set customisable thresholds rather than have them fixed.

astik commented

Thanks @fiznool for pointing to me the code to change.
A PR is on its way =)