Template:Lifespan
(1974–2014)
This template may be used to display a person's or entity's lifespan in years, and optionally their age, also in years. Additional options handle ambiguous dates, or affect presentation; error messaging is available for some usage errors.
Usage
Listed by importance |
Syntax and presentation
For basic use, only the birth and death dates (in years) are required. Years must be entered with all digits (1 to 4 depending on century). The template default is to render AD/CE era spans; BC/BCE lifespans as well as spans straddling eras may be optionally rendered.
Depending on the parameters used, default presentation and formatting elements including static text, white space and additional punctuation may be displayed.
All parameter names must be in lowercase; optional parameters are ignored when they are misspelled or unrecognized. Dependent and conditional parameters are ignored if their prerequisite parameter(s) or conditions are absent.
Copy a blank version from the box above to use. Insert the "|" (pipe) character between each parameter. Delete unused parameters.
The template's output is enclosed in parentheses by default; they may be removed, or may be used to enclose the optional age component only.
See § Parameters for important details.
Parameters
Requirements and constraints
- Parameters birth (or its alias b) and death (or its alias d) are required.
- Parameters label (content label, alias l) and prefix (birth/death prefixes, alias pfx) cannot be used concurrently.
- Parameters birth2 (alias b2) and death2 (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 birth must be a lower absolute number than each of parameters death and death2 (alias d2) when there is no parameter suffix (era suffixes, alias sfx) or when the suffix is AD or CE across all dates.
- Parameter birth must be a higher absolute number than each of parameters death and death2 when the suffix is BC or BCE across all dates.
- Parameter birth2 (alias b2) must be a lower absolute number than at least one of parameters death and death2 (alias d2) when there is no parameter suffix or when the suffix is AD or CE across all dates.
- Parameter birth2 must be a higher absolute number than at least one of parameters death and death2 when the suffix is BC or BCE across all dates.
- Parameter yrs (age in years) depends on parameter age-range (range of ages in years, alias ar).
- Parameters or and yrs cannot be used concurrently.
Parameter options
- birth/b and death/d: (a full year) "uncertain" "unknown"
- brackets/bkt (parentheses, on by default): "ar" (around age-range only) "nb" (no brackets anywhere)
- label/l (content label "lifespan"): "lc" (all lower-case) "uc" (upper-case initial)
- prefix/pfx: "y"
- ca (circa): "born" "died" "both"
- or: "born" "died" "both"
- birth2/b2 and death2/d2: (a full year)
- suffix/sfx: "b-a" (BC/AD) "b-c" (BCE/CE) "ad" "bc" "bce" "ce"
- age-range (age-range in years and its label): "aged" "nolabel"/"nl"
- yrs (age in years): "abd" (death occured after birthday on death-year) "bbd" (death occured before birthday on death-year)
- err (display all optional-parameter error messages): "y"
Examples
(lifespan: 1974–2014)
(b. 9 – d. 91, aged 82 years)
(lifespan: 9–91, aged 81 years)
1974–2014
(b. c. 1974 BC – d. c. 2014 AD)
(b. 1974 or 1975 – d. 2014 or 2015 AD, aged 38 to 41 years)
(b. 91 or 92 – d. 1 or 2 BC, aged 88 to 91 years)
(b. 250 or 251 – d. 175 BC, 74 to 76 years)
(b. 250 – d. 174 or 175 BC, 74 to 76 years)
(1974 or 2019 – 2014 or 2019, aged −5 to 45 years) [tentative – example case under review]
(1974–2014, aged 39–40 years)
(c. 1974 – c. 2014 AD)
c. 1974 – c. 2014
(c. 1974 – 2014 AD)
(1974 – c. 2014 AD)
(c. 1974 – 2014 AD)
b. 1974 – d. 2014, 39–40 years
b. 1974 BC – d. 2014 AD (aged 3987–3988 years)
b. 1974 BC – d. 2014 AD (3988 years)
b. c. 1974 BCE – d. c. 2014 CE (c. 3988 years)
b. 1974 BC – d. 2014 AD, aged 3987 years
Lifespan: c. 1974 BCE – c. 2014 CE (aged c. 3987–3988 years)
(1974 – uncertain)
(unknown – c. 2014)
Error examples
(– ! {{lifespan}}
: Parameter death/d – is missing, mislabeled, has no value or invalid value [info] !)
( ! {{lifespan}}
: Parameter birth/b is missing, mislabeled, has no value or invalid value [info] !{{{b}}}–)
(1974 ! {{lifespan}}
: Parameter or requires parameter birth2/b2 [info] ! – 2014)
(1974–2014, ! {{lifespan}}
: Parameter age-range/ar has invalid value [info] !39–40 years)
(1975 or 1974 ! {{lifespan}}
: Parameters birth/b, birth2/b2: Please assign the later birth-year to parameter birth2/b2 [info] ! – 2014)
(– ! {{lifespan}}
: Parameter death/d – is missing, mislabeled, has no value or invalid value [info] ! ! {{lifespan}}
: Parameter death2/d2 requires parameter or [info] !)
(1974 ! {{lifespan}}
: Parameter birth2/b2 requires parameter or [info] !–1979 ! {{lifespan}}
: Parameter death2/d2 requires parameter or [info] !)
( ! {{lifespan}}
: Parameter label cannot be used with parameter prefix [info] !b. c. 1974 BC – d. c. 2014 AD)
(b. 1974 BC – d. 2014 AD ! {{lifespan}}
: Parameter yrs requires parameter age-range/ar [info] !)
(b. 1974 or 1975 BC – d. 2014 AD, 3988 to 3988 ! {{lifespan}}
: Parameter yrs cannot be used with parameter or [info] ! years)
(c. 1974 – c. 2014 ! {{lifespan}}
: Parameter suffix/sfx has invalid value [info] !)
(b. c. 1974 BC – d. c. 2014 ! {{lifespan}}
: Parameter or requires parameter death2/d2 [info] ! AD)
b. ! {{lifespan}}
: Parameter birth/b is missing, mislabeled, has no value or invalid value [info] !{{{b}}} BCE – d. c. CE (Expression error: Unexpected < operator)