Skip to content

Commit

Permalink
Don't display current reign's years if it's zero
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Mar 2, 2023
1 parent 8b1b3d7 commit d423157
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Succession/views/index.tt
Expand Up @@ -29,8 +29,8 @@
<p class="large">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 %>)<br>
Sovereign since <% link_date(app.sovereign.start) %>
(<% years = app.sovereign_duration.years; "<#:${years}> <N:year>" | inflect %>,
<% months = app.sovereign_duration.months; "<#:${months}> <N:month>" | inflect %>)</p>
(<% years = app.sovereign_duration.years; IF years; "<#:${years}> <N:year>" | inflect; ', '; END -%>
<%- months = app.sovereign_duration.months; "<#:${months}> <N:month>" | inflect %>)</p>
</div>
</div>
<% SET prev_dt = app.prev_change_date;
Expand Down

0 comments on commit d423157

Please sign in to comment.