From f028e40df8bb9bf7dc3ccffbeec8d9050b3fef52 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 22 Jan 2024 12:47:22 +0000 Subject: [PATCH] Show trip nights Closes: #119 --- templates/trip_page.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/trip_page.html b/templates/trip_page.html index 715b14a..e7c9ce2 100644 --- a/templates/trip_page.html +++ b/templates/trip_page.html @@ -57,7 +57,10 @@

{{ trip.title }}({{ display_date(trip.start) }})

Countries: {{ trip.countries_str }}
{% if end %} -
Dates: {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }}
+
+ Dates: {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }} + ({{ (end - trip.start).days }} nights) +
{% else %}
Start: {{ display_date_no_year(trip.start) }} (end date missing)
{% endif %}