hustcc / timeago.js

:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.
https://timeago.org
MIT License
5.29k stars 411 forks source link

Possible to selectively remove 'just now' and show seconds? #228

Closed morrow95 closed 4 years ago

morrow95 commented 4 years ago

Use case is I am automatically updating a portion of my page every 15 seconds. I am using timeago to display the last time an update occurred. By default, it shows 'just now' until it reaches '10 seconds ago'. Is there a way to change this particular usage so it is 'just now', 1 second ago, 2 seconds ago, and so on as normal? As I am updating this every 15 seconds I would rather show the seconds value from the start rather than 'just now' for those first 9 seconds.

In all other cases I am using it I prefer the 'just now' for those first 9 seconds.

morrow95 commented 4 years ago

Nevermind... noticed I can create and register a custom locale and use it. Got it working.