Add now_date

This commit is contained in:
Raphael Michel
2019-01-09 12:29:37 +01:00
parent f15a6d39c3
commit 664957e886

View File

@@ -193,6 +193,14 @@ DEFAULT_VARIABLES = OrderedDict((
"editor_sample": _("Event organizer info text"),
"evaluate": lambda op, order, ev: str(order.event.settings.organizer_info_text)
}),
("now_date", {
"label": _("Printing date"),
"editor_sample": _("2017-05-31"),
"evaluate": lambda op, order, ev: date_format(
now().astimezone(timezone(ev.settings.timezone)),
"SHORT_DATE_FORMAT"
)
}),
("now_datetime", {
"label": _("Printing date and time"),
"editor_sample": _("2017-05-31 19:00"),