Template:Infobox person/birth
Appearance
This template uses Lua: |
This template is used on approximately 636,000 pages, or roughly 145872% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This template 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. |
Works alongside {{Infobox person/death}}.
Usage[edit]
{{Infobox
...
| label# = Born
| data# = {{#if: {{{birth_date|}}} | {{Infobox person/birth|{{{birth_date|}}}|{{{death_date|}}} }} }}
...
}}
Or
{{Infobox
...
| label# = Born
| data# = {{br separated entries
|1={{#if:{{{birth_name|}}}|<div 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>}}
}}
...
}}
Test cases[edit]
birth_date only (death_date is nil)[edit]
These test cases are for living people with no {{{death_date}}}
set
- Year only
{{Infobox person/birth|FOO}}
→ FOO{{Infobox person/birth|1990}}
→ 1990 (age 34–35){{Infobox person/birth| 1990}}
→ 1990 (age 34–35){{Infobox person/birth|1990|}}
→ 1990 (age 34–35)
- Month and year only
{{Infobox person/birth|Month 1902}}
→ Month 1902{{Infobox person/birth|Jan 1983}}
→ January 1983 (age 42){{Infobox person/birth|
→ October 1983 (age 41–42){{currentmonth}}
1983}}{{Infobox person/birth|October 1965}}
→ October 1965 (age 59–60)
- Full birth date set
{{Infobox person/birth|MONTH 7, 1993}}
→ MONTH 7, 1993{{Infobox person/birth|Nov 7, 1993}}
→ November 7, 1993{{Infobox person/birth|Nov 7, 1993|}}
→ November 7, 1993{{Infobox person/birth|November 7, 1993}}
→ November 7, 1993{{Infobox person/birth|7 Nov 1993}}
→ 7 November 1993{{Infobox person/birth|7 November 1993}}
→ 7 November 1993{{Infobox person/birth|Apr 25, 1993}}
→ April 25, 1993{{Infobox person/birth|Apr 25, 1993|}}
→ April 25, 1993{{Infobox person/birth|April 25, 1993}}
→ April 25, 1993{{Infobox person/birth|25 Apr 1993}}
→ 25 April 1993{{Infobox person/birth|25 April 1993}}
→ 25 April 1993
- Deal with references or extra text
{{Infobox person/birth|12 Mar 1986 (best known)}}
→ 12 Mar 1986 (best known){{Infobox person/birth|1986 (circa)}}
→ 1986 (circa){{Infobox person/birth|June 1975<ref>some citation</ref>}}
→ June 1975[1]{{Infobox person/birth|18 Dec 1975<ref>citation goes here</ref>}}
→ 18 Dec 1975[2]
- Example references
- Already using one of the {{birth date}} templates. Note that in these cases the code does NOT parse, it simply returns the original values passed in.
{{Infobox person/birth|
→ 1993{{birth year|1993}}
}}{{Infobox person/birth|
→ 25 April 1993{{birth-date|25 April 1993}}
}}{{Infobox person/birth|
→ April 11, 1990{{bda|1990|4|11}}
}}
birth_date and death_date are set[edit]
These test cases are for living people with no {{{death_date}}}
set
- Year only
{{Infobox person/birth|1990|2020}}
→ 1990{{Infobox person/birth| 1990| 2020}}
→ 1990
- Month and year only
{{Infobox person/birth|Jan 1983|2012}}
→ Jan 1983{{Infobox person/birth|October 1965|Nov 2015}}
→ October 1965
- Full dates set
{{Infobox person/birth|Nov 7, 1993|Nov 25, 2014}}
→ November 7, 1993{{Infobox person/birth|November 7, 1993|December 12, 2014}}
→ November 7, 1993{{Infobox person/birth|7 Nov 1993|8 Apr 1995}}
→ 7 November 1993{{Infobox person/birth|7 November 1993|8 April 1995}}
→ 7 November 1993
- Deal with references or extra text
{{Infobox person/birth|12 Mar 1986 (best known)|12 Apr 2020 (covid)}}
→ 12 Mar 1986 (best known){{Infobox person/birth|456 (circa)|510 (approx)}}
→ 1986 (circa){{Infobox person/birth|June 1975<ref>some citation</ref>|December 1995<ref>some death citation</ref>}}
→ June 1975[1]
- Example references
- ↑ some citation
- Already using one of the {{birth date}} templates. Note that in these cases the code does NOT parse, it simply returns the original values passed in.
{{Infobox person/birth|
→ 1993{{birth year|1993}}
|{{death year|2005}}
}}{{Infobox person/birth|
→ 25 April 1993{{birth-date|25 April 1993}}
|{{death-date|2 May 2007}}
}}{{Infobox person/birth|
→ April 11, 1990{{bda|1990|4|11}}
|{{dda|2006|5|3|1990|4|11}}
}}