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

relativeTime Seconds #2558

Closed
randdusing opened this issue Aug 14, 2015 · 5 comments
Closed

relativeTime Seconds #2558

randdusing opened this issue Aug 14, 2015 · 5 comments

Comments

@randdusing
Copy link

I'm using relativeTime and noticed the "s" equals "a few seconds" rather than "seconds" as shown in the documentation (http://momentjs.com/docs/#/customization/relative-time/). Is it possible to add a "seconds" and "second" value? I was hoping to use these as part as custom humanize implementation with multilingual support, and "a few seconds" isn't granular enough. Thanks!

@ichernev
Copy link
Contributor

@randdusing you have to change all locales, and also make a global flag / thresholds to control when to use the few seconds and when to use N seconds. If you do this in a PR I'll merge it, I'm not doing it though :)

@ichernev
Copy link
Contributor

@randdusing the "documentation" is about customizing it. The semantics is that we don't have a N seconds string, so we don't have code to support it. So I'm dropping the Documentation flag from here.

@randdusing
Copy link
Author

Ahh ok, I misunderstood the documentation. I may be able to get to it one day ;)

ichernev added a commit that referenced this issue Mar 11, 2017
[feature] Enable relative time for multiple seconds, request #2558
@marwahaha
Copy link
Member

As of Moment 2.18.0, we have a ss Relative Time Threshhold that controls when to use N seconds vs a few seconds.
http://momentjs.com/docs/#/customization/relative-time-threshold/

Is this granular enough for you? :) @randdusing

@randdusing
Copy link
Author

@marwahaha Perfect, thanks!

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

No branches or pull requests

5 participants