-
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
add .ToMetric() rounding #609
Labels
Comments
11 tasks
@onovotny any indication when this can be merged? |
It looks nice, but I cant try it. (Can I debug it on Linux?) |
@JonCubed I'm aiming to get 2.2 out in early May, thanks! |
@onovotny awesome thanks looking forward to 2.2 |
ogsilvaa
pushed a commit
to ogsilvaa/Humanizer
that referenced
this issue
Sep 12, 2017
* Add Esperanto support to NumberToWords. Fixes Humanizr#558 * Fixed incorrect locale in readme For example on `ToOrdinalWords` the Arabic example was incorrectly listed as 'Brazilian Portuguese' * Pass through the content of the "Letter, other" Unicode category. fixes Humanizr#578 * Fix misspelling Fixed misspelling of "Uper" to "Upper". * added translation for DateHumanize_Now * update for latest gv config * Add resource validation for DefaultFormatter to prevent "Value cannot be null." exception on the .NET format. * Fix missing format value for the argument exception. * Validate resource key before using .FormatWith extension. * Use string interpolation beside string format. * Add summary for DefaultFormatter. * temp disable gitlink * Fix CONTRIBUTING.md of broken links. * Squashed commit of the following: commit f9423de Author: hangy <[email protected]> Date: Thu Dec 1 20:48:01 2016 +0100 Update TimeSpanHumanizeTests.cs commit 2e5dfe5 Author: hangy <[email protected]> Date: Thu Dec 1 20:37:50 2016 +0100 Apparently I'm stupid and 7 days actually get humanized as 1 week. commit 152a119 Author: hangy <[email protected]> Date: Wed Nov 30 23:50:51 2016 +0100 Workaround for unneeded suffix: Just use the same value. The reason for this workaround is that at the method that decides if the suffix should be applied, the information about the time unit is not available. So it would either need to do some string magic and explicitly exclude the "TimeSpanHumanize_MultipleDays" resource key from adding the postfix, or most of the `TimeSpan` formatting code would need to be rewriten for Croatian or modified for all languages to support Croatian. Neither seems reasonable for a quick change. commit 002cc7b Author: hangy <[email protected]> Date: Wed Nov 30 23:12:57 2016 +0100 Added some more tests. From what I've read, all days should resolve to "dana" for the Croatian language. (No "_DualTrialQuadral" postfix.") commit c190e9d Author: hangy <[email protected]> Date: Tue Nov 22 00:29:51 2016 +0100 Add initial test for issue 597. * fix cmd build * update packages * Revert "Add Esperanto support to NumberToWords. Fixes Humanizr#558" * Add Authenticode signing to binaries * install signclient package * Register Portuguese TimeSpan localisation as "pt". According to Humanizr#601, the localisation is good for Portuguese in general, not just for Brazilian Portuguese. I copied the unit test, so that we can prove that there's no regression. Additionally, I copied the `OrginalizeTests`, because those were already registered as "pt", not "pt-BR". Note that `NumberToWords` is still only valid for pt-BR unless confirmed otherwise. * Syntax correction in readme.md Very minor correction to the syntax. Named parameters require a :, not a =. (I found this when I copy/pasted the code and it didn't work without changes) * Added test to reproduce issue * Handles issue without try-catch Utilize null-checks to verify there is a description in the enums display attribute * Added whitespace before if-statement Added a whitespace before if-statement * adding parameter decimals toMetric(). See issue Humanizr#609 * Added Sweedish collection formatter * issue 611: added the method Kebaberize * removed a comment and an empty char * Update readme.md * Update to VS 2017 * remove file from root * gv * update CS url * appveyor * clean code a bit I am not sure about the line 12. I think the difference between both is more clear like this. * Revert "clean code a bit" This reverts commit eb110e5. * IsDefined is prefered `IsDefined` won't loop through all the attributes. Just saying, didn't bench it. * Latvian localization Thanks to Līva Miltuze for help with translation. * Create Humanizer.Core.lv.nuspec * Update Humanizer.sln * Update Humanizer.old.csproj * Implemented TimeSpan Humanize extension method for TimeUnit.Month and TimeUnit.Year with translations. * Readme updated. * Changes in csproj reverted. * Test for uniqueness of day sequences added. * Include LV in main package * remove old project file * Build script updates * Add sourcelink * fix sign client syntax * Add support for long to ToQuantity * Update Number to words to take a long * Add long.ToQuantity(ShowQuantityAs.Words) * Add extra public method for int and long * Update public_api_approved.txt * Add tests for long.ToWords() and update XML comment * Removing out of range test, correcting names of large numbers * update to long * fix merge * Add ToOrdinalWords extension with gender overload * Use localisation for ToOrdinalWords to allow for localised implementation and add readme section * Update XML docs for DateToOrdinalWords * VS...grr. * pdb is embedded now * Incorporated review comments by @khellang, @M-Zuber, @jeremymeng. Marked reviewed language with "Native speaker". Marked 'sv' as reviewed even confirmation is pending. * Marked confirmed translations with "Native speaker". * Update xUnit and fix test overload issue * Added greek language resources as per #pr632 * v2.2 release notes * Update package
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
would be great to be able to round ToMetric() result so instead of 2.663982M it would spit out 2.66M.
it will take an optional parameter of rounding digits and potentially rounding direction
The text was updated successfully, but these errors were encountered: