Template:Lifespan: Difference between revisions
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=(⁠}}{{#if: {{{birth|{{{b|}}}}}}|{{#if: {{{death|{{{d|}}}}}}|{{#if: {{{err|}}}|{{#ifeq: {{{err}}}|y|{{#if: {{{prefix|{{{pfx|}}}}}}|{{# |
<!--Begin {{lifespan}}--><includeonly>{{#switch: {{{brackets|{{{bkt}}}}}}|age|nb=|full|#default=(⁠}}{{#if: {{{birth|{{{b|}}}}}}|{{#if: {{{death|{{{d|}}}}}}|{{#if: {{{err|}}}|{{#ifeq: {{{err}}}|y|{{#if: {{{prefix|{{{pfx|}}}}}}|{{#switch: {{{prefix|{{{pfx}}}}}}|y|tt|nt=|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">prefix/pfx</span></strong> has invalid value [⁠[[Template:Lifespan#prefix|info]]⁠] <strong>!</strong></span> }}}}{{#if: {{{ca|}}}|{{#switch: {{{ca}}}|born|died|both=|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">ca</span></strong> has invalid value [⁠[[Template:Lifespan#ca|info]]⁠] <strong>!</strong></span> }}{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">ca</span></strong> requires numerical birth/death year-value [⁠[[Template:Lifespan#ca|info]]⁠] <strong>!</strong></span> }}}}}}{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|died|both=|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">or</span></strong> has invalid value [⁠[[Template:Lifespan#or|info]]⁠] <strong>!</strong></span> }}}}{{#if: {{{suffix|{{{sfx|}}}}}}|{{#switch: {{{suffix|{{{sfx}}}}}}|ad|b-a|b-c|ce|bc|bce=|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx</span></strong> has invalid value [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}{{#switch: {{{suffix|{{{sfx}}}}}} |
||
|b-c={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}=0| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong> [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}=0| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong> [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}} |
|||
|ad|bc|bce|b-a={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}=0| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong> [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}=0| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong> [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}=0| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong> [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}}{{#ifeq: {{{death2|{{{d2}}}}}}|{{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death2|{{{d2}}}}}}|4|0}}}}=0| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) may only have the [[Common Era]] suffix option <strong><span style="color:green">ce</span></strong> [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}} |
|||
}}|{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}=0| <span><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) without explicit suffix option <strong><span style="color:green">ce</span></strong> ("[[Common Era|CE]]" implied) [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}=0| <span><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) without explicit suffix option <strong><span style="color:green">ce</span></strong> ("[[Common Era|CE]]" implied) [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}}{{#ifeq: {{{birth2|{{{b2}}}}}}|{{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}|{{#ifexpr: {{YEAR|{{padleft:{{{birth2|{{{b2}}}}}}|4|0}}}}=0| <span><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">suffix/sfx:</span></strong> Year 0 (zero) without explicit suffix option <strong><span style="color:green">ce</span></strong> ("[[Common Era|CE]]" implied) [⁠[[Template:Lifespan#suffix|info]]⁠] <strong>!</strong></span> }}}}}}{{#if: {{{age-label|{{{al|}}}}}}|{{#if: {{{age-range|{{{ar|}}}}}}||{{#if: {{{age-yrs|{{{ay|}}}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">age-label/al</span></strong> requires parameter <strong><span style="color:green">age-range/ar</span></strong> or parameter <strong><span style="color:green">age-year/ay</span></strong> [⁠[[Template:Lifespan#age-label|info]]⁠] <strong>!</strong></span> }}}}{{#switch: {{{age-label|{{{al}}}}}}|nl|nolabel|aged|dur|duration=|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">age-label/al</span></strong> has invalid value [⁠[[Template:Lifespan#age-label|info]]⁠] <strong>!</strong></span> }}}}{{#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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">age-range/ar</span></strong> requires numerical birth/death year-value [⁠[[Template:Lifespan#Age component|info]]⁠] <strong>!</strong></span> }}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">age-range/ar</span></strong> has invalid value [⁠[[Template:Lifespan#age-range|info]]⁠] <strong>!</strong></span> }}}}{{#if: {{{age-yrs|{{{ay|}}}}}}|{{#if: {{{or|}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">age-yrs/ay</span></strong> cannot be used with parameter <strong><span style="color:green">or</span></strong> [⁠[[Template:Lifespan#age-yrs|info]]⁠] <strong>!</strong></span> }}{{#if: {{{age-range|{{{ar|}}}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">age-yrs/ay</span></strong> and <strong><span style="color:green">age-range/ar</span></strong> are mutually exclusive [⁠[[Template:Lifespan#age-yrs|info]]⁠] <strong>!</strong></span> }}{{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">age-yrs/ay</span></strong> requires numerical birth/death year-value [⁠[[Template:Lifespan#Age component|info]]⁠] <strong>!</strong></span> }}}}{{#switch: {{{age-yrs|{{{ay}}}}}}|abd|bbd=|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">age-yrs/ay</span></strong> has invalid value [⁠[[Template:Lifespan#age-yrs|info]]⁠] <strong>!</strong></span> }}}}{{#if: {{{label|{{{l|}}}}}}|{{#switch: {{{label|{{{l}}}}}}|lc|uc=|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">label/l</span></strong> has invalid value [⁠[[Template:Lifespan#label|info]]⁠] <strong>!</strong></span> }}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">err</span></strong> has invalid value [⁠[[Template:Lifespan#err|info]]⁠] <strong>!</strong></span> }}}}{{#if: {{{label|{{{l|}}}}}}|{{#if: {{{prefix|{{{pfx|}}}}}}|{{#ifeq: {{{err}}}|y| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">label/l</span></strong> cannot be used with parameter <strong><span style="color:green">prefix/pfx</span></strong> [⁠[[Template:Lifespan#label|info]]⁠] <strong>!</strong></span> }}|{{#switch: {{{label|{{{l|}}}}}}|lc=lifespan: |uc=Lifespan: }}}}}}{{#switch: {{{prefix|{{{pfx}}}}}}|y|tt={{abbr|b.|born}} |nt=b. }}{{#switch: {{{ca}}} |
|||
|born|both={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{circa}} }}}}{{#switch: {{{birth|{{{b}}}}}} |
|born|both={{#ifeq: {{{birth|{{{b}}}}}}|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}}|{{circa}} }}}}{{#switch: {{{birth|{{{b}}}}}} |
||
|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}} |
|{{YEAR|{{padleft:{{{birth|{{{b}}}}}}|4|0}}}} |
||
|unknown |
|unknown |
||
|uncertain= |
|uncertain= |
||
|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth/b</span></strong> has invalid value [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[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}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, death/d, death2/d2: </span></strong>Birth-year must be earlier than or equal to death-year(s) [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}}}{{#if: {{{birth2|{{{b2|}}}}}}|{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|both= or {{#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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, birth2/b2: </span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth2/b2: </span></strong>Alternative birth-year is missing, mislabeled, has no value or invalid value [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth2/b2: </span></strong>Alternative birth-year requires parameter <strong><span style="color:green">or</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}|{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|both= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth2/b2: </span></strong>Alternative birth-year is missing, mislabeled or has no value [⁠[[Template:Lifespan#birth2 |
|#default= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth/b</span></strong> has invalid value [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[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}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, death/d, death2/d2: </span></strong>Birth-year must be earlier than or equal to death-year(s) [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}}}{{#if: {{{birth2|{{{b2|}}}}}}|{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|both= or {{#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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, birth2/b2: </span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth2/b2: </span></strong>Alternative birth-year is missing, mislabeled, has no value or invalid value [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth2/b2: </span></strong>Alternative birth-year requires parameter <strong><span style="color:green">or</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}|{{#if: {{{or|}}}|{{#switch: {{{or}}}|born|both= <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth2/b2: </span></strong>Alternative birth-year is missing, mislabeled or has no value [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}}{{#switch: {{{suffix|{{{sfx}}}}}} |
||
|b-a= BC |
|b-a= BC |
||
|b-c= BCE |
|b-c= BCE |
||
}}{{# |
}}{{#if: {{{prefix|{{{pfx|}}}}}}| – |{{#if: {{{ca|}}}| – |{{#if: {{{or|}}}| – |{{#ifeq: {{{birth|{{{b}}}}}}|uncertain| – |{{#ifeq: {{{birth|{{{b}}}}}}|unknown| – |{{#ifeq: {{{death|{{{d}}}}}}|uncertain| – |{{#ifeq: {{{death|{{{d}}}}}}|unknown| – |{{#if: {{{suffix|{{{sfx|}}}}}}|{{#switch: {{{suffix|{{{sfx}}}}}}|b-a|b-c= – |#default=–}}|–}}}}}}}}}}}}}}}}{{#switch: {{{prefix|{{{pfx}}}}}}|y|tt={{abbr|d.|died}} |nt=d. }}{{#ifeq: {{{death|{{{d}}}}}}|{{YEAR|{{padleft:{{{death|{{{d}}}}}}|4|0}}}}|{{#switch: {{{ca}}}|died={{circa}} |both={{circa|lk=no}} }}}}{{#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}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, death/d, death2/d2: </span></strong>Birth-year must be earlier than or equal to death-year(s) [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth2/b2, death2/d2: </span></strong>Alternative birth-year must be earlier than or equal to alternative death-year [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, birth2/b2: </span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">death/d, death2/d2: </span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong> [⁠[[Template:Lifespan#death2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, death/d, death2/d2: </span></strong>Birth-year must be earlier than or equal to death-year(s) [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth2/b2, death2/d2: </span></strong>Alternative birth-year must be earlier than or equal to alternative death-year [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, birth2/b2: </span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">death/d, death2/d2: </span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong> [⁠[[Template:Lifespan#death2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, birth2/b2: </span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">death/d, death2/d2: </span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong> [⁠[[Template:Lifespan#death2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, death/d, death2/d2: </span></strong>Birth-year must be earlier than or equal to death-year(s) [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth2/b2, death2/d2: </span></strong>Alternative birth-year must be earlier than or equal to alternative death-year [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, birth2/b2: </span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">death/d, death2/d2: </span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong> [⁠[[Template:Lifespan#death2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, death/d, death2/d2: </span></strong>Birth-year must be earlier than or equal to death-year(s) [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth2/b2, death2/d2: </span></strong>Alternative birth-year must be earlier than or equal to alternative death-year [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">birth/b, birth2/b2: </span></strong>Please assign the later birth-year to parameter <strong><span style="color:green">birth2/b2</span></strong> [⁠[[Template:Lifespan#birth2|info]]⁠] <strong>!</strong></span> <!--[[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}}}}|| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameters <strong><span style="color:green">death/d, death2/d2: </span></strong>Please assign the later death-year to parameter <strong><span style="color:green">death2/d2</span></strong> [⁠[[Template:Lifespan#death2|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}}}}} |
||
}}}}{{#if: {{{age-range|{{{ar|}}}}}}|{{#ifeq: {{{brackets|{{{bkt}}}}}}|age| (⁠|, }}{{#switch: {{{age-label|{{{al}}}}}} |
}}}}{{#iferror: {{#if: {{{age-range|{{{ar|}}}}}}|{{#ifeq: {{{brackets|{{{bkt}}}}}}|age| (⁠|, }}{{#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}} |
||
}}}} years}}}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">death/d</span></strong> is missing, mislabeled, or empty [⁠[[Template:Lifespan#death|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth/b</span></strong> is missing, mislabeled, or empty [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}{{#ifeq: {{{brackets|{{{bkt}}}}}}|nb||⁠)}}</includeonly><!--End {{lifespan}}--><noinclude> |
}}}} years}}}}}}}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">death/d</span></strong> is missing, mislabeled, or empty [⁠[[Template:Lifespan#death|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}| <span style="color:red"><strong>!</strong> {{tlx|lifespan}}: Parameter <strong><span style="color:green">birth/b</span></strong> is missing, mislabeled, or empty [⁠[[Template:Lifespan#birth|info]]⁠] <strong>!</strong></span> <!--[[Category:Template Lifespan errors|{{FULLPAGENAME}}]]-->}}{{#ifeq: {{{brackets|{{{bkt}}}}}}|nb||⁠)}}</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}} [[[#brackets|info]]] |
|||
*<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}} [[[#label|info]]] |
|||
*<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}} [[[#prefix|info]]] |
|||
*<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}} [[[#suffix|info]]] |
|||
*<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}} [[[#suffix|info]]] |
|||
*<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}} [[[#circa|info]]] |
|||
*<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}} [[[#or|info]]] |
|||
*<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}} [[[#or|info]]] |
|||
*<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}} [[[#ambig|info]]] |
|||
*<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}} [[[#death|info]]] |
|||
*<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}} [[[#age-range|info]]] |
|||
*<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}} [[[#age-range|info]]] |
|||
*<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}} [[[#age-years|info]]] |
|||
*<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}} [[[#age-years|info]]] |
|||
*<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}} [[[#age-range|info]]] |
|||
*<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; [[[#!dm|example]]] |
|||
: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]]; [[[#~x|example]]] |
|||
|{{para|birth|unknown|code=y}}{{snd}} may be used when the birth-year is unknown or cannot be determined; [[[#?x|example]]]}} |
|||
:{{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; [[[#!no-or|example]]] |
|||
:{{em|Options:}} |
|||
:{{blist|{{para|or|born|code=y}}{{snd}} required when the alternative birth-year (parameter {{bxtn|birth2}}) is included; [[[#b2x|example]]] |
|||
|{{para|or|died|code=y}}{{snd}} required when the alternative death-year (parameter {{bxtn|death2}}) is included; [[[#d2x|example]]] |
|||
|{{para|or|both|code=y}}{{snd}} required when both alternative years are included; [[[#allxc|example]]]}} |
|||
:{{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; [[[#!no-alt|example]]] |
|||
|{{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]]}}; [[[#!ay-nc|example]]] |
|||
* {{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); [[[#cax|example]]] |
|||
|{{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"; [[[#sfxx1|example]]] |
|||
|{{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"; [[[#sfxx2|example]]] |
|||
|{{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 BC or 5 AD{{snd}} 10 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"; [[[#allxc|example]]] |
|||
|{{para|age-label|duration|code=y}} or the option alias <code>dur</code>{{snd}} set to change the preceding static text to "duration"; [[[#arx2|example]]] |
|||
|{{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; [[[#!ar|example]]] |
|||
:{{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|–}} ). Condition: No [[#or-dep|alternative years]]; [[[#arx2|example]]]}} |
|||
:{{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; [[[#rxc|example]]] |
|||
|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; [[[#alx|example]]]}} |
|||
:{{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; [[[#!ay-nc|example]]] |
|||
:{{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; [[[#ayx1|example]]] |
|||
|{{para|age-yrs|bbd|code=y}}{{snd}} set when the death/end occurred before the birth/start day on the death-year; [[[#ayx1|example]]]}} |
|||
====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; [[[#allxc|example]]] |
|||
|{{para|brackets|nb|code=y}}{{snd}} set to remove all brackets; [[[#nbx|example]]] |
|||
|{{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; [[[#!l-nc|example]]] |
|||
:{{em|Options:}} |
|||
:{{blist|{{para|label|lc|code=y}}{{snd}} set to display label in lower-case; [[[#lx|example]]] |
|||
|{{para|label|uc|code=y}}{{snd}} set to display label with initial-letter upper-case; [[[#allxc|example]]]}} |
|||
* {{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; [[[#pfxx|example]]] |
|||
====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}} [[[#death|info]]] |
|||
*<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}} [[[#birth|info]]] |
|||
*<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)}} [[[#birth|info]]] |
|||
*<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}} [[[#birth|info]]] |
|||
*<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}} [[[#birth2|info]]] |
|||
*<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}} [[[#or-dep|info]]] |
|||
*<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}} [[[#suffix|info]]] |
|||
*<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}} [[[#label|info]]] |
|||
*<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}} [[[#age-range|info]]] |
|||
*<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}} [[[#age-yrs|info]]] |
|||
*<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)
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.
The implied default calendar is the Gregorian calendar and the editable implied default era is AD/CE; although the template may be adapted to other calendars by users, 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. Presentation follows Wikipedia's 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.
Usage
[edit]
Listed by relative importance |
Syntax and presentation
[edit]For basic use, only the birth- and death-years (via parameters |birth=
and |death=
) are required; numerical years must be entered fully, with all digits.
The template handles Gregorian calendar information, though this is not a requirement; other calendars may be adapted for use. It renders AD/CE era spans as the implied default. BC/BCE lifespans and most spans straddling eras may also be rendered ( ). Although year 0 (zero) is allowed, negative years are not, and there is no special handling for astronomical dates.
The 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.
Output is enclosed in brackets (parentheses) as the editable preset; depending on the parameters used, other default presentation and formatting elements including static text, white space and additional punctuation may be displayed.
The template employs required, dependent, conditional and preset (default) parameters. All parameters are named; most parameters and some parameter options have short-form aliases. Parameter names and aliases must be entered in lowercase.[a] 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.
Usage errors may suppress related template elements and may add the edited page to a maintenance category ( ). Error messages and maintenance notices 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 ( ).
Copy a blank version from the box above to use. Insert the "|" (pipe) character between each parameter. Delete unused parameters.[b]
Examples
[edit]No brackets [info]
{{lifespan |b=1975 |d=2015 |bkt=nb}}
- 1975–2015
Content label [info]
{{lifespan |b=1975 |d=2015 |l=lc}}
- (lifespan: 1975–2015)
Year prefixes [info]
{{lifespan |b=1975 |d=2015 |pfx=tt}}
- (b. 1975 – d. 2015)
Era suffix [info]
{{lifespan |b=1975 |d=2015 |sfx=ad}}
- (1975–2015 AD)
Era straddle [info]
{{lifespan |b=2015 |d=1975 |sfx=b-a}}
- (2015 BC – 1975 AD)
Circa birth-year with prefixes [info]
{{lifespan |b=1975 |d=2015 |pfx=tt |sfx=ad |ca=born}}
- (b. c. 1975 – d. 2015 AD)
Alternative birth-year [info]
{{lifespan |pfx=tt |b=1975 |d=2015 |or=born |b2=1980}}
- (b. 1975 or 1980 – d. 2015)
Alternative death-year [info]
{{lifespan |pfx=tt |b=1975 |d=2015 |or=died |d2=2020}}
- (b. 1975 – d. 2015 or 2020)
Ambiguous birth-year [info]
{{lifespan |d=2015 |b=uncertain}}
- (uncertain – 2015)
Unknown death-year [info]
{{lifespan |b=1975 |pfx=tt |d=unknown}}
- (b. 1975 – d. unknown)
Age component: age range [info]
{{lifespan |b=1975 |d=2015 |ar=y}}
- (1975–2015, aged 39–40 years)
Age component: age range with era straddle and age label [info]
{{lifespan |b=1975 |d=2015 |ar=y |al=dur |sfx=b-a}}
- (1975 BC – 2015 AD, duration 3989–3990 years)
Age component: age in years (death after birthday) with suffix [info]
{{lifespan |b=2015 |d=1975 |sfx=bc |ay=abd}}
- (2015–1975 BC, aged 40 years)
Age component: age in years (death before birthday) with suffix [info]
{{lifespan |b=2015 |d=1975 |sfx=bc |ay=bbd}}
- (2015–1975 BC, aged 39 years)
Complex example involving ranges with prefixes [info]
{{lifespan |b=1975 |d=2015 |or=both |b2=2020 |d2=2020 |pfx=nt |ar=y}}
- (b. 1975 or 2020 – d. 2015 or 2020, aged less than a year to 45 years)
Complex example with all parameters (select conditional parameters excluded programmatically)
{{lifespan |birth=1975 |birth2=1980 |death=2015 |death2=2020 |or=both |ca=both |suffix=ce |age-label=aged |age-range=y |label=uc |brackets=age |err=y }}
- Lifespan: c. 1975 or 1980 – c. 2015 or 2020 CE (aged c. 34 to 45 years)
Parameters
[edit]General notes
[edit]With the exception of parameters and options that indicate user preferences (such as presentation options or the decision to include the age component) all other input must be provided by sources acceptable to Wikipedia.
Dependent parameters and all parameter options are described under their prerequisites. Parameter options must be entered in lowercase.
Incorrect usage of some parameters may suppress display of related template elements; see parameter descriptions below, and § Errors and error messages.
Requirements and constraints
[edit]- Parameters birth (or its alias b) and death (or its alias d) are required.
- Parameters birth2 (alternative birth-year, alias b2) and death2 (alternative death-year, alias d2) depend on parameter or (birth and/or death is either of 2 years).
- Parameters birth and death must be the earliest birth-year and death-year respectively when parameter or is used.
- Parameter's birth year value must be earlier than any other date parameter's, but may be equal to the death-year (parameter death).
- Parameter's birth2 year value must be earlier or equal to the alternative death-year (parameter death2).
- Parameter's death2 year value must be later than any other other date parameter's, but may be equal to the alternative birth-year (parameter birth2).
- Parameters age-yrs (age in years, alias ay) and age-range (range of ages in years, alias ar) are mutually exclusive.
- Parameter age-yrs cannot be used with parameter or.
- Parameter age-label (label for the age component, alias al) requires parameter age-yrs or parameter age-range.
- Parameters label (content label, alias l) and prefix (birth/death prefixes, alias pfx) cannot be used concurrently.
Parameters and parameter options may have additional specific requirements, constraints and conditions.
Description
[edit]Date spans: birth- and death-year, alternative birth- and death-year
[edit]- birth, alias b: Required. Enter the subject's birth, start, or origin year numerically in full decimal notation according to century or millennium. Negative years are not allowed, however year 0 (zero) may be used when appropriate.[c] When this parameter is omitted or misspelled an error message is displayed and all other template output (except the brackets) is suppressed; [example]
- The parameter's year-value must be chronologically earlier than the year value of any other date parameter, however it may equal the death-year (parameter death);[d] [example]
- When the birth-year is ambiguous or unknown, one of the convenience options below may be used; they are incompatible with parameter ca (circa) when applied to the same date parameter. They are also incompatible with the age component. May require additional supporting information (WP:V).
- Options:
|birth=uncertain
– may be used when the birth-year is disputed, is one of three or more unique year-values proposed in acceptable sources, is not yet determined, or is estimated within a period longer than circa; [example]|birth=unknown
– may be used when the birth-year is unknown or cannot be determined; [example]
- Note: Any other input for this parameter produces an error message, see § Errors and error messages.
- death, alias d: Required. Enter the subject's death, end, or final year as described under parameter birth above; this parameter has identical requirements and options, but distinct numerical constraints: Its year value must be equal to or chronologically later than the birth-year (parameter birth) and also, chronologically earlier than the alternative death-year (see parameters or and death2); error messages are displayed otherwise, see examples under § Errors and error messages.
- birth2, alias b2: Optional alternative birth-year. Depends on parameter or, see there under Dependents.
- death2, alias d2: Optional alternative death-year, see birth2 above.
Approximate dates: "or" years, "circa" years
[edit]- or: Used for, and required by, the optional alternative birth- and/or death-year ( ). Select one of the following options; any other input is silently ignored. If error-handling parameter err is used, relevant error messages display when in error; [example]
- Options:
- Dependents:
- birth2, alias b2: Alternative birth-year, dependent on, and required when parameter
|or=born
or|or=both
. Enter valid year number in full decimal notation according to century or millennium – no other input is allowed. The year value must be chronologically later than parameter's birth/b; when parameter|or=both
it must be chronologically earlier or equal to parameter's death2. When in error, relevant messages are displayed; [example] - death2, alias d2: Alternative death-year, dependent on and required when parameter
|or=died
or|or=both
. Enter valid year number in full decimal notation according to century or millennium – no other input is allowed. The year value must be chronologically later than that of all other date parameters; when parameter|or=both
it may be equal to parameter's birth2. When in error, relevant messages are displayed.
- birth2, alias b2: Alternative birth-year, dependent on, and required when parameter
- Note: or is not compatible with, and suppresses age-component parameter age-yrs; [example]
- ca: Use for circa dates (years) and the resulting age or range. Inserts the abbreviation/tooltip combination "c." followed by a non-breaking thin space before the relevant year (the tooltip appears only in the first instance of circa, i.e once per transclusion). Requires valid all-numerical year values for the birth and death parameters. Cannot be specified for alternative years. This parameter is passed to the age component when it is included; if parameter 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 err is used messages display when in error; [example]
- Options:
Era suffix
[edit]- suffix, alias 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 death year(s). The implied default era is AD/CE across all dates. There is no specific handling of astronomical dates; by default the template displays identical date spans for BC–AD suffixes and BCE–CE suffixes.[c] Select one of the options below, any other input is silently ignored; if error handling parameter err is used, messages display when in error.
See Note below for an unhandled exception.
- Options:
|suffix=ad
or|suffix=ce
– set to explicitly state the default date span era as "AD" or "CE";[c] [example]|suffix=bc
or|suffix=bce
– set to display the date span era as "BC" or "BCE"; [example]|suffix=b-a
– 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"; [example]|suffix=b-c
– 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".[c]
- Note: Era straddles between birth years or between death years are not handled. For example, the span:
[ 10 BC or 5 AD – 10 AD ]
cannot be rendered by the template.
Age component
[edit]Optional, requires all date parameters to have valid, all-numerical year values. Consists of a text label and the mutually exclusive parameters age-range and age-yrs; when used the subject's final age or age range(s) is auto-calculated and displayed after the date span (or the suffix if any).[e] Parameter age-label may be used to edit the component's label, and preset presentation parameter brackets may be reset to enclose the component in parentheses; when used, parameter ca is passed to the component.
Preceding elements inserted: A comma ( , ) and single space, and the static text "aged" as the component's editable default label; if the brackets are reset around the age component (|brackets=age
) no comma is inserted. The trailing static text "years", preceded by a non-breaking space, 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. Astronomical dates are not supported.
See Note below for a class of cases not handled by the age component.
- age-label, alias al: Use to edit or remove the default label "aged". Requires one of parameters age-range or age-yrs. Select one of the options below; any other input is silently ignored. If error-handling parameter err is used relevant messages will be displayed when in error.
- Options:
- age-range, alias ar: Set
|age-range=y
to display the subject's age range(s) – any other input is ignored, or will produce an error message if error-handling parameter err is used. This parameter and parameter age-yrs are mutually exclusive; [example]
- Default range:
- Two numerical values, with the low value signifying that the death/end date occurred before the subject's birthday/startday on the death/end year. Values separated by an en dash ( – ). Applies when there are no alternative years; [example]
- Variations:
- When there are alternative years, and a singular 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 single non-breaking spaces; [example]
- 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; [example]
- Note: When the date span(s) have suffixes that straddle eras (BC-to-AD or BCE-to-CE) and alternative years, the age range(s) cannot be rendered by the template. For example, the following age range:
{{lifespan |b=10 |or=born |b2=5 |d=10 |sfx=b-a |ar=y}}
will not be calculated –
(10 or 5 BC – 10 AD, aged years)
- age-yrs, alias ay: Use when the subject's exact or circa age is known. Select the appropriate (per acceptable sources) option below; any other input is ignored, or will produce an error message if error-handling parameter err is used. Cannot be used with parameter or (and therefore alternative years). This parameter and parameter age-range are mutually exclusive; [example]
- Options:
Presentation: brackets, label and prefix
[edit]- brackets, alias bkt: Default parameter, preset to enclose the entire template output in brackets (parentheses) as its first and last visible elements. Options below may either override or explicitly state the preset; any other input is silently ignored.
- Options:
- label, alias l: Use to display the static text "lifespan: " (the term followed by colons and a single 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 prefix is used; non-valid input is also silently ignored. If error-handling parameter err is used, relevant messages are displayed when in error; [example]
- Options:
- prefix, alias pfx: Use to display the abbreviated prefixes "b." (born) and "d." (died) followed by a non-breaking thin space before the birth and death years, or before parameter ca (circa) if used. Select an option below; any other input is silently ignored. Use of this parameter suppresses parameter label. If error-handling parameter err is used, relevant error messages are displayed when in error; [example]
- Options:
Error message handling
[edit]- err: Set
|err=y
(any other input will generate an error message) to display all messages and notices produced by non-date optional-parameter errors and maintenance issues, including by this parameter. Intended mainly for testing and debugging purposes.[f] Handling of individual or per-parameter errors is not supported. Depending on the parameter(s) in error, using err may cause the relevant error message(s) to display after the brackets, but before any other template output ( ).
Errors and error messages
[edit]Error messages generated by date parameter errors (including alternative year parameter errors) are always displayed, and the edited page is added to Category:Template Lifespan errors. If either of parameters birth and death is absent, mislabeled, or empty the error is fatal and will suppress all other template output except the brackets.
Errors or maintenance issues related to non-date (non-year) optional parameters are silent by default; parameter err may be used to display the relevant messages and notices when in error, including messages and notices for err itself. Error messages display mostly in red text, maintenance notices in plain text;[f] [example]
Error conditions and/or error messages may suppress display of related template elements.
There is no error handling for individual, non-date optional parameters; error messages and notices display for all message-enabled optional parameters, or none.
Missing death-year [info]
{{lifespan |b=1975}}
Birth-year later than death-year (AD/CE) [info]
{{lifespan |b=2015 |d=1975}}
Birth-year later than death-year (BC/BCE) [info]
{{lifespan |b=1975 |d=2015 |sfx=bc}}
Birth-year later than alternative birth-year [info]
{{lifespan |b=1976 |b2=1975 |d=2015 |or=born}}
Missing alternative birth-year [info]
{{lifespan |b=1975 |d=2015 |or=born}}
Alternative year(s) require parameter or [info]
{{lifespan |b=1975 |b2=1985 |d=2015 |d2=2020}}
Examples – non-date parameters, error messages on
[edit]Parameter ca: Requires numerical year values [info]
{{lifespan |b=1975 |d=uncertain |ca=died |err=y}}
Parameter suffix: Non-valid input [info]
{{lifespan |b=1975 |d=2015 |sfx=none |err=y}}
Parameter suffix (notice): Year 0 without suffix [info]
{{lifespan |b=0 |d=2015 |err=y}}
Parameter label not compatible with parameter prefix [info]
{{lifespan |b=1975 |d=2015 |pfx=tt |l=lc |err=y}}
Age component: Non-valid input for parameter age-range [info]
{{lifespan |b=1975 |d=2015 |ar=full |err=y}}
Age component: Parameter age-yrs not compatible with parameters or and age-range [info]
{{lifespan |b=2016 |d=1975 |b2=2015 |pfx=tt |sfx=b-a |or=born |ay=bbd |ar=y |err=y}}
TemplateData
[edit]TemplateData for Lifespan
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 AD/CE era are respectively, the implied default calendar and editable default era. Astronomical dates are not specifically handled; negative years are not allowed, but year '0' (zero) may be used when appropriate. All date-related input must be provided by acceptable sources. For details and examples see the template's documentation. Default parameter list order reflects relative importance
Parameter | Description | Type | Status | |
---|---|---|---|---|
Birth/Start | birth b | The birth/start/origin year. Enter the full year numerically with all digits according to century or millennium; for ambiguous or unknown birth years select one of the list options
| String | required |
Death/End | death d | The death/end/final year. Enter the full year numerically with all digits according to century or millennium; for ambiguous or unknown death years select one of the list options
| String | required |
Era suffix | suffix sfx | Displays any of AD/BC/BCE/CE suffixes after the date span by selecting its option; implied default is AD/CE. Notations BC–AD and BCE–CE are functionally identical. For era straddles between birth and death years, select option 'b-a' (for a BC-to-AD straddle) or 'b-c' (for BCE-to-CE)
| String | optional |
Or | or | Required when using alternative birth and/or death years. Not compatible with 'Age (years)'. Must select the list option matching the alternative year(s)
| String | optional |
Alternative birth/start | birth2 b2 | Alternative birth-year. Requires parameter 'Or' with option 'born' or 'both'; must be chronologically later than 'Birth/Start'. Enter the full year numerically with all digits according to century or millennium | Date | optional |
Alternative death/end | death2 d2 | Alternative death-year. Requires parameter 'Or' with option 'died' or 'both'; must be chronologically later than 'Death/End'. Enter the full year numerically with all digits according to century or millennium | Date | optional |
Circa | ca | Use for circa birth and/or death years; passed to the age/range if present. Select the list option matching the circa year(s)
| String | optional |
Prefix | prefix pfx | Displays the abbreviated prefixes 'b.' and 'd.' before the birth and death years; suppresses 'Content label'. From the list, select 'tt' to add hovering tooltip text, or 'nt' for plain text (no tooltips)
| String | optional |
Age (years) | age-yrs ay | Auto-calculates and displays the subject's exact or circa age. Requires numerical year values. Cannot be used with 'Or' or 'Age (range)'. Select 'abd' if the death/end occured after the birthday/startday on the death year, 'bbd' otherwise
| String | optional |
Age (range) | age-range ar | Set to 'y' to display the subject's possible age range(s). Requires numerical year values. Cannot be used with 'Age (years)'. Certain rare cases involving era straddles and alternative years may not be rendered
| Boolean | optional |
Age label | age-label al | Label before the age or range, default is 'aged'. Requires either 'Age (years)' or 'Age (range)'. Select one of the list options ('nolabel' removes the age label)
| String | optional |
Content label | label l | Displays 'lifespan: ' as label for the template content; will not display when 'Prefix' is used. Select 'lc' for all-lowercase or 'uc' for initial-letter uppercase
| String | optional |
Brackets | brackets bkt | Parentheses, enclose the full output by default (preset to 'full'). Set to 'age' to display brackets around the age/range only; 'nb' removes brackets altogether
| String | optional |
Error message display | err | Set to 'y' to display all error messages and maintenance notices related to non-date parameters; may suppress display of error-related template elements
| Boolean | optional |
Footnotes
[edit]- ^ Temporary or place-holding parameters are not bound by the naming restrictions and may be undocumented.
- ^ Rudimentary description of the template's logic may be found in Template talk:Lifespan § Logic.
- ^ a b c d Year 0 (zero) does not exist in BC–AD eras and may be used with the CE suffix only (this suffix is implied and its explicit use is optional); if error messaging is on, related messages or maintenance notices display when in error. Astronomical date numbering may be user-adapted or attempted as an unsupported template application; BCE–CE suffixes may be used in lieu of negative dates, which will otherwise return an error.
- ^ When the subject's final age or duration is less than a year.
- ^ Template
{{age}}
is used to calculate ages and range(s). - ^ a b When the edited page contains a large number of {{lifespan}} transclusions with
|err=y
, a small performance cost may be incurred. - ^ Categories are suppressed in examples that would otherwise categorize this page.