Actions

Template

Birth date and age/doc

From DramaWiki

< Template:Birth date and age
Revision as of 16:25, 6 February 2013 by MoerkJ (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a documentation subpage for Template:Birth date and age.

The {{birth date and age}} template will return a person's date of birth and his/her calculated age. It has the shortcut {{bda}}.

This template is intended for living persons only. In the rare case that a living person's birth date is given in a non-Gregorian calendar this template should not be used.

Usage

To display a birth date with calculated age use:

{{birth date and age|year of birth|month of birth|day of birth}}

or the shortcut:

{{bda|year of birth|month of birth|day of birth}}

The parameters for year (1) and day (3) are numerical. The second parameter, for the month, can be numerical or passed as a string. The month name is case insensitive and may be abbreviated. The parameter names 'year', 'month', and 'day' can be used instead of the first, second, and third parameters.

Examples:

using default parameters for year/month/day

{{birth date and age|1983|1|4}} returns "1983-Jan-04 (age 43)"
{{birth date and age|1983|01|04}} returns "1983-Jan-04 (age 43)"
{{birth date and age|1983|Jan|04}} returns "1983-Jan-04 (age 43)"
{{birth date and age|1983|January|4}} returns "1983-Jan-04 (age 43)"

using named parameters

{{birth date and age|day=4|month=1|year=1983}} returns "1983-Jan-04 (age 43)"
{{birth date and age|month=January|day=4|year=1983}} returns "1983-Jan-04 (age 43)"

See also

This template was derived from Wikipedia, but this is a less complex version which takes no additional parameters.