Template:Age: Difference between revisions

The Emma M. Lion Wiki
finished template
changed 'deathday' to 'deathdate'
Line 7: Line 7:


Example with a deathdate:
Example with a deathdate:
{{Age|birthday=1853-07-15|deathday=1873-10-03}}
{{Age|birthday=1853-07-15|deathdate=1873-10-03}}
</noinclude>
</noinclude>
{{#if: {{{deathday|}}}  
{{#if: {{{deathdate|}}}  
| {{Friendly Date|date={{{birthday}}}}} - {{Friendly Date|date={{{deathday}}}}} ({{#expr: floor(({{#time: U|{{{deathday}}}}} - {{#time: U|{{{birthday}}}}}) / 31557600) }})
| {{Friendly Date|date={{{birthday}}}}} - {{Friendly Date|date={{{deathdate}}}}} ({{#expr: floor(({{#time: U|{{{deathdate}}}}} - {{#time: U|{{{birthday}}}}}) / 31557600) }})
| {{Friendly Date|date={{{birthday}}}}} ({{#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) }})
}}
}}

Revision as of 02:22, 28 December 2024

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 August 1, 1884.


Example with no deathdate:

January 13, 1863 (21)

Example with a deathdate:

July 15, 1853 - October 3, 1873 (20)

Error: Invalid time. Error: Invalid time., Error: Invalid time. (Expression error: Unexpected < operator.)