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

Add possibility to change suffix / prefix like "ago" and "in" #242

Open
kulla opened this issue Apr 16, 2021 · 1 comment
Open

Add possibility to change suffix / prefix like "ago" and "in" #242

kulla opened this issue Apr 16, 2021 · 1 comment

Comments

@kulla
Copy link

kulla commented Apr 16, 2021

First of all: Thanks for this library (as well as for https://github.com/hustcc/timeago-react ). ❤️ We can successfully use them in our NGO.

My feature request / question: I wanted to use this library to display a message like At this site since 2 days / 3 weeks / 1 year .... However, when I use https://github.com/hustcc/timeago-react there is always the suffix / prefix "ago" or "in". Here is an example, how I wanted to use it with the "unwanted" ago:

2021-04-16-120819_852x321_scrot

Thus: Is there a way to get the timeago string without the "ago" suffix / "in" prefix? https://www.npmjs.com/package/react-timeago has the option formatter with which a own formatter can be specified. Is there a similar way here?

Note: I know that a simple workaround is to change the sentence to something like Registered 2 days ago / 3 weeks ago / 1 year ago .... However in this case we want to empathize the time duration somebody voluntarily works at our site and not the event of the registration itself. So the sentence with since would be better.

@hustcc
Copy link
Owner

hustcc commented Apr 16, 2021

use registeLocale

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