forked from CGM_Public/pretix_original
Support for daterange in spanish (#1125)
This commit is contained in:
committed by
Raphael Michel
parent
cf4b2544f2
commit
1edcd47703
@@ -19,6 +19,13 @@ def daterange(df, dt):
|
||||
return "{} – {}".format(_date(df, "N jS"), _date(dt, "jS, Y"))
|
||||
elif df.year == dt.year:
|
||||
return "{} – {}".format(_date(df, "N jS"), _date(dt, "N jS, Y"))
|
||||
elif lng.startswith("es"):
|
||||
if df.year == dt.year and df.month == dt.month and df.day == dt.day:
|
||||
return "{}".format(_date(df, "DATE_FORMAT"))
|
||||
elif df.year == dt.year and df.month == dt.month:
|
||||
return "{} - {} de {} de {}".format(_date(df, "j"), _date(dt, "j"), _date(dt, "F"), _date(dt, "Y"))
|
||||
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"))
|
||||
|
||||
return _("{date_from} – {date_to}").format(
|
||||
date_from=_date(df, "DATE_FORMAT"), date_to=_date(dt, "DATE_FORMAT")
|
||||
|
||||
Reference in New Issue
Block a user