Fix date range shown for one-day event

This commit is contained in:
Raphael Michel
2019-11-19 16:16:08 +01:00
parent cde87b437a
commit 82d1927fe7

View File

@@ -27,6 +27,8 @@ def daterange(df, dt):
elif df.year == dt.year:
return "{} de {} - {} de {} de {}".format(_date(df, "j"), _date(df, "F"), _date(dt, "j"), _date(dt, "F"), _date(dt, "Y"))
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
return _date(df, "DATE_FORMAT")
return _("{date_from} {date_to}").format(
date_from=_date(df, "DATE_FORMAT"), date_to=_date(dt, "DATE_FORMAT")
)