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
Request: Measure of length #526
Comments
@mgnslndh Did you try the metric converter? Does it fit your needs? How can it be improve? |
I'd like to suggest a way to limit the range of prefixes used, let's suppose we are trying to humanize distances
The last result is not very useful, a Megameter is a SI unit, but i'd rather have 5000km as a result |
I've just started implementing this request, as my first contribution to an open source project! My current plan is to add an optional parameter to ToMetric named largestPrefix. Setting it to a new enum MetricPrefix will place an upper limit to the used prefix. I got some questions that I hope you can help me with:
Thank you for any help with my questions, or other suggestions for an open source noob! :) (Edit: Changed parameter type to enum.) |
My current names are maxPrefix and minPrefix. Short and max/min is very common in programming. |
@JonasBarka Your comment make me think that you could open an issue about your contribution question. This issue could result in a PR to the Contribute.md file. :) |
I think it would make a good addition to Humanizer if it was possible to humanize length just like time (as with TimeSpan).
Example of how the API could look like. I guess there are more to this feature but it is a start:
value
would become"1.3 m"
The text was updated successfully, but these errors were encountered: