-
Notifications
You must be signed in to change notification settings - Fork 966
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TimeSpan.ToAge() extension method + tests
- Introduce the `"TimeSpanHumanize_Age"` resource, indicating how to format a TimeSpan to an age expression. - Add `Resources.TryGetResource` method, which attempts to retrieve a resource for a given culture but without falling back on the default culture. This will allow to define the resource for en-US (aka the default culture), but not have other cultures for which the resource is undefined fall back on the default culture. - Add `DefaultFormatter.TimeSpanHumanize_Age()`, which resorts to `Resources.TryGetResource()` to determine how to express a TimeSpan as age. If no resource found, simply output the standard humanized TimeSpan as is. (This means that for certain cultures where standard TimeSpan and age expression differ, such as germanic languages, TimeSpanHumanize_Age resources will eventually need to be added.) - Add tests for both English & 1 non-English (i.e. French) cultures
- Loading branch information
Showing
9 changed files
with
29 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters