Template:Death date and age: Difference between revisions
Template page
More actions
Created page with "<includeonly><!-- Template:Death date and age --> {{#switch: {{#if:{{{6|}}}|6|{{#if:{{{3|}}}|3|0}}}}}} | 6 = {{MONTHNAME|{{{2}}}}} {{{3}}}, {{{1}}}<span class="noprint"> (aged {{#expr:{{{1}}} - {{{4}}} - ( ({{{2}}} < {{{5}}}) or ({{{2}}} = {{{5}}} and {{{3}}} < {{{6}}}) ) }})</span> | 3 = {{MONTHNAME|{{{2}}}}} {{{3}}}, {{{1}}} | 0 = }}</includeonly><noinclude> {{clear}} == Usage == This template formats a death date and calculates the person's age at the time of de..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><!-- Template:Death date and age --> | <includeonly><!-- Template:Death date and age --> | ||
{{#switch: {{#if:{{{6|}}}|6|{{#if:{{{3|}}}|3|0 | {{#switch: {{#if:{{{6|}}}|6|{{#if:{{{3|}}}|3|0}}}} | ||
| 6 = {{MONTHNAME|{{{2}}}}} {{{3}}}, {{{1}}}<span class="noprint"> (aged {{#expr:{{{1}}} - {{{4}}} - ( ({{{2}}} < {{{5}}}) or ({{{2}}} = {{{5}}} and {{{3}}} < {{{6}}}) ) }})</span> | | 6 = {{MONTHNAME|{{{2}}}}} {{{3}}}, {{{1}}}<span class="noprint"> (aged {{#expr:{{{1}}} - {{{4}}} - ( ({{{2}}} < {{{5}}}) or ({{{2}}} = {{{5}}} and {{{3}}} < {{{6}}}) ) }})</span> | ||
| 3 = {{MONTHNAME|{{{2}}}}} {{{3}}}, {{{1}}} | | 3 = {{MONTHNAME|{{{2}}}}} {{{3}}}, {{{1}}} | ||
Latest revision as of 22:12, 12 July 2025
Usage edit source
This template formats a death date and calculates the person's age at the time of death. It requires both the death date and birth date.
{{Death date and age|Death YYYY|Death MM|Death DD|Birth YYYY|Birth MM|Birth DD}}
- Example:
{{Death date and age|2014|05|12|1940|05|05}}will display "May 12, 2014 (aged 74)".