Skip to content
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

TimeSpan Humanize ignored toWords: false parameter #1444

Closed
BloodShadow174 opened this issue Feb 23, 2024 · 2 comments · Fixed by #1445
Closed

TimeSpan Humanize ignored toWords: false parameter #1444

BloodShadow174 opened this issue Feb 23, 2024 · 2 comments · Fixed by #1445

Comments

@BloodShadow174
Copy link
Contributor

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 🥰

@SimonCropp
Copy link
Collaborator

can you submit a pull request to fix the issue?

@BloodShadow174
Copy link
Contributor Author

can you submit a pull request to fix the issue?

I think I can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants