Repository navigation
Fix fr-CA culture time formatting and parsing - #56443
Merged
Merged
Conversation
|
Tagging subscribers to this area: @tarekgh, @safern Issue DetailsFixes #54021
The fix here is we are special casing this culture to explicitly setting the time separator to
|
Member
Author
|
@safern could you please have a look? Thanks! |
safern
approved these changes
Jul 28, 2021
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #54021
fr-CAculture is using time format pattern likeHH 'h' mm 'min' ss 's'which is causing 2 problems:has time separator. So, when formatting any DateTime object using this culture we produce wrong formatted time e.g.,10 h 5 h 50 h. note thathis used to separate the hour, minute, and second parts in the formatted string.DateTime.Parse. This is because we cannot recognize the parts like `min' and 's' in the formatted time.The fix here is we are special casing this culture to explicitly setting the time separator to
:which is other French cultures are using. Also, we added some support for this culture in the date/time parser to recognize such formats.