Humanizer
Humanizer copied to clipboard
Change TimeOnly.ToClockNotation to accept culture
There are cases where your UI culture is not the culture you want to get the clock notation for. Added the functionality for that. Existing implementations should not be influenced.
For me the problematic part is: I use the DefaultTimeOnlyToClockNotationConverter for english clock notation but my UI culture is 'de-DE'. I get for 08:15 -> 'a quarter past acht' instead of 'a quarter past eight'
Here is a checklist you should tick through before submitting a pull request:
- [x] Implementation is clean
- [x] Code adheres to the existing coding standards; e.g. no curlies for one-line blocks, no redundant empty lines between methods or code blocks, spaces rather than tabs, etc.
- [x] No Code Analysis warnings
- [x] There is proper unit test coverage
- [ ] If the code is copied from StackOverflow (or a blog or OSS) full disclosure is included. That includes required license files and/or file headers explaining where the code came from with proper attribution
- [x] There are very few or no comments (because comments shouldn't be needed if you write clean code)
- [] Xml documentation is added/updated for the addition/change
- [x] Your PR is (re)based on top of the latest commits from the
mainbranch (more info below) - [x] Link to the issue(s) you're fixing from your PR description. Use
fixes #<the issue number> - [ ] Readme is updated if you change an existing feature or add a new one
- [x] Run either
build.cmdorbuild.ps1and ensure there are no test failures