-
Notifications
You must be signed in to change notification settings - Fork 965
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
Feature Request: Allow MaxUnit and MinUnit for TimeSpan #388
Comments
Thanks for the nice words and suggestion @deadlydog Funny you should mention this as maxUnit was implemented just a couple of days ago :) As you said it's not on nuget yet (will be in the next few minutes).
|
Hi, I would like to work on this subject to participate in your project, that I find very useful. Is anyone treating this evolution or can I start it directly? |
Thanks @blackding. Cool. Go forth and conquer!
|
Hi, I like this project and I rely want to participate. I have worked on this issue and now I want to sync the changes. |
Closed by #403 |
First off, this is a great package. Well done :)
Right now you have the ability to specify a precision integer for TimeSpans. This is great for hard-coded TimeSpans, but isn't flexible enough for calculated ones. In my scenario, I want to always have the TimeSpan represented down to the second, whether the time span is for 5 minutes or 5 days. Ideally I'm looking to be able to do something like:
which would generate a string like:
"5 minutes, 15 seconds"
or
"2 days, 3 hours, 2 minutes, 33 seconds"
And to go along with that, being able to specify a maxUnit would be great too, so if I had also specified maxUnit: TimeUnit.Hour, then the above string would have been:
"51 hours, 2 minutes, 33 seconds"
Right now the documentation in the ReadMe.md says that maxUnit exists, but it is not in the latest stable NuGet package, which is currently 1.33.7. Maybe it's just still in a feature branch and not yet pushed to the NuGet Gallery?
The text was updated successfully, but these errors were encountered: