Jump to content

Module:Person date/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Zackmann08 (talk | contribs) at 05:08, 1 October 2025 (Areas for improvement). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This module is intended to aid in calculating/formatting birth dates and death dates in {{Infobox person}}. It is implemented by {{Infobox person/birth}} & {{Infobox person/death}}.

Usage

  • {{#invoke:person date|birth|birth_date|death_date}}
  • {{#invoke:person date|death|birth_date|death_date}}

In infoboxes

{{Infobox
...
| label# = Born
| data#  = {{#if: {{{birth_date|}}} | {{Infobox person/birth|{{{birth_date|}}}|{{{death_date|}}} }} }}

| label# = Died
| data#  = {{#if: {{{death_date|}}} | {{Infobox person/death|{{{birth_date|}}}|{{{death_date|}}} }} }}
...
}}

Or

{{Infobox
...
| label#    = Born
| data#     = {{br separated entries
   |1={{#if:{{{birth_name|}}}|<div style="display:inline" class="nickname">{{{birth_name|}}}</div>}}
   |2={{#if:{{{birth_date|}}} | {{Infobox person/birth|{{{birth_date|}}}|{{{death_date|}}} }} }}
   |3={{#if:{{{birth_place|}}}|<div class="birthplace">{{{birth_place|}}}</div>}}
}}

| label#    = Died
| data#     = {{br separated entries
  |1={{#if:{{{death_date|}}} | {{Infobox person/death|{{{birth_date|}}}|{{{death_date}}} }} }}
  |2={{#if:{{{death_place|}}}|<div class="deathplace">{{{death_place|}}}</div>}}
}}
...
}}

Areas for improvement

  1. 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.
  2. The module does not handle dates with ordinals such as th (i.e. November 25th, 1990) or st (i.e. December 21st, 2010).
  3. If |birth_date={{bda|1993|11|7}} (for example) then |death_date= will not be parsed. It will just be returned as the original string. Thus no age is calculated.
    • Example: {{person date/death|{{bda|1993|11|7}}|12 December 2020}} → 12 December 2020

Tracking categories