Stop using ordinal numbers in English date represenation (Z#23210534) (#5539)

* Stop using ordinal numbers in English date represenation (Z#23210534)

* ADjust more tests
This commit is contained in:
Raphael Michel
2025-10-15 09:06:54 +02:00
committed by GitHub
parent 40357681df
commit 6190b93f89
10 changed files with 78 additions and 78 deletions

View File

@@ -76,11 +76,11 @@ def daterange(df, dt, as_html=False):
return format_html(base_format, _date(df, "j F"), until, _date(dt, "j F Y"))
elif lng.startswith("en"):
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
return format_html(base_format, _date(df, "D, N jS, Y"))
return format_html(base_format, _date(df, "D, N j, Y"))
elif df.year == dt.year and df.month == dt.month:
return format_html(base_format, _date(df, "N jS"), until, _date(dt, "jS, Y"))
return format_html(base_format, _date(df, "N j"), until, _date(dt, "j, Y"))
elif df.year == dt.year:
return format_html(base_format, _date(df, "N jS"), until, _date(dt, "N jS, Y"))
return format_html(base_format, _date(df, "N j"), until, _date(dt, "N j, Y"))
elif lng.startswith("es"):
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
return format_html(base_format, _date(df, "DATE_FORMAT"))