Jump to content

Template:Lifespan: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m
m: -superfluous
 
(39 intermediate revisions by 12 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;Parameter <strong><span style="color:green">age-yrs/ay</span>&#32;</strong>&#32;cannot be used with parameter&#32;<strong><span style="color:green">age-range/ar</span></strong>&#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}}}}
|unknown
|unknown
|uncertain=
|uncertain=
|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">birth/b</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#birth|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}{{{birth|{{{b}}}}}}{{#if: {{{suffix|{{{sfx|}}}}}}||{{#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|}}}}}}|{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|both=&#160;or&#160;{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{{birth2|{{{b2}}}}}}{{#if: {{{suffix|{{{sfx|}}}}}}||{{#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}}]]-->}}}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">birth2/b2:&#32;</span></strong>Alternative birth-year is missing, mislabeled, has no value or invalid value&#32;&#91;&#8288;[[Template:Lifespan#birth2|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">birth2/b2:&#32;</span></strong>Alternative birth-year requires parameter&#32;<strong><span style="color:green">or</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}|{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|both=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">birth2/b2:&#32;</span></strong>Alternative birth-year is missing, mislabeled or has no value&#32;&#91;&#8288;[[Template:Lifespan#birth2/b2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#switch: {{{suffix|{{{sfx}}}}}}
|#default=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">birth/b</span></strong>&#32;has invalid value&#32;&#91;&#8288;[[Template:Lifespan#birth|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}{{{birth|{{{b}}}}}}{{#if: {{{suffix|{{{sfx|}}}}}}||{{#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|}}}}}}|{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|both=&#160;or&#160;{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{{birth2|{{{b2}}}}}}{{#if: {{{suffix|{{{sfx|}}}}}}||{{#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}}]]-->}}}}}}|&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">birth2/b2:&#32;</span></strong>Alternative birth-year is missing, mislabeled, has no value or invalid value&#32;&#91;&#8288;[[Template:Lifespan#birth2|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">birth2/b2:&#32;</span></strong>Alternative birth-year requires parameter&#32;<strong><span style="color:green">or</span></strong>&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}|{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|both=&#32;<span style="color:red"><strong>!</strong>&#160;{{tlx|lifespan}}:&#32;Parameter <strong><span style="color:green">birth2/b2:&#32;</span></strong>Alternative birth-year is missing, mislabeled or has no value&#32;&#91;&#8288;[[Template:Lifespan#birth2|info]]&#8288;&#93;&#160;<strong>!</strong></span>&#32;<!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#switch: {{{suffix|{{{sfx}}}}}}
|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.-->
|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 should 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-label= |age-range= |age-yrs= |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>
{{end}}

===Option summary===

===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; BC/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 [[#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=nbx}} &#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;[[#circa|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;[[#or|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;[[#or|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;[[#death|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-years|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-years|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 edge-case 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|[[#label|label]]}} (content label, alias {{bxtn|l}}) and {{bxtn|[[#prefix|prefix]]}} (birth/death prefixes, alias {{bxtn|pfx}}) should not be used concurrently.
* 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}}).
* Parameter {{bxtn|[[#age-yrs|age-yrs]]}} (age in years, alias {{bxtn|ay}}) cannot be used with parameter {{bxtn|[[#age-range|age-range]]}} (range of ages in years, alias {{bxtn|ar}}), and also 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 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 will be displayed and all other template output will be 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}} relevant error messages will display otherwise.
:{{em|Options:|id=ambig}} Provided for convenience, the options below are not compatible with parameter {{bxtn|[[#ca|ca]]}} (circa) when applied to the same date parameter; also not compatible with [[#The 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 will produce 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]]}}); relevant error messages will 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 options below; non-valid input is silently ignored. If error-handling parameter {{bxtn|[[#err|err]]}} is used, relevant error messages will be displayed 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 will display; &#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 will suppress 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 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 will be displayed 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.}}

====Era suffix====

* {{bxtn|{{vanchor|suffix}}}}, alias {{bxtn|sfx}}: Use to display an era suffix, preceded by a [[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/CE across all dates. There is no handling of [[Astronomical year numbering|astronomical dates]]; BC/AD suffixes and 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".
|{{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) will be followed by the suffix "BC"; death-year(s) will be 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) will be followed by the suffix "BCE"; death-year(s) will be 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.

====The age component====

Optional, requires all date parameters to have numerical year values. Consists of the mutually exclusive parameters {{bxtn|age-range}} and {{bxtn|age-yrs}}; when one of them is included the subject's final age or age range(s) will be auto-calculated, and displayed after the date span (or [[#suffix|the suffix]] if any).{{efn|name=ac}} Also, parameter {{bxtn|age-label}} may be used to handle the component's label, while parameter {{bxtn|[[#brackets|brackets]]}} may be set to enclose {{em|only}} the age component in brackets.{{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 also 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" will be displayed instead of the numerical age/range boundary. 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 certain cases not handled by the age component.

* {{bxtn|{{vanchor|age-label}}}}, alias {{bxtn|al}}: Label for the age component. Requires one of parameters {{bxtn|age-range}} or {{bxtn|age-yrs}}. Any or none of the options below may be selected; non-valid 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 preceding static text "aged"; &#91;[[#allxc|example]]&#93;
|{{para|age-label|duration|code=y}} or the option alias <code>dur</code>{{snd}} set to change the preceding static text to "duration"; &#91;[[#arx2|example]]&#93;
|{{para|age-label|nolabel|code=y}} or the option alias <code>nl</code>{{snd}} removes the age component label {{em|only}}; other age component elements are unaffected.}}

* {{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 will be ignored, or will produce 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;}} ). Condition: No [[#or-dep|alternative years]]; &#91;[[#arx2|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 bounded by the minimum and maximum possible ages defined by the date spans; they are separated by the static text "to" surrounded by non-wrapping spaces; &#91;[[#rxc|example]]&#93;
|The static text "less than a year" will be displayed as the minimum range value when alternative years are included and any death/end year is the same as any birth/start year (subject to date parameter constraints); when there are no alternative years the text will display as the only range value; &#91;[[#alx|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 circa age is known. Select one of the options below; any other input will be ignored, or will produce 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;[[#ayx1|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 will be 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|nb|code=y}}{{snd}} set to remove all brackets; &#91;[[#nbx|example]]&#93;
|{{para|brackets|full|code=y}}{{snd}} set to explicitly state the default.}}

* {{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 will normally display 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 will be 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 the parameter {{bxtn[[#circa|circa]]}} when used). Any other input for this parameter will be silently ignored, while its inclusion will suppress parameter {{bxtn|[[#label|label]]}}; if error-handling parameter {{bxtn|[[#err|err]]}} is used, relevant error messages will be displayed; &#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 error messages for all such parameters including {{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}}

==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]]
}}
</noinclude>
</noinclude>

Latest revision as of 13:22, 2 January 2025

(⁠1975–2015⁠)