Humanizr / Humanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TimeSpan Humanize ignored toWords: false parameter

BloodShadow174 opened this issue · comments

When executing the code:

var oneDay = TimeSpan.FromDays(1);

oneDay.Humanize(
    culture: CultureInfo.GetCultureInfo("ru"),
    toWords: false
);

Result:
"один день"
Instead of the expected result:
"1 день"

This result is not only in Russian localization, but also in many others!
I think that you still need to take into account the toWords parameter with a single value, most likely you can fix it here:

P.S. Congratulations to everyone on the fact that the library has begun to be updated again 🥰

can you submit a pull request to fix the issue?

can you submit a pull request to fix the issue?

I think I can