Template:Age: Difference between revisions

The Emma M. Lion Wiki
removed 'b'
Tag: Manual revert
updated age template
Line 1: Line 1:
<noinclude>
<noinclude>
A template to display an person's birthday and age, with an option to account for deaths. The template will show the age from the start of the next (yet-to-be-published) book. Currently this is {{Friendly Date|date=1884-08-01}}.
A template to display an person's age, with an option to account for deaths. The template will show the age from the start of the next (yet-to-be-published) book. Currently this is {{Friendly Date|date=1884-08-01}}.




Line 8: Line 8:
Example with a deathdate:
Example with a deathdate:
{{Age|birthday=1853-07-15|deathdate=1873-10-03}}
{{Age|birthday=1853-07-15|deathdate=1873-10-03}}
</noinclude>
</noinclude><includeonly>{{#if: {{{deathdate|}}}  
{{#if: {{{deathdate|}}}  
| {{#expr: floor(({{#time: U|{{{deathdate}}}}} - {{#time: U|{{{birthday}}}}}) / 31557600) }}
| {{Friendly Date|date={{{birthday}}}}} - {{Friendly Date|date={{{deathdate}}}}} ({{#expr: floor(({{#time: U|{{{deathdate}}}}} - {{#time: U|{{{birthday}}}}}) / 31557600) }})
| {{#expr: floor(({{#time: U|1884-08-01}} - {{#time: U|{{{birthday}}}}}) / 31557600) }}
| {{Friendly Date|date={{{birthday}}}}} ({{#expr: floor(({{#time: U|1884-08-01}} - {{#time: U|{{{birthday}}}}}) / 31557600) }})
}}</includeonly>
}}

Revision as of 17:22, 3 February 2025

A template to display an person's age, with an option to account for deaths. The template will show the age from the start of the next (yet-to-be-published) book. Currently this is August 1, 1884.


Example with no deathdate: 21

Example with a deathdate: 20