Template:Death date and age: Difference between revisions

From LPedia
Jump to navigation Jump to search
(Created page with "<includeonly>{{#if:{{{df|}}}|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},}} {{{1}}}<span style="display:none">(<span class="dday deathdate"...")
 
No edit summary
Line 18: Line 18:
}}{{#if:{{{6|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 ) OR ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
}}{{#if:{{{6|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 ) OR ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
  | &#32;{{error|invalid day}}{{main other|[[Category:Pages using age template with invalid date]]}}|}}
  | &#32;{{error|invalid day}}{{main other|[[Category:Pages using age template with invalid date]]}}|}}
}}</includeonly><noinclude>
}} [[Category:{{{1}}} Deaths]] [[Category:{{{4}}} Births]]</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 00:16, 11 October 2017

Template documentation (for the above template, sometimes hidden or invisible)

Usage

Use in the "death-date" parameter of Template:Infobox Person on people pages to calculate age of death.

{{Death date and age|<DEATH-Y>|<DEATH-M>|<DEATH-D|<BIRTH-Y>|<BIRTH-M>|<BIRTH-D>}}

Example

Example, with Murray Rothbard, where the death date is January 7, 1995 and the birth date is March 2, 1926.

Code

{{Death date and age|1995|1|7|1926|3|2}}

Result

January 7, 1995(1995-01-07) (aged 68)

See also