Show trip nights

Closes: #119
This commit is contained in:
Edward Betts 2024-01-22 12:47:22 +00:00
parent b4a79cae69
commit f028e40df8

View file

@ -57,7 +57,10 @@
<h1>{{ trip.title }}<small class="text-muted">({{ display_date(trip.start) }})</small></h1> <h1>{{ trip.title }}<small class="text-muted">({{ display_date(trip.start) }})</small></h1>
<div>Countries: {{ trip.countries_str }}</div> <div>Countries: {{ trip.countries_str }}</div>
{% if end %} {% if end %}
<div>Dates: {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }}</div> <div>
Dates: {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }}
({{ (end - trip.start).days }} nights)
</div>
{% else %} {% else %}
<div>Start: {{ display_date_no_year(trip.start) }} (end date missing)</div> <div>Start: {{ display_date_no_year(trip.start) }} (end date missing)</div>
{% endif %} {% endif %}