Jump to content

Template:Lifespan: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
m: -superfluous
 
(27 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<!--Begin {{lifespan}}--><includeonly>{{#switch: {{{brackets|{{{bkt}}}}}}|age|nb=|full|#default=(&#8288;}}{{#if: {{{birth|{{{b|}}}}}}|{{#if: {{{death|{{{d|}}}}}}|{{#if: {{{err|}}}|{{#ifeq: {{{err}}}|y|{{#if: {{{prefix|{{{pfx|}}}}}}|{{#ifeq: {{{prefix|{{{pfx}}}}}}|y||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">prefix/pfx</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#prefix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{ca|}}}|{{#switch: {{{ca}}}|born|died|both=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">ca</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#ca|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|died|both=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">or</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#or|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{suffix|{{{sfx|}}}}}}|{{#switch: {{{suffix|{{{sfx}}}}}}|ad|b-a|b-c|ce|bc|bce=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">suffix/sfx</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{age-label|{{{al|}}}}}}|{{#if: {{{age-range|{{{ar|}}}}}}||{{#if: {{{age-yrs|{{{ay|}}}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">age-label/al</span>&#32;</strong>&#32;requires parameter&#32;<strong><span style="color:green">age-range/ar</span></strong> or parameter <strong><span style="color:green">age-year/ay</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#age-label|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#switch: {{{age-label|{{{al}}}}}}|nl|nolabel|aged|dur|duration=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">age-label/al</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#age-label|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{age-range|{{{ar|}}}}}}|{{#ifeq: {{{age-range|{{{ar}}}}}}|y||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">age-range/ar</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#age-range|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{age-yrs|{{{ay|}}}}}}|{{#if: {{{or|}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">age-yrs/ay</span>&#32;</strong>&#32;cannot be used with parameter&#32;<strong><span style="color:green">or</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#age-yrs|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}{{#if: {{{age-range|{{{ar|}}}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">age-yrs/ay</span>&#32;</strong>&#32;and&#32;<strong><span style="color:green">age-range/ar</span></strong>&#32;are mutually exclusive&#32;&#91;&#8288;[[Template:Lifespan#age-yrs|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}{{#switch: {{{age-yrs|{{{ay}}}}}}|abd|bbd=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">age-yrs/ay</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#age-yrs|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{label|{{{l|}}}}}}|{{#switch: {{{label|{{{l}}}}}}|lc|uc=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">label/l</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#label|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">err</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#err|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{label|{{{l|}}}}}}|{{#if: {{{prefix|{{{pfx|}}}}}}|{{#ifeq: {{{err}}}|y|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">label/l</span>&#32;</strong>&#32;cannot be used with parameter&#32;<strong><span style="color:green">prefix/pfx</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#label|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}|{{#switch: {{{label|{{{l|}}}}}}|lc=lifespan:&#160;|uc=Lifespan:&#160;}}}}}}{{#ifeq: {{{prefix|{{{pfx}}}}}}|y|{{abbr|b.|born}}&#8201;}}{{#switch: {{{ca}}}
<!--Begin {{lifespan}}--><includeonly>{{#switch: {{{brackets|{{{bkt}}}}}}|age|nb=|full|#default=(&#8288;}}{{#if: {{{birth|{{{b|}}}}}}|{{#if: {{{death|{{{d|}}}}}}|{{#if: {{{err|}}}|{{#ifeq: {{{err}}}|y|{{#if: {{{prefix|{{{pfx|}}}}}}|{{#switch: {{{prefix|{{{pfx}}}}}}|y|tt|nt=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">prefix/pfx</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#prefix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{ca|}}}|{{#switch: {{{ca}}}|born|died|both=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">ca</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#ca|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">ca</span></strong>&#32;requires numerical birth/death year-value&#32;&#91;&#8288;[[Template:Lifespan#ca|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}}}{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|died|both=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">or</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#or|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{suffix|{{{sfx|}}}}}}|{{#switch: {{{suffix|{{{sfx}}}}}}|ad|b-a|b-c|ce|bc|bce=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">suffix/sfx</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}{{#switch: {{{suffix|{{{sfx}}}}}}
|b-c={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}=0|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}=0|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}
|ad|bc|bce|b-a={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}=0|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}=0|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}=0|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}=0|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}
}}|{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}=0|&#32;<span><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) without explicit suffix option <strong><span style="color:green">ce</span></strong> ("[[Common Era|CE]]" implied)&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}=0|&#32;<span><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) without explicit suffix option <strong><span style="color:green">ce</span></strong> ("[[Common Era|CE]]" implied)&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}=0|&#32;<span><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">suffix/sfx:</span></strong>&#32;Year 0 (zero) without explicit suffix option <strong><span style="color:green">ce</span></strong> ("[[Common Era|CE]]" implied)&#32;&#91;&#8288;[[Template:Lifespan#suffix|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}}}{{#if: {{{age-label|{{{al|}}}}}}|{{#if: {{{age-range|{{{ar|}}}}}}||{{#if: {{{age-yrs|{{{ay|}}}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">age-label/al</span></strong>&#32;requires parameter&#32;<strong><span style="color:green">age-range/ar</span></strong> or parameter <strong><span style="color:green">age-year/ay</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#age-label|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#switch: {{{age-label|{{{al}}}}}}|nl|nolabel|aged|dur|duration=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">age-label/al</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#age-label|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{age-range|{{{ar|}}}}}}|{{#ifeq: {{{age-range|{{{ar}}}}}}|y|{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">age-range/ar</span></strong>&#32;requires numerical birth/death year-value&#32;&#91;&#8288;[[Template:Lifespan#Age component|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">age-range/ar</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#age-range|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{age-yrs|{{{ay|}}}}}}|{{#if: {{{or|}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">age-yrs/ay</span></strong>&#32;cannot be used with parameter&#32;<strong><span style="color:green">or</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#age-yrs|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}{{#if: {{{age-range|{{{ar|}}}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">age-yrs/ay</span></strong>&#32;and&#32;<strong><span style="color:green">age-range/ar</span></strong>&#32;are mutually exclusive&#32;&#91;&#8288;[[Template:Lifespan#age-yrs|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">age-yrs/ay</span></strong>&#32;requires numerical birth/death year-value&#32;&#91;&#8288;[[Template:Lifespan#Age component|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#switch: {{{age-yrs|{{{ay}}}}}}|abd|bbd=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">age-yrs/ay</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#age-yrs|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{label|{{{l|}}}}}}|{{#switch: {{{label|{{{l}}}}}}|lc|uc=|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">label/l</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#label|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter&#32;<strong><span style="color:green">err</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#err|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}}}{{#if: {{{label|{{{l|}}}}}}|{{#if: {{{prefix|{{{pfx|}}}}}}|{{#ifeq: {{{err}}}|y|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">label/l</span></strong>&#32;cannot be used with parameter&#32;<strong><span style="color:green">prefix/pfx</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#label|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;}}|{{#switch: {{{label|{{{l|}}}}}}|lc=lifespan:&#160;|uc=Lifespan:&#160;}}}}}}{{#switch: {{{prefix|{{{pfx}}}}}}|y|tt={{abbr|b.|born}}&#8201;|nt=b.&#8201;}}{{#switch: {{{ca}}}
|born|both={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{circa}}&#8201;}}}}{{#switch: {{{birth|{{{b}}}}}}
|born|both={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{circa}}&#8201;}}}}{{#switch: {{{birth|{{{b}}}}}}
|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}
|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}
Line 7: Line 10:
|b-a=&#8201;BC
|b-a=&#8201;BC
|b-c=&#8201;BCE
|b-c=&#8201;BCE
}}{{#ifeq: {{{prefix|{{{pfx}}}}}}|y|&#160;&#8211;&#32;|{{#if: {{{ca|}}}|&#160;&#8211;&#32;|{{#if: {{{or|}}}|&#160;&#8211;&#32;|{{#ifeq: {{{birth|{{{b}}}}}}|uncertain|&#160;&#8211;&#32;|{{#ifeq: {{{birth|{{{b}}}}}}|unknown|&#160;&#8211;&#32;|{{#ifeq: {{{death|{{{d}}}}}}|uncertain|&#160;&#8211;&#32;|{{#ifeq: {{{death|{{{d}}}}}}|unknown|&#160;&#8211;&#32;|{{#if: {{{suffix|{{{sfx|}}}}}}|{{#switch: {{{suffix|{{{sfx}}}}}}|b-a|b-c=&#160;&#8211;&#32;|#default=&#8211;}}|&#8211;}}}}}}}}}}}}}}}}{{#ifeq: {{{prefix|{{{pfx}}}}}}|y|{{abbr|d.|died}}&#8201;}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#switch: {{{ca}}}|died={{circa}}&#8201;|both={{circa|lk=no}}&#8201;}}}}{{#switch: {{{death|{{{d}}}}}}
}}{{#if: {{{prefix|{{{pfx|}}}}}}|&#160;&#8211;&#32;|{{#if: {{{ca|}}}|&#160;&#8211;&#32;|{{#if: {{{or|}}}|&#160;&#8211;&#32;|{{#ifeq: {{{birth|{{{b}}}}}}|uncertain|&#160;&#8211;&#32;|{{#ifeq: {{{birth|{{{b}}}}}}|unknown|&#160;&#8211;&#32;|{{#ifeq: {{{death|{{{d}}}}}}|uncertain|&#160;&#8211;&#32;|{{#ifeq: {{{death|{{{d}}}}}}|unknown|&#160;&#8211;&#32;|{{#if: {{{suffix|{{{sfx|}}}}}}|{{#switch: {{{suffix|{{{sfx}}}}}}|b-a|b-c=&#160;&#8211;&#32;|#default=&#8211;}}|&#8211;}}}}}}}}}}}}}}}}{{#switch: {{{prefix|{{{pfx}}}}}}|y|tt={{abbr|d.|died}}&#8201;|nt=d.&#8201;}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#switch: {{{ca}}}|died={{circa}}&#8201;|both={{circa|lk=no}}&#8201;}}}}{{#switch: {{{death|{{{d}}}}}}
|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}
|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}
|unknown
|unknown
Line 21: Line 24:
|ad
|ad
|ce={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}} and {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{death2|{{{d2|}}}}}}|4|0}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, death/d, death2/d2:&#32;</span></strong>Birth-year must be earlier than or equal to death-year(s)&#32;&#91;&#8288;[[Template:Lifespan#birth|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#if: {{{birth2|{{{b2|}}}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}<={{YEAR|{{padleft:{{{death2|{{{d2|}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth2/b2, death2/d2:&#32;</span></strong>Alternative birth-year must be earlier than or equal to alternative death-year&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, birth2/b2:&#32;</span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">death/d, death2/d2:&#32;</span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#death2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}
|ce={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}} and {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{death2|{{{d2|}}}}}}|4|0}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, death/d, death2/d2:&#32;</span></strong>Birth-year must be earlier than or equal to death-year(s)&#32;&#91;&#8288;[[Template:Lifespan#birth|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#if: {{{birth2|{{{b2|}}}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}<={{YEAR|{{padleft:{{{death2|{{{d2|}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth2/b2, death2/d2:&#32;</span></strong>Alternative birth-year must be earlier than or equal to alternative death-year&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, birth2/b2:&#32;</span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">death/d, death2/d2:&#32;</span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#death2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}
|b-a
|b-c={{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}<{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, birth2/b2:&#32;</span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}>{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">death/d, death2/d2:&#32;</span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#death2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}
|bc
|bc
|bce={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}>={{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}} and {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}>={{YEAR|{{padleft:{{{death2|{{{d2|}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, death/d, death2/d2:&#32;</span></strong>Birth-year must be earlier than or equal to death-year(s)&#32;&#91;&#8288;[[Template:Lifespan#birth|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#if: {{{birth2|{{{b2|}}}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}>={{YEAR|{{padleft:{{{death2|{{{d2|}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth2/b2, death2/d2:&#32;</span></strong>Alternative birth-year must be earlier than or equal to alternative death-year&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}<{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, birth2/b2:&#32;</span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}<{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">death/d, death2/d2:&#32;</span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#death2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}
|bce={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}>={{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}} and {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}>={{YEAR|{{padleft:{{{death2|{{{d2|}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, death/d, death2/d2:&#32;</span></strong>Birth-year must be earlier than or equal to death-year(s)&#32;&#91;&#8288;[[Template:Lifespan#birth|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#if: {{{birth2|{{{b2|}}}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}>={{YEAR|{{padleft:{{{death2|{{{d2|}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth2/b2, death2/d2:&#32;</span></strong>Alternative birth-year must be earlier than or equal to alternative death-year&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}<{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">birth/b, birth2/b2:&#32;</span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}<{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}||&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameters <strong><span style="color:green">death/d, death2/d2:&#32;</span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#death2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}
}}}}{{#if: {{{age-range|{{{ar|}}}}}}|{{#ifeq: {{{brackets|{{{bkt}}}}}}|age|&#32;(&#8288;|,&#32;}}{{#switch: {{{age-label|{{{al}}}}}}
}}}}{{#iferror: {{#if: {{{age-range|{{{ar|}}}}}}|{{#ifeq: {{{brackets|{{{bkt}}}}}}|age|&#32;(&#8288;|,&#32;}}{{#switch: {{{age-label|{{{al}}}}}}
|nl
|nl
|nolabel=
|nolabel=
Line 73: Line 78:
|b-c={{age|-{{{birth|{{{b}}}}}}|2|2|{{{death|{{{d}}}}}}|1|1}}
|b-c={{age|-{{{birth|{{{b}}}}}}|2|2|{{{death|{{{d}}}}}}|1|1}}
|#default={{age|{{{birth|{{{b}}}}}}|2|2|{{{death|{{{d}}}}}}|1|1}}
|#default={{age|{{{birth|{{{b}}}}}}|2|2|{{{death|{{{d}}}}}}|1|1}}
}}}}&#160;years}}}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">death/d</span></strong>&#32;is missing, mislabeled, or empty&#32;&#91;&#8288;[[Template:Lifespan#death|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">birth/b</span></strong>&#32;is missing, mislabeled, or empty&#32;&#91;&#8288;[[Template:Lifespan#birth|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}{{#ifeq: {{{brackets|{{{bkt}}}}}}|nb||&#8288;)}}</includeonly><!--End {{lifespan}}--><noinclude>
}}}}&#160;years}}}}}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">death/d</span></strong>&#32;is missing, mislabeled, or empty&#32;&#91;&#8288;[[Template:Lifespan#death|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">birth/b</span></strong>&#32;is missing, mislabeled, or empty&#32;&#91;&#8288;[[Template:Lifespan#birth|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}{{#ifeq: {{{brackets|{{{bkt}}}}}}|nb||&#8288;)}}</includeonly><!--End {{lifespan}}--><noinclude>
{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |err=y}}
{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |err=y}}<noinclude>
{{documentation}}

<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
{{documentation<!--Includes elements of {{csdoc}} (Citation Style 1 documentation) adapted for this template.-->
</noinclude>
|content={{ombox|type=notice|small=y|textstyle=text-align: center; color: green; font-weight: bold; font-style: italic;|text=This documentation is a work-in-progress.}}
This template may be used to display a person's or entity's whole lifespan in years, and optionally their final age or duration, also in years. It is primarily intended for known, definite lifespans, but can also handle limited cases of approximate or ambiguous date spans, and the corresponding age range(s). All information must be provided by acceptable sources. Additional options affect presentation, and error messaging is available for several usage errors.{{br}}

Presentation follows Wikipedia's [[WP:MOS|Manual of Style]], specifically [[MOS:YEAR]] and [[MOS:YEARRANGE]] (for date spans) and [[MOS:ERA]] (for the age component), with minor exceptions for programming simplicity and ease-of-use. The implied default calendar is the [[Gregorian calendar]]; although the template may be adapted to other calendars, such use is not supported programmatically. See [[MOS:OSNS]] for special cases where the default calendar (and hence this template) may or may not be adaptable or appropriate.

==Usage==

{{csdoc|usage full}}
<strong>Listed by importance</strong>{{br}}
<code><nowiki>{{lifespan |birth= |death= |suffix= |or= |birth2= |death2= |ca= |prefix= |age-yrs= |age-range= |age-label= |label= |brackets= |err= }}</nowiki></code>
{{br|2}}
<strong>Listed by display order</strong>{{br}}
<code><nowiki>{{lifespan |err= |brackets= |label= |prefix= |ca= |birth= |suffix= |death= |or= |birth2= |death2= |age-label= |age-range= |age-yrs= }}</nowiki></code>
{{br|2}}
{{em|See {{slink||TemplateData}} for a usage summary.}}
{{end}}

===Syntax and presentation===

For basic use, only the birth- and death-years (via parameters {{para|birth}} and {{para|death}}) are required; the years must be entered fully, with all digits.{{br}}
The template handles [[Gregorian calendar]] information, rendering [[AD]]/[[Common Era|CE]] era spans as the implied default; [[AD|BC]]/[[Common Era|BCE]] lifespans and most spans straddling eras may also be rendered {{see below|{{slink||Era suffix}}}}. There is no special handling for [[Astronomical year numbering|astronomical dates]].{{br}}
The [[#Age component|optional age component]] (the subject's age-at-death or duration, or the related age range) may be auto-calculated and displayed when feasible. The component is set to match the era configuration used by the date span.{{br}}
Output is enclosed in brackets (parentheses) as the editable default; depending on the parameters used, other default presentation and formatting elements including static text, white space and additional punctuation may be displayed.{{br}}
The template employs required, dependent, and conditional parameters. All parameters are named; most parameters and parameter options have short-form aliases. Parameter names and aliases must be entered in lowercase. Non-date (non-year) optional parameters are ignored when they are misspelled or unrecognized; they are also ignored when any prerequisite parameters or conditions are absent.{{br}}
Usage errors may suppress related template elements and may add the edited page to a maintenance category {{see below|{{slink||Errors and error messages}}}}. Error messages may display by default or depending on parameter type and user preference. To reduce complexity, some cases involving certain era-straddling or ambiguous date spans (and age ranges) remain unhandled exceptions {{see below|[[#!sfx-strad|Note]] and [[#!ac-strad|Note]]}}.{{br}}
Copy a blank version from the box above to use. Insert the "{{!}}" (pipe) character between each parameter. Delete unused parameters.{{br}}

==Examples==

{{strong|No brackets|id=bx}} &#91;[[#brackets|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=bkt=nb}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |bkt=nb}}

{{strong|Content label|id=lx}} &#91;[[#label|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=l=lc}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |l=lc}}

{{strong|Year prefix|id=pfxx}} &#91;[[#prefix|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=pfx=y}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |pfx=y}}

{{strong|Era suffix|id=sfxx1}} &#91;[[#suffix|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=sfx=ad}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |sfx=ad}}

{{strong|Era straddle|id=sfxx2}} &#91;[[#suffix|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-10 years}}<nowiki> |d=</nowiki>{{#time: Y|-50 years}}<nowiki> |</nowiki>{{bxt|1=sfx=b-a}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-10 years}} |d={{#time: Y|-50 years}} |sfx=b-a}}

{{strong|Circa birth-year|id=cax}} &#91;[[#ca|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |pfx=y |sfx=ad |</nowiki>{{bxt|1=ca=born}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |pfx=y |sfx=ad |ca=born}}

{{strong|Alternative birth-year|id=b2x}} &#91;[[#birth2|info]]&#93;
*<code><nowiki>{{lifespan |pfx=y |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=or=born}}<nowiki> |</nowiki>{{bxt|1=b2={{#time: Y|-45 years}}}}<nowiki>}}</nowiki></code>
::{{lifespan |pfx=y |b={{#time: Y|-50 years}} |b2={{#time: Y|-45 years}} |or=born |d={{#time: Y|-10 years}}}}

{{strong|Alternative death-year|id=d2x}} &#91;[[#death2|info]]&#93;
*<code><nowiki>{{lifespan |pfx=y |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=or=died}}<nowiki> |</nowiki>{{bxt|1=d2={{#time: Y|-5 years}}}}<nowiki>}}</nowiki></code>
::{{lifespan |pfx=y |b={{#time: Y|-50 years}} |d2={{#time: Y|-5 years}} |or=died |d={{#time: Y|-10 years}}}}

{{strong|Ambiguous birth-year|id=~x}} &#91;[[#ambig|info]]&#93;
*<code><nowiki>{{lifespan |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=b=uncertain}}<nowiki>}}</nowiki></code>
::{{lifespan |d={{#time: Y|-10 years}} |b=uncertain}}

{{strong|Unknown death-year|id=?x}} &#91;[[#ambig|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |pfx=y |</nowiki>{{bxt|1=d=unknown}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |pfx=y |d=unknown}}

{{strong|Age component: age range|id=arx1}} &#91;[[#age-range|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=ar=y}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |ar=y}}

{{strong|Age component: age range with era straddle and age label|id=arx2}} &#91;[[#age-range|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{bxt|1=ar=y}}<nowiki> |</nowiki>{{bxt|1=al=dur}}<nowiki> |</nowiki>{{bxt|1=sfx=b-a}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |ar=y |al=dur |sfx=b-a}}

{{strong|Age component: age in years (death after birthday)|id=ayx1}} &#91;[[#age-yrs|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-10 years}}<nowiki> |d=</nowiki>{{#time: Y|-50 years}}<nowiki> |sfx=bc |</nowiki>{{bxt|1=ay=abd}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-10 years}} |d={{#time: Y|-50 years}} |sfx=bc |ay=abd}}

{{strong|Age component: age in years (death before birthday)|id=ayx2}} &#91;[[#age-yrs|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-10 years}}<nowiki> |d=</nowiki>{{#time: Y|-50 years}}<nowiki> |sfx=bc |</nowiki>{{bxt|1=ay=bbd}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-10 years}} |d={{#time: Y|-50 years}} |sfx=bc |ay=bbd}}

{{strong|Complex example involving ranges|id=rxc}} &#91;[[#age-range|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |or=both |b2=</nowiki>{{#time: Y|-5 years}}<nowiki> |d2=</nowiki>{{#time: Y|-5 years}}<nowiki> |pfx=y |ar=y}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |or=both |b2={{#time: Y|-5 years}} |d={{#time: Y|-10 years}} |d2={{#time: Y|-5 years}} |pfx=y |ar=y}}

{{strong|Complex example with all non-mutually exclusive parameters|id=allxc}}
*<code><nowiki>{{lifespan |birth=</nowiki>{{#time: Y|-50 years}}<nowiki> |birth2=</nowiki>{{#time: Y|-45 years}}<nowiki> |death=</nowiki>{{#time: Y|-10 years}}<nowiki> |death2=</nowiki>{{#time: Y|-5 years}}<nowiki> |or=both |ca=both |suffix=ce |age-label=aged |age-range=y |label=uc |brackets=age |err=y }}</nowiki></code>
::{{lifespan |birth={{#time: Y|-50 years}} |death={{#time: Y|-10 years}} |suffix=ce |or=both |birth2={{#time: Y|-45 years}} |death2={{#time: Y|-5 years}} |ca=both |age-label=aged |age-range=y |label=uc |brackets=age |err=y }}

==Parameters<!--This section is linked from within this page ([[MOS:HEAD]]).-->==

===General notes===

Dependent parameters and parameter options are described under their prerequisites. Parameter options must be entered in lowercase.{{br}}
Incorrect usage of some parameters may suppress display of related template elements; see parameter descriptions [[#Description|below]], and {{slink||Errors and error messages}}.

===Requirements and constraints===

* Parameters [[#birth|{{bxt|birth}}]] (or its alias {{bxt|b}}) and [[#death|{{bxt|death}}]] (or its alias {{bxt|d}}) are required.
* Parameters {{bxtn|[[#birth2|birth2]]}} (alternative birth-year, alias {{bxtn|b2}}) and {{bxtn|[[#death2|death2]]}} (alternative death-year, alias {{bxtn|d2}}) depend on parameter {{bxtn|[[#or|or]]}} (birth and/or death is either of 2 years).
* Parameters {{bxt|birth}} and {{bxt|death}} must be the earliest birth-year and death-year respectively when parameter {{bxtn|or}} is used.
* Parameter's {{bxt|birth}} year value must be earlier than any other date parameter's, but may be equal to the death-year (parameter {{bxtn|death}}).
* Parameter's {{bxtn|birth2}} year value must be earlier or equal to the alternative death-year (parameter {{bxtn|death2}}).
* Parameter's {{bxtn|death2}} year value must be later than any other other date parameter's, but may be equal to the alternative birth-year (parameter {{bxtn|birth2}}).
* Parameters {{bxtn|[[#age-yrs|age-yrs]]}} (age in years, alias {{bxtn|ay}}) and {{bxtn|[[#age-range|age-range]]}} (range of ages in years, alias {{bxtn|ar}}) are mutually exclusive.
* Parameters {{bxtn|age-yrs}} cannot be used with parameter {{bxtn|or}}.
* Parameter {{bxtn|[[#age-label|age-label]]}} (label for the age component, alias {{bxtn|al}}) requires parameter {{bxtn|age-yrs}} or parameter {{bxtn|age-range}}.
* Parameters {{bxtn|[[#label|label]]}} (content label, alias {{bxtn|l}}) and {{bxtn|[[#prefix|prefix]]}} (birth/death prefixes, alias {{bxtn|pfx}}) should not be used concurrently.

Parameters and parameter options may have additional specific requirements, constraints and conditions.

===Description<!--This section is linked from within this page ([[MOS:HEAD]]).-->===

====Date spans: birth- and death-year, alternative birth- and death-year<!--This section is linked from within this page ([[MOS:HEAD]]).-->====

* {{bxt|{{vanchor|birth}}}}, alias {{bxt|b}}: Required. Enter the subject's birth, start, or origin year numerically in full decimal notation according to century or millennium. When this parameter is omitted or misspelled an error message is displayed and all other template output is suppressed; &#91;[[#!dm|example]]&#93;
:Its year value must be {{em|chronologically earlier}} than the year value of any other date parameter, however it may equal a death-year;{{efn|name=equal}} error messages are displayed otherwise.
:{{em|Options:|id=ambig}} Provided for convenience. These options are not compatible with parameter {{bxtn|[[#ca|ca]]}} (circa) when applied to the same date parameter; also not compatible with [[#Age component|the age component]]. May require additional supporting information ([[WP:V]]).
:{{blist|{{para|birth|uncertain|code=y}}{{snd}} may be used when the birth-year is disputed, is one of three or more years proposed in acceptable sources, is not yet determined, or is estimated within a period longer than [[wikt:circa|circa]]; &#91;[[#~x|example]]&#93;
|{{para|birth|unknown|code=y}}{{snd}} may be used when the birth-year is unknown or cannot be determined; &#91;[[#?x|example]]&#93;}}
:{{em|Note:}} Any other input for this parameter produces an error message, see {{slink||Errors and error messages}}.

* {{bxt|{{vanchor|death}}}}, alias {{bxt|d}}: Required. Enter the subject's death, end, or final year as described under parameter {{bxt|birth}} above; this parameter has identical requirements and options, but distinct numerical constraints. Its year value must be equal to or {{em|chronologically later}} than the birth-year (parameter {{bxt|birth}}) and also, {{em|chronologically earlier}} than the alternative death-year (see parameters {{bxtn|[[#or|or]]}} and {{bxtn|[[#death2|death2]]}}); error messages display otherwise, see examples under {{slink||Errors and error messages}}.

* {{bxtn|{{vanchor|birth2}}}}, alias {{bxtn|b2}}: Optional alternative birth-year. Depends on parameter {{bxtn|or}}, see there under ''[[#or-dep|Dependents]]''.

* {{bxtn|{{vanchor|death2}}}}, alias {{bxtn|d2}}: Optional alternative death-year, see above.

====Approximate dates: "or" years, "circa" years====

* {{bxtn|{{vanchor|or}}}}: Used for, and required by, the optional alternative birth- and/or death-year {{see below|[[#or-dep|below]]}}. Select one of the following options; any other input is silently ignored. If error-handling parameter {{bxtn|[[#err|err]]}} is used, relevant error messages display when in error; &#91;[[#!no-or|example]]&#93;
:{{em|Options:}}
:{{blist|{{para|or|born|code=y}}{{snd}} required when the alternative birth-year (parameter {{bxtn|birth2}}) is included; &#91;[[#b2x|example]]&#93;
|{{para|or|died|code=y}}{{snd}} required when the alternative death-year (parameter {{bxtn|death2}}) is included; &#91;[[#d2x|example]]&#93;
|{{para|or|both|code=y}}{{snd}} required when both alternative years are included; &#91;[[#allxc|example]]&#93;}}
:{{em|Dependents:|id=or-dep}}
:{{blist|{{bxtn|birth2}}, alias {{bxtn|b2}}: Alternative birth-year, dependent on, and required when parameter {{para|or|born|plain=y}} or {{para|or|both|plain=y}}. Enter number in full decimal notation according to century or millennium{{snd}} no other input is allowed. Its year value must be {{em|chronologically later}} than parameter's [[#birth|{{bxt|birth/b}}]]; when parameter {{para|or|both|plain=y}} it must be {{em|chronologically earlier or equal to}} parameter's {{bxtn|death2}}. When in error, relevant messages are displayed; &#91;[[#!no-alt|example]]&#93;
|{{bxtn|death2}}, alias {{bxtn|d2}}: Alternative death-year, dependent on and required when parameter {{para|or|died|plain=y}} or {{para|or|both|plain=y}}. Enter number in full decimal notation according to century or millennium{{snd}} no other input is allowed. Its year value must be {{em|chronologically later}} than that of all other date parameters; when parameter {{para|or|both|plain=y}} it may be equal to parameter's {{bxtn|birth2}}. When in error, relevant messages will display.}}
:{{em|Note:}} {{bxtn|or}} is not compatible with, and suppresses age-component parameter {{bxtn|[[#age-yrs|age-yrs]]}}; &#91;[[#!ay-nc|example]]&#93;

* {{bxtn|{{vanchor|ca}}}}: Use for [[wikt:circa|circa]] dates (years) and the resulting age or range. Inserts the abbreviation/tooltip combination "{{abbr|c.|circa}}" followed by a non-breaking [[thin space]] before the relevant year (the tooltip link will appear only in the first instance of the abbreviation). Requires numerical year values for the [[#birth|{{bxt|birth}}]] and [[#death|{{bxt|death}}]] parameters. Cannot be specified for [[#or-dep|alternative years]]. This parameter is passed to the age component when it is included; if parameter {{bxtn|[[#age-range|age-range]]}} is used, circa applies to the entire range regardless of the specific circa-year. Select one of the options below; non-valid input is silently ignored. If error-handling parameter {{bxtn|[[#err|err]]}} is used a message displays when in error.
:{{em|Options:}}
:{{blist|{{para|ca|born|code=y}}{{snd}} set for circa birth-year(s); &#91;[[#cax|example]]&#93;
|{{para|ca|died|code=y}}{{snd}} set for circa death-year(s).
|{{para|ca|both|code=y}}{{snd}} when both circa birth-year(s) and circa death-year(s) are used; &#91;[[#allxc|example]]&#93;}}

====Era suffix<!--This section is linked from within this page ([[MOS:HEAD]]).-->====

* {{bxtn|{{vanchor|suffix}}}}, alias {{bxtn|sfx}}: Use to display an era suffix preceded by a non-breaking [[thin space]], after the entire date span or, when the span straddles eras, after both the birth and the death era. The implied default era is [[AD]]/[[Common Era|CE]] across all dates. There is no handling of [[Astronomical year numbering|astronomical dates]]; [[AD|BC/AD]] suffixes and [[Common Era|BCE/CE]] suffixes display identical date spans. See {{em|Note}} [[#!sfx-strad|below]] for an unhandled exception.
:{{em|Options:|id=sfxo}}
:{{blist|{{para|suffix|ad|code=y}} or {{para|suffix|ce|code=y}}{{snd}} set to explicitly state the default date span era as "AD" or "CE"; &#91;[[#sfxx1|example]]&#93;
|{{para|suffix|bc|code=y}} or {{para|suffix|bce|code=y}}{{snd}} set to display the date span era as "BC" or "BCE"; &#91;[[#ayx1|example]]&#93;
|{{para|suffix|b-a|code=y}}{{snd}} set when the date span straddles eras and the BC/AD notation is used. The birth-year(s) are followed by the suffix "BC"; death-year(s) are followed by suffix "AD"; &#91;[[#sfxx2|example]]&#93;
|{{para|suffix|b-c|code=y}}{{snd}} set when the date span straddles eras and the BCE/CE notation is used. The birth-year(s) are followed by the suffix "BCE"; death-year(s) are followed by suffix "CE".}}
:{{em|Note:|id=!sfx-strad}} Era straddles {{em|between}} birth years or {{em|between}} death years are not handled. For example, the span:{{br}}{{spaces|5}}{{nobr|[ {{xt|10&#8201;BC or 5&#8201;AD{{snd}} 10&#8201;AD}} ]}}{{br}}cannot be rendered by the template.

====Age component<!--This section is linked from within this page ([[MOS:HEAD]]).-->====

Optional, requires all date parameters to have numerical year values. Consists of a text label and the mutually exclusive parameters {{bxtn|age-range}} and {{bxtn|age-yrs}}; when used the subject's final age or age range(s) is auto-calculated and displayed after the date span (or [[#suffix|the suffix]] if any).{{efn|name=ac}} Parameter {{bxtn|age-label}} may be used to edit the component's label, and presentation parameter {{bxtn|[[#brackets|brackets]]}} may be set to enclose the component in parentheses.{{br}}
Preceding elements inserted: A comma ( {{bxtn|,}} ) and space, and the editable static text "aged" as the component's default label; if the brackets are set around only the age component ({{para|brackets|age|plain=y}}) no comma is inserted. The trailing static text "years" is inserted before the closing bracket or as the last visible template element. When any birth-year is the same as a death-year, the static text "less than a year" is displayed instead of the numerical age/range. The component does not normally handle or display year "0" (zero); [[Astronomical year numbering|astronomical dates]] are not supported.{{br}}
See {{em|Note}} [[#!ac-strad|below]] for a class of cases not handled by the age component.

* {{bxtn|{{vanchor|age-label}}}}, alias {{bxtn|al}}: Use to edit or remove the default label "aged". Requires one of parameters {{bxtn|age-range}} or {{bxtn|age-yrs}}. Select one of the options below; any other input is silently ignored. If error-handling parameter {{bxtn|[[#err|err]]}} is used relevant messages will be displayed when in error.
:{{em|Options:}}
:{{blist|{{para|age-label|aged|code=y}}{{snd}} set to explicitly state the default; &#91;[[#allxc|example]]&#93;
|{{para|age-label|duration|code=y}} or the option alias <code>dur</code>{{snd}} set to change the label to "duration"; &#91;[[#arx2|example]]&#93;
|{{para|age-label|nolabel|code=y}} or the option alias <code>nl</code>{{snd}} set to remove the age component label altogether.}}

* {{bxtn|{{vanchor|age-range}}}}, alias {{bxtn|ar}}: Set {{para|age-range|y|code=y|plain=y}} to display the subject's age range(s){{snd}} any other input is ignored or produces an error message (if error-handling parameter {{bxtn|[[#err|err]]}} is used). This parameter and parameter {{bxtn|age-yrs}} are mutually exclusive; &#91;[[#!ar|example]]&#93;
:{{em|Default range:}}
:{{blist|Two numerical values, with the low value signifying that the death/end date occurred {{em|before}} the subject's birthday/startday on the death/end year. Values separated by an [[en dash]] ( {{bxtn|&#8211;}} ). Presumes no [[#or-dep|alternative years]]; &#91;[[#arx1|example]]&#93;}}
:{{em|Variations:}}
:{{blist|When there are alternative years, and {{em|a singular}} [[#Era suffix|era suffix]] (AD/CE or BC/BCE) or no suffix, the range is delimited by the minimum and maximum possible ages defined by the date spans; they are separated by the static text "to" surrounded by non-breaking spaces; &#91;[[#allxc|example]]&#93;
|The static text "less than a year" is displayed as the minimum range value when there are alternative years and any death/end year is the same as any birth/start year; when there are no alternative years it displays as the only range value; &#91;[[#rxc|example]]&#93;}}
:{{em|Note:|id=!ac-strad}} When the date span(s) have [[#suffix|suffixes]] that straddle eras (BC-to-AD or BCE-to-CE) {{em|and}} alternative years, the range(s) cannot be rendered by the template.

* {{bxtn|{{vanchor|age-yrs}}}}, alias {{bxtn|ay}}: Use when the subject's exact or [[wikt:circa|circa]] age is known. Select one of the options below; any other input is ignored or produces an error message (if error-handling parameter {{bxtn|[[#err|err]]}} is used). Cannot be used with parameter {{bxtn|[[#or|or]]}}. This parameter and parameter {{bxtn|age-range}} are mutually exclusive; &#91;[[#!ay-nc|example]]&#93;
:{{em|Options:}}
:{{blist|{{para|age-yrs|abd|code=y}}{{snd}} set when the death/end occurred after the birth/start day on the death-year; &#91;[[#ayx1|example]]&#93;
|{{para|age-yrs|bbd|code=y}}{{snd}} set when the death/end occurred before the birth/start day on the death-year; &#91;[[#ayx2|example]]&#93;}}

====Presentation: brackets, label and prefix====

* {{bxtn|{{vanchor|brackets}}}}, alias {{bxtn|bkt}}: Brackets (parentheses) enclose the entire template output by default, as the first and last visible elements. Options below may either override or explicitly state the default; any other input is silently ignored.
:{{em|Options:}}
:{{blist|{{para|brackets|age|code=y}}{{snd}} set to display brackets around the optional age component only; &#91;[[#allxc|example]]&#93;
|{{para|brackets|full|code=y}}{{snd}} set to explicitly state the default.
|{{para|brackets|nb|code=y}}{{snd}} set to remove all brackets; &#91;[[#bx|example]]&#93;}}

* {{bxtn|{{vanchor|label}}}}, alias {{bxtn|l}}: Use to display the static text "lifespan: " (the term followed by colons and a space) as the label for the template's content. When included, it normally displays immediately after the opening bracket, or first if brackets are removed. This parameter is silently ignored when parameter {{bxtn|[[#prefix|prefix]]}} is used; non-valid input is also silently ignored. If error-handling parameter {{bxtn|[[#err|err]]}} is used, relevant messages are displayed when in error; &#91;[[#!l-nc|example]]&#93;
:{{em|Options:}}
:{{blist|{{para|label|lc|code=y}}{{snd}} set to display label in lower-case; &#91;[[#lx|example]]&#93;
|{{para|label|uc|code=y}}{{snd}} set to display label with initial-letter upper-case; &#91;[[#allxc|example]]&#93;}}

* {{bxtn|{{vanchor|prefix}}}}, alias {{bxtn|pfx}}: Set {{para|prefix|y|plain=y|code=y}} to display the abbreviated prefix/tooltip combinations "{{abbr|b.|born}}" and "{{abbr|d.|died}}" followed by a non-breaking [[thin space]] before the birth- and death-year respectively, or before parameter {{bxtn|[[#ca|ca]]}} (circa) when used. Any other input is silently ignored; use of this parameter suppresses parameter {{bxtn|[[#label|label]]}}. If error-handling parameter {{bxtn|[[#err|err]]}} is used, relevant error messages are displayed when in error; &#91;[[#pfxx|example]]&#93;

====Error message handling====

* {{bxtn|{{vanchor|err}}}}: Set {{para|err|y|code=y|plain=y}} (any other input will generate an error message) to display all error messages produced by non-date optional-parameter errors, including this parameter. Intended mainly for testing and debugging purposes.{{efn|name=err-chk}} Handling of individual or per-parameter errors is not supported. Depending on the parameter(s) in error, using {{bxtn|err}} may cause the relevant error message(s) to display before any other template output. See also {{slink||Errors and error messages}}.

==Errors and error messages<!--This section is linked from within this page ([[MOS:HEAD]]).-->==

Error messages generated by date parameter errors (including [[#or-dep|alternative year]] parameter errors) are always displayed, and the edited page is added to {{fake link|Category:Template Lifespan errors|Category does not exist yet}}. If either of parameters [[#birth|{{bxt|birth}}]] and [[#death|{{bxt|death}}]] is absent, mislabeled, or empty the error is fatal and will suppress all other template output.{{br}}
Errors related to non-date (non-year) optional parameters are silent by default; parameter {{bxtn|[[#err|err]]}} may be used to display the relevant error messages when in error, including messages for {{bxtn|err}} itself.{{efn|name=err-chk}}{{br}}
Error conditions and/or error messages may suppress display of related template elements.{{br}}
There is no error handling for individual, non-date optional parameters; error messages display for all message-enabled optional parameters, or none.

===Examples{{snd}} date parameters{{efn|name=nocat}}===

{{strong|Missing death-year|id=!dm}} &#91;[[#death|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki>}}</nowiki></code>
::{{supcat|{{lifespan |b={{#time: Y|-50 years}}}}}}

{{strong|Birth-year later than death-year (AD/CE)|id=!d-b}} &#91;[[#birth|info]]&#93;
*<code><nowiki>{{lifespan |</nowiki>{{!bxt|1=b={{#time: Y|-10 years}}}}<nowiki> |</nowiki>{{bxt|1=d={{#time: Y|-50 years}}}}<nowiki>}}</nowiki></code>
::{{supcat|{{lifespan |b={{#time: Y|-10 years}} |d={{#time: Y|-50 years}}}}}}

{{strong|Birth-year later than death-year (BC/BCE)}} &#91;[[#birth|info]]&#93;
*<code><nowiki>{{lifespan |</nowiki>{{!bxt|1=b={{#time: Y|-50 years}}}}<nowiki> |</nowiki>{{bxt|1=d={{#time: Y|-10 years}}}}<nowiki> |</nowiki>{{bxt|1=sfx=bc}}<nowiki>}}</nowiki></code>
::{{supcat|{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |sfx=bc}}}}

{{strong|Birth-year later than alternative birth-year|id=!b2-b}} &#91;[[#birth|info]]&#93;
*<code><nowiki>{{lifespan |</nowiki>{{!bxt|1=b={{#time: Y|-49 years}}}}<nowiki> |</nowiki>{{bxt|1=b2={{#time: Y|-50 years}}}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |or=born}}</nowiki></code>
::{{supcat|{{lifespan |b={{#time: Y|-49 years}} |b2={{#time: Y|-50 years}} |or=born |d={{#time: Y|-10 years}}}}}}

{{strong|Missing alternative birth-year|id=!no-alt}} &#91;[[#birth2|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{!bxt|1=or=born}}<nowiki>}}</nowiki></code>
::{{supcat|{{lifespan |b={{#time: Y|-50 years}} |or=born |d={{#time: Y|-10 years}}}}}}

{{strong|Alternative year(s) require parameter {{xt|or}}|id=!no-or}} &#91;[[#or-dep|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |</nowiki>{{!bxt|1=b2={{#time: Y|-40 years}}}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{!bxt|1=d2={{#time: Y|-5 years}}}}<nowiki>}}</nowiki></code>
::{{supcat|{{lifespan |b={{#time: Y|-50 years}} |b2={{#time: Y|-40 years}} |d={{#time: Y|-10 years}} |d2={{#time: Y|-5 years}}}}}}

===Examples{{snd}} non-date parameters, error messages on===

{{strong|Parameter {{xt|suffix}}: Non-valid input|id=!sfx}} &#91;[[#suffix|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{!bxt|1=sfx=none}}<nowiki> |</nowiki>{{!bxt|1=err=y}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |sfx=none |err=y}}

{{strong|Parameter {{xt|label}} not compatible with parameter {{xt|prefix}}|id=!l-nc}} &#91;[[#label|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{!bxt|1=pfx=y}}<nowiki> |</nowiki>{{!bxt|1=l=lc}}<nowiki> |</nowiki>{{!bxt|1=err=y}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |label=lc |pfx=y |err=y}}

{{strong|Age component: Non-valid input for parameter {{xt|age-range}}|id=!ar}} &#91;[[#age-range|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-50 years}}<nowiki> |d=</nowiki>{{#time: Y|-10 years}}<nowiki> |</nowiki>{{!bxt|1=ar=full}}<nowiki> |</nowiki>{{!bxt|1=err=y}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-50 years}} |d={{#time: Y|-10 years}} |ar=full |err=y}}

{{strong|Age component: Parameter {{xt|age-yrs}} not compatible with parameters {{xt|or}} and {{xt|age-range}}|id=!ay-nc}} &#91;[[#age-yrs|info]]&#93;
*<code><nowiki>{{lifespan |b=</nowiki>{{#time: Y|-10 years}}<nowiki> |d=</nowiki>{{#time: Y|-50 years}}<nowiki> |b2=</nowiki>{{#time: Y|-9 years}}<nowiki> |pfx=y |sfx=b-a |</nowiki>{{!bxt|1=or=born}}<nowiki> |</nowiki>{{!bxt|1=ay=bbd}}<nowiki> |</nowiki>{{!bxt|1=ar=y}}<nowiki> |</nowiki>{{!bxt|1=err=y}}<nowiki>}}</nowiki></code>
::{{lifespan |b={{#time: Y|-10 years}} |or=born |b2={{#time: Y|-9 years}} |pfx=y |d={{#time: Y|-50 years}} |ar=y |ay=bbd |sfx=b-a |err=y}}

==TemplateData==
{{TemplateData header}}
<templatedata>
{
"params": {
"brackets": {
"aliases": [
"bkt"
],
"label": "Brackets",
"description": "Parentheses, enclose output by default.",
"type": "string",
"suggestedvalues": [
"age",
"nb",
"full"
],
"autovalue": "full"
},
"birth": {
"aliases": [
"b"
],
"label": "Birth",
"description": "The birth, start or origin year. Enter the full year with all digits, or ",
"required": true
},
"death": {
"aliases": [
"d"
],
"label": "Death",
"required": true
},
"err": {
"label": "Error message display",
"description": "Displays all error messages related to non-date parameters; may suppress display of error-related template elements. Preset to 'y' (true). Deselect this parameter if not desired",
"type": "boolean",
"autovalue": "y"
},
"prefix": {
"aliases": [
"pfx"
],
"label": "Prefix",
"description": "Displays the abbreviated prefixes 'b.' and 'd.' before the birth and death years",
"type": "boolean",
"autovalue": "",
"default": "y"
},
"ca": {
"label": "Circa",
"type": "string",
"suggestedvalues": [
"born",
"died",
"both"
]
},
"or": {
"label": "Or",
"type": "string",
"suggestedvalues": [
"born",
"died",
"both"
]
},
"suffix": {
"aliases": [
"sfx"
],
"label": "Era suffix",
"type": "string",
"suggestedvalues": [
"ad",
"bc",
"bce",
"ce",
"b-a",
"b-c"
],
"default": "ad"
},
"age-label": {
"aliases": [
"al"
],
"label": "Age label",
"type": "string",
"suggestedvalues": [
"aged",
"duration",
"nolabel"
],
"default": "aged",
"description": "Label before the age or range, default is 'aged'. Select one of the list options ('nolabel' removes it altogether)"
},
"age-range": {
"aliases": [
"ar"
],
"label": "Age (range)",
"type": "boolean",
"autovalue": "y"
},
"age-yrs": {
"aliases": [
"ay"
],
"label": "Age (years)",
"type": "string",
"suggestedvalues": [
"abd",
"bbd"
]
},
"label": {
"aliases": [
"l"
],
"label": "Content label",
"description": "Label for the template content.",
"type": "string",
"suggestedvalues": [
"lc",
"uc"
]
},
"death2": {
"aliases": [
"d2"
],
"label": "Death2",
"description": "Alternative death-year",
"type": "date"
},
"birth2": {
"aliases": [
"b2"
],
"label": "Birth2",
"description": "Alternative birth-year",
"type": "date"
}
},
"description": "This template may be used to display a person's or entity's whole lifespan in years, and optionally their final age or duration, also in years; the Gregorian calendar and BC/AD era are respectively the implied default calendar and editable default era. For details and examples see the template's documentation. Default parameter list order reflects relative importance.",
"paramOrder": [
"birth",
"death",
"suffix",
"or",
"birth2",
"death2",
"ca",
"prefix",
"age-yrs",
"age-range",
"age-label",
"label",
"brackets",
"err"
]
}
</templatedata>

==Footnotes==
{{notelist|refs=
{{efn|name=equal|1=When the subject's final age or duration is less than a year.}}
{{efn|name=ac|1=Template {{tlx|age}} is used to calculate ages and range(s).}}
{{efn|name=err-chk|1=When the edited page contains a large number of {{tlf|lifespan}} transclusions with {{para|err|y|plain=y}}, a small performance cost may be incurred.}}
{{efn|name=nocat|1=Categories are suppressed in examples that would otherwise categorize this page.}}
}}

[[Category:Date mathematics templates]]
}}

Latest revision as of 13:22, 2 January 2025

(⁠1975–2015⁠)