{{Lifetime}} is for automatically generating all 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.

{{Lifetime|year of birth|year of death|sort key}}

will generate:

{{DEFAULTSORT:sort key}}
[[หมวดหมู่:บุคคลที่เกิดในปี พ.ศ. BIRTH +543]]
[[หมวดหมู่:บุคคลที่เสียชีวิตในปี พ.ศ. DEATH +543]]

Other cases are handled with options, see below. As with the original, the embedded magic word DEFAULTSORT also applies to all categories on the page, nomatter whether the lifetime template is before or after them.

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

{{subst:Lifetime|year of birth|year of death|sort key|subst=subst:}}

Since Categories are preferred to be listed in most-common order, the Lifetime template should generally be placed after the last Category tag, for example:

{{Lifetime|year of birth|year of death|sort key}}