Module:Person date/doc
This is the documentation page for Module:Person date
| File:Green check.svg | This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
Lua error in Module:Effective_protection_level at line 64: attempt to index field 'TitleBlacklist' (a nil value).
-->
| Warning | This Lua module is used on approximately 1,730,000 pages, or roughly 376906% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
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
{{#invoke:person date|birth}}{{#invoke:person date|death}}
In infoboxes
<syntaxhighlight lang="wikitext"> {{Infobox ... | label# = Born | data# =
| label# = Died | data# = ... }} </syntaxhighlight> Or
<syntaxhighlight lang="wikitext"> {{Infobox ... | label# = Born | data# =
| label# = Died | data# = ... }} </syntaxhighlight>
Areas for improvement
- 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.