diff --git a/src/pendulum/locales/hi/custom.py b/src/pendulum/locales/hi/custom.py index f8b06ff7..de88da4f 100644 --- a/src/pendulum/locales/hi/custom.py +++ b/src/pendulum/locales/hi/custom.py @@ -13,9 +13,9 @@ "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", + "L": "DD/MM/YYYY", + "LL": "D MMMM YYYY", + "LLL": "D MMMM YYYY h:mm A", + "LLLL": "dddd, D MMMM YYYY h:mm A", }, } diff --git a/tests/localization/test_hi.py b/tests/localization/test_hi.py index 9abcd8b4..cede0e84 100644 --- a/tests/localization/test_hi.py +++ b/tests/localization/test_hi.py @@ -67,3 +67,11 @@ def diff_for_humans(): assert d.diff_for_humans(d2, True, locale=locale) == "कुछ सेकंड" assert d2.diff_for_humans(d.add(seconds=1), True, locale=locale) == "कुछ सेकंड" + + +def test_date_formats(): + d = pendulum.datetime(2016, 8, 29, 7, 3, 6, 123456) + assert d.format("L", locale=locale) == "29/08/2016" + assert d.format("LL", locale=locale) == "29 अगस्त 2016" + assert d.format("LLL", locale=locale) == "29 अगस्त 2016 7:03 AM" + assert d.format("LLLL", locale=locale) == "सोमवार, 29 अगस्त 2016 7:03 AM"