Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #571
Fixes #642
Fixes #969
Based on
HeadingStyle
(although that's inconsistent withWordForm
).Replace
timeSpan.Humanize(toWords: true)
withtimeSpan.Humanize(timeSpanStyle: TimeSpanStyle.Words)
.This is a breaking change.
timeSpan.Humanize()
remains unchanged, although the optional parameter has changed fromtoWords: false
totimeSpanStyle: TimeSpanStyle.Full
.Added
timeSpan.Humanize(timeSpanStyle: TimeSpanStyle.Abbreviated)
andtimeSpan.Humanize(timeSpanStyle: TimeSpanStyle.Short)
.These return English regardless of the locale.
Question: how do you normally handle translation in this project? I could add tests for every language, where
Abbreviated
andShort
return English for every locale, or not, or I could create translations (and tests) for every language (I could make a best guess for Latin and Cyrillic alphabets, but not the others).Question: should we use uppercase for
Y
,D
,W
? (M
is already uppercase in order to disambiguate with minute)Here is a checklist you should tick through before submitting a pull request:
main
branch (more info below)fixes #<the issue number>
build.cmd
orbuild.ps1
and ensure there are no test failures