Difference between revisions of "Birth date and age"
From DramaWiki
m |
m |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | <includeonly>{{{1|{{{year}}}}}}-{{MONTHABBREV|{{{2|{{{month}}}}}}}}-{{padleft:{{{3|{{{day}}}}}}|2|0}} (age {{age|{{{1|{{{year}}}}}}|{{{2|{{{month}}}}}}|{{{3|{{{day}}}}}}}})</includeonly><noinclude> | + | <includeonly>{{{1|{{{year}}}}}}-{{MONTHABBREV|{{{2|{{{month}}}}}}}}-{{padleft:{{{3|{{{day}}}}}}|2|0}} (age {{age|{{{1|{{{year}}}}}}|{{MONTHNUMBER|{{{2|{{{month}}}}}}}}|{{{3|{{{day}}}}}}}})</includeonly><noinclude> |
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 19:30, 21 December 2013
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.
