Module:Person date/doc
Appearance
This is the documentation page for Module:Person date
This module is intended to aid in calculating/formatting birth dates and death dates in {{Infobox person}} and other People and person infobox templates.
This module generates errors when it encounters invalid input. Error descriptions and how to fix them are listed at Category:Pages using age template with invalid date.
Usage
[change source]{{#invoke:person date|birth}}{{#invoke:person date|death}}
In infoboxes
[change source]{{Infobox
...
| label# = Born
| data# = {{#invoke:person date|birth}}
| label# = Died
| data# = {{#invoke:person date|death}}
...
}}
Or
{{Infobox
...
| label# = Born
| data# = {{br separated entries
|1={{#if:{{{birth_name|}}}|<div style="display:inline" class="nickname">{{{birth_name|}}}</div>}}
|2={{#invoke:person date|birth}}
|3={{#if:{{{birth_place|}}}|<div class="birthplace">{{{birth_place|}}}</div>}}
}}
| label# = Died
| data# = {{br separated entries
|1={{#invoke:person date|death}}
|2={{#if:{{{death_place|}}}|<div class="deathplace">{{{death_place|}}}</div>}}
}}
...
}}
Areas for improvement
[change source]- Currently the module does not handle anything that is not a simple date. So anything with a reference tag is not evaluated by the code.
- If
|birth_date=(for example) then{{bda|1993|11|7}}|death_date=will not be parsed. It will just be returned as the original string. Thus no age is calculated.