Template:Age: Difference between revisions
The Emma M. Lion Wiki
OrangeJedi (talk | contribs)  Created page with "<includeonly>{{#if: {{{deathday|}}} |    {{#expr: {{#time: U|{{{deathday}}}}} - {{#time: U|{{{birthday}}}}} / 31557600 }} years   |    {{#expr: {{#time: U|1884-08-01}}} - {{#time: U|{{{birthday}}}}} / 31557600 }} years }} </includeonly>  {{#if: {{{deathday|}}} |    {{#time: F|{{{birthday}}}}} - {{#time: F|{{{deathday}}}}}    <small> ({{#expr: {{#time: U|{{{deathday}}}}} - {{#time: U|{{{birthday}}}}} / 31557600 }})</small>   |    {{#time: F|{{{birthday}}}}} <small> ({{#ex..."  | 
				OrangeJedi (talk | contribs)  updated template data  | 
				||
| (8 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{#if: {{{  | <includeonly>{{#if: {{{2|}}}    | ||
| {{#expr: floor(({{#time: U|{{{2}}}}} - {{#time: U|{{{1}}}}}) / 31557600) }}  | |||
| {{#expr: floor(({{#time: U|1884-08-01}} - {{#time: U|{{{1}}}}}) / 31557600) }}  | |||
}}</includeonly><noinclude>  | |||
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}}.  | |||
{{  | <templatedata>  | ||
{  | |||
    "description": "",  | |||
    "params": {  | |||
        "1": {  | |||
            "label": "Birthday",  | |||
            "description": "The birthday.",  | |||
            "type": "string",  | |||
            "required": true  | |||
        },  | |||
        "2": {  | |||
            "label": "Date of Death",  | |||
            "description": "The date of death.",  | |||
            "type": "string",  | |||
            "required": false  | |||
        }  | |||
    }  | |||
}  | |||
</templatedata>  | |||
Example with no deathdate:  | |||
{{Age|1863-01-13}}  | |||
Example with a deathdate:  | |||
{{Age|1853-07-15|1873-10-03}}  | |||
</noinclude>  | |||
Latest revision as of 17:28, 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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Birthday | 1 | The birthday.  | String | required | 
| Date of Death | 2 | The date of death.  | String | optional | 
Example with no deathdate: 21
Example with a deathdate: 20