User:Michael Bednarek/Birth death age yd 3 columns
User:Michael Bednarek/Birth death age yd 3 columns takes dates of birth and death and outputs those dates and the computed age in years and days in three fields, separated by |separator=
. The age is computed by {{Age in years and days}}. The template is meant for age-related lists and tables.
If no |separator=
is specified, "||style="text-align:right;"| will be used. The first character of the separator will be omitted from its first use.
Example: {{User:Michael Bednarek/Birth death age yd 3 columns | 23 August 1952 | 12 July 2013}} will produce "|style="text-align:right;"|27 January 1756||style="text-align:right;"|5 December 1791||style="text-align:right;"|35 years, 312 days" or, in a table:
Name | Born | Died | Age |
---|---|---|---|
Giovanni Battista Pergolesi | 4 January 1710 | 16 March 1736 | 26 years, 72 days |
W. A. Mozart | 27 January 1756 | 5 December 1791 | 35 years, 312 days |
Franz Schubert | 31 January 1797 | 19 November 1828 | 31 years, 293 days |
Lili Boulanger | 21 August 1893 | 15 March 1918 | 24 years, 206 days |
In a list:
- Giovanni Battista Pergolesi: 4 January 1710, 16 March 1736, 26 years, 72 days
- W. A. Mozart: 27 January 1756, 5 December 1791, 35 years, 312 days
- Franz Schubert: 31 January 1797, 19 November 1828, 31 years, 293 days
- Lili Boulanger: 21 August 1893, 15 March 1918, 24 years, 206 days
Category:Templates generating microformat date and age Category:Date mathematics templates