Show days until holiday on holidays page
This commit is contained in:
parent
e16e04ab51
commit
cd60ebdea2
|
@ -10,8 +10,9 @@
|
|||
<tr>
|
||||
{% if loop.first or item.date != loop.previtem.date %}
|
||||
<td class="text-end">{{ display_date(item.date) }}</td>
|
||||
<td>in {{ (item.date - today).days }} days</td>
|
||||
{% else %}
|
||||
<td></td>
|
||||
<td colspan="2"></td>
|
||||
{% endif %}
|
||||
<td>{{ country.flag }} {{ country.name }}</td>
|
||||
<td>{{ item.display_name }}</td>
|
||||
|
|
|
@ -293,7 +293,7 @@ def holiday_list() -> str:
|
|||
items.sort(key=lambda item: (item.date, item.country))
|
||||
|
||||
return flask.render_template(
|
||||
"holiday_list.html", items=items, get_country=agenda.get_country
|
||||
"holiday_list.html", items=items, get_country=agenda.get_country, today=today
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue