Humanizer
Humanizer copied to clipboard
Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
From a question [on SO](https://stackoverflow.com/q/74609239/9971404) without resolution: I need to humanise an historical DateTime to a string that one typically sees in calendar apps, e.g.: - 13:40 - 00:19 -...
TB (terabyte) is currently the largest unit. Would be great to expand it to the largest possible unit. E.g. petabyte, exabyte, etc. [](https://en.wikipedia.org/wiki/Byte)
Are ubiquitous verbs on the horizon? This could make so many programs "sound" friendlier: ``` csharp string PeopleInLinePhrase(int numberOfPeople) { int x = numberOfPeople; return string.Format( "There {0} {1} {2}...
Currently TimeSpan has an extension method to do following ``` TimeSpan.FromMilliseconds(122500).Humanize(minUnit: TimeUnit.Second) => "2 minutes, 2 seconds" // instead of 2 minutes, 2 seconds, 500 milliseconds TimeSpan.FromHours(25).Humanize(minUnit: TimeUnit.Day) => "1...
```csharp TimeSpan.FromDays(-60).Humanize(precision: 3, maxUnit: TimeUnit.Month, minUnit: TimeUnit.Minute) // 1 month, 8 weeks, 4 days TimeSpan.FromDays(60).Humanize(precision: 3, maxUnit: TimeUnit.Month, minUnit: TimeUnit.Minute) // 1 month, 29 days TimeSpan.FromDays(-30).Humanize(precision: 3, maxUnit: TimeUnit.Month, minUnit:...
Here is how to reproduce: ``` $ cd src/Humanizer.Tests $ sw_vers ProductName: Mac OS X ProductVersion: 10.15.6 BuildVersion: 19G2021 $ dotnet --version 5.0.101 $ dotnet test --framework netcoreapp2.1 Microsoft (R)...
Given the string `meter per second` pluralized yields `meter per seconds` which is incorrect, as it should be `meters per second`. This pattern repeats on any unit where multiple different...
I want to keep the precision to round at 75% so I set the PrecisionDateTimeHumanizeStrategy to .75, but started to experience unexpected results when the date is a multiple of...
Versions: .NET Core SDK 3.1.403 Humanizer.Core 2.8.26 ``` TimeSpan.FromDays(31).Humanize(); TimeSpan.FromDays(28).Humanize(); ``` Both expressions return "4 weeks".
Using .Net EF Core 5.0 introduces multiple errors converting Men to Man. This would be fine with a standalone table named Men but it replaces all occurrences anywhere in a...