diff --git a/src/pendulum/locales/tr/custom.py b/src/pendulum/locales/tr/custom.py index b7fd3c7ac..bc96e19da 100644 --- a/src/pendulum/locales/tr/custom.py +++ b/src/pendulum/locales/tr/custom.py @@ -14,11 +14,11 @@ "ordinal": {"one": ".", "two": ".", "few": ".", "other": "."}, # Date formats "date_formats": { - "LTS": "h:mm:ss A", - "LT": "h:mm A", - "L": "MM/DD/YYYY", - "LL": "MMMM D, YYYY", - "LLL": "MMMM D, YYYY h:mm A", - "LLLL": "dddd, MMMM D, YYYY h:mm A", + "LTS": "HH:mm:ss", + "LT": "HH:mm", + "L": "DD.MM.YYYY", + "LL": "D MMMM YYYY", + "LLL": "D MMMM YYYY HH:mm", + "LLLL": "dddd, D MMMM YYYY HH:mm", }, } diff --git a/tests/localization/test_tr.py b/tests/localization/test_tr.py index 5ec00eeff..6081386c6 100644 --- a/tests/localization/test_tr.py +++ b/tests/localization/test_tr.py @@ -64,3 +64,18 @@ def diff_for_humans(): assert d.diff_for_humans(d2, True, locale=locale) == "1 saniye" assert d2.diff_for_humans(d.add(seconds=1), True, locale=locale) == "2 saniye" + + +def test_format(): + d = pendulum.datetime(2016, 8, 28, 7, 3, 6, 123456) + assert d.format("dddd", locale=locale) == "Pazar" + assert d.format("ddd", locale=locale) == "Paz" + assert d.format("MMMM", locale=locale) == "Ağustos" + assert d.format("MMM", locale=locale) == "Ağu" + assert d.format("Do", locale=locale) == "28." + assert d.format("LT", locale=locale) == "07:03" + assert d.format("LTS", locale=locale) == "07:03:06" + assert d.format("L", locale=locale) == "28.08.2016" + assert d.format("LL", locale=locale) == "28 Ağustos 2016" + assert d.format("LLL", locale=locale) == "28 Ağustos 2016 07:03" + assert d.format("LLLL", locale=locale) == "Pazar, 28 Ağustos 2016 07:03"