From 276814ec4796f3408af4d3de2f1a394f9fcb4ad9 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 10 Aug 2015 23:28:33 +0100 Subject: [PATCH] More refactoring --- source/_partials/availability.html.twig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/_partials/availability.html.twig b/source/_partials/availability.html.twig index 946a60cb..39d16889 100644 --- a/source/_partials/availability.html.twig +++ b/source/_partials/availability.html.twig @@ -27,13 +27,15 @@ {% if start %} {% if start|date('U') > now %} {% set text = text ~ ' starting ' ~ start|date('F Y') %} - {% endif %} - {% if end %} - {% set text = text ~ ', until ' ~ end|date('F Y') %} + {% if end %} + {% set text = text ~ ',' %} + {% endif %} {% endif %} - {% elseif end %} - {% set text = text ~ ', until ' ~ end|date('F Y') %} + {% endif %} + + {% if end %} + {% set text = text ~ ' until ' ~ end|date('F Y') %} {% endif %}

{{ text }}.