-
Notifications
You must be signed in to change notification settings - Fork 966
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
Humanize Count #456
Comments
Thanks for the suggestion @timothy-shields. This feature does not exist because it was never requested. It would make for a good addition. Did you want to submit a PR? :) |
Just saw this post. I create exactly the same issue ( #457 ) two days ago. I used the searchbox without success. I should just read the issue list. Well, I wrote the code to handle this. I will rewrite it and submit a PR. |
Code rewrote. Test added. PR coming soon. (tomorrow? :) |
This was implemented in #459 and is now in dev |
It seems like there isn't any functionality to humanize a count. Some examples:
It seems very similar to
ByteSize
(maybeCount
?) except you'd haveCount.Ones
,Count.Hundreds
,Count.Thousands
,Count.Millions
, etc.Count.Humanize(precision)
would return the count string at that precision.Example:
Does this functionality exist in the library? If not, was it excluded by design? Or has it just not been thought of or implemented?
A good example of this kind of humanization of a count is on StackOverflow: http://stackoverflow.com/questions?sort=votes Note how the views ("673k views", "2.4m views", etc.) look.
The text was updated successfully, but these errors were encountered: