Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output "Just now" instead of "0 seconds ago" in strict mode #11

Open
Sans84 opened this issue Nov 4, 2023 · 1 comment
Open

Output "Just now" instead of "0 seconds ago" in strict mode #11

Sans84 opened this issue Nov 4, 2023 · 1 comment

Comments

@Sans84
Copy link

Sans84 commented Nov 4, 2023

Is it possible to display "Just now" instead of "0 seconds ago" for a newly added record in strict mode?

@marcreichel
Copy link
Owner

@Sans84 I don't think this is possible. This package depends on date-fns to display the text. The only way of implementing this here directly would be to catch that case in this package before letting date-fns do its thing. The problem here would be that I would have to maintain the “Just now” string for every language, which would bloat up the size of this package.

In my opinion the better way would be to create an issue (or PR) in the date-fns repository, for them to implement this feature.

The alpine-timeago package can then adapt synchronously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants