From d42315731e6b99b75fc10fcee043c43863af52d5 Mon Sep 17 00:00:00 2001 From: Dave Cross Date: Thu, 2 Mar 2023 10:32:32 +0000 Subject: [PATCH] Don't display current reign's years if it's zero --- Succession/views/index.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Succession/views/index.tt b/Succession/views/index.tt index 5f18162..68197bc 100644 --- a/Succession/views/index.tt +++ b/Succession/views/index.tt @@ -29,8 +29,8 @@

Age <% app.sovereign.person.age_on_date(app.date) %> (born <% link_date(app.sovereign.person.born) %><% IF app.sovereign.person.died %>, will die on <% link_date(app.sovereign.person.died); END %>)
Sovereign since <% link_date(app.sovereign.start) %> - (<% years = app.sovereign_duration.years; "<#:${years}> " | inflect %>, - <% months = app.sovereign_duration.months; "<#:${months}> " | inflect %>)

+ (<% years = app.sovereign_duration.years; IF years; "<#:${years}> " | inflect; ', '; END -%> + <%- months = app.sovereign_duration.months; "<#:${months}> " | inflect %>)

<% SET prev_dt = app.prev_change_date;