Repository navigation
Use Turkish date formats for the tr locale - #1088
Open
emincan2000 wants to merge 1 commit into
Open
emincan2000 wants to merge 1 commit into
emincan2000 wants to merge 1 commit into
Conversation
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The tr locale still uses the English date_formats, which means the localized tokens produce Turkish dates in US order with a 12 hour clock. For 28 August 2016 07:03, L gives 08/28/2016, LL gives Ağustos 28, 2016 and LT gives 7:03 ÖÖ. Turkish dates put the day first and use dots between the numeric parts, while times use a 24 hour clock. These should therefore be 28.08.2016, 28 Ağustos 2016 and 07:03.
The new formats match the ones moment.js uses for tr. Apart from en and en_us, tr was the only locale still using the defaults. This is the same situation #977 fixed for ja.
I added a test_format to the Turkish tests, following the pattern in the other locales. It fails on main and passes with this change. The rest of the test suite produces the same results before and after. I ran the tests without the Rust extension; test_instance_with_aware_datetime_any_tzinfo fails both before and after in that setup.