Skip to content

Use Turkish date formats for the tr locale - #1088

Open
emincan2000 wants to merge 1 commit into
python-pendulum:masterfrom
emincan2000:tr-date-formats
Open

emincan2000 wants to merge 1 commit into
python-pendulum:masterfrom
emincan2000:tr-date-formats

Conversation

@emincan2000

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant