Template:Lifetime/doc

  is a shortcut to generate birth and death categories and DEFAULTSORT. Automatic bots regularly replace it with the expanded form, but editors can still use lifetime to save on typing. As an alternative -even less typing - the subst: only   can be used as 1901, adding the expanded form directly to the article.

This template can be substituted.

Usage
  is for quickly generating category tags related to birth and death years, including living people and missing or unknown values. The general DEFAULTSORT can be embedded as well. It should not be used to replace existing DEFAULTSORT and/or category tags.



or

will generate:



Other cases are handled with options. The embedded magic word DEFAULTSORT applies to all categories on the page, no matter whether the lifetime template is before or after them.

This template supports substitution. If you want to substitute it, use the following syntax:



or

Since the  should occur before the categories, the Lifetime template should generally be placed before the first Category tag, for example:



Options
For each option, the default value is displayed in bold and automatically assumed if the field is left blank.

Please note that MISSING results in Categories that are not displayed on the page.


 * 1 (birth)
 * MISSING : when year seems possible to be found.
 * Category:Year of birth missing or Category:Year of birth missing (living people)
 * year of birth : such as "1899" or known approximations such as "the 1890s" or "the 19th century" (note the "the").
 * Category:Born in 1899 or Category:Born in the 1890s or Category:Born in the 19th century


 * 2 (death)
 * LIVING : living or assumed living people.
 * Category:Living people
 * MISSING : believed dead and year seems possible to be found.
 * Category:Year of death missing
 * year of death : such as "1986" or known approximations such as "the 1980s" or "the 20th century" (note the "the").
 * Category:Died in 1986 or Category:Died in the 1980s or Category:Died in the 20th century


 * 3 (sortkey)
 *   : should not be left blank even if it is the same as the page name - only if you don't know what it should be.
 * Asian name, Honorific prefix (qualifier suffix) : for assertion of sortkey assessment.
 * "Mao, Zedong" - "Kim, Il-sung" - "Matsuo Bashō|Matsuo, Basho" - "Nu, U" - "Wang, Li (politician)"
 * Family name, Given name, Honorific-prefix (qualifier suffix) : for proper sorting.
 * "Newton, Isaac, Sir" - "Karlsson, Ove (sports journalist)"

Most values are case-insensitive ("LIVING" or "LiVinG" work the same), except when it matters (such as century names).

Examples

 * For a living person

or

will replace:


 * For a missing birth and living person

or

will replace:


 * For a dead person

will replace:


 * Etc.

Technical
Before changing the template's code or text, please bear in mind:


 * The extra bars in the switch statements are for empty values.
 * Extra whitespace around years doesn't matter, because page titles are not sensitive to extra spaces.

The template provides a local sandbox and testcases for developing and testing changes (see documentation's hat-note).