Difference between revisions of "Birth date and age/doc"
From DramaWiki
< Template:Birth date and agem |
|||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | {{ | + | {{documentation subpage}} |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | The '''{{tl|birth date and age}}''' template will return a person's date of birth and his/her calculated age. It has the shortcut '''{{tl|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: | ||
| − | + | :<code><nowiki>{{birth date and age|year of birth|month of birth|day of birth}}</nowiki></code> | |
| − | :<code><nowiki>{{ | ||
| − | + | or the shortcut: | |
| − | + | :<code><nowiki>{{bda|year of birth|month of birth|day of birth}}</nowiki></code> | |
| − | :<code><nowiki>{{ | ||
| − | + | 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. | |
| − | :<code><nowiki>{{ | + | ;Examples<nowiki>:</nowiki> |
| − | :<code><nowiki>{{ | + | using default parameters for year/month/day |
| − | :<code><nowiki>{{ | + | :<code><nowiki>{{birth date and age|1983|1|4}}</nowiki></code> returns "{{birth date and age|1983|1|4}}" |
| − | :<code><nowiki>{{ | + | :<code><nowiki>{{birth date and age|1983|01|04}}</nowiki></code> returns "{{birth date and age|1983|01|04}}" |
| + | :<code><nowiki>{{birth date and age|1983|Jan|04}}</nowiki></code> returns "{{birth date and age|1983|Jan|04}}" | ||
| + | :<code><nowiki>{{birth date and age|1983|January|4}}</nowiki></code> returns "{{birth date and age|1983|January|4}}" | ||
| − | === | + | using named parameters |
| − | + | :<code><nowiki>{{birth date and age|day=4|month=1|year=1983}}</nowiki></code> returns "{{birth date and age|day=4|month=1|year=1983}}" | |
| + | :<code><nowiki>{{birth date and age|month=January|day=4|year=1983}}</nowiki></code> returns "{{birth date and age|month=January|day=4|year=1983}}" | ||
| − | + | ==See also== | |
| + | This template was derived from [[Wikipedia:Template:Birth date and age|Wikipedia]], but this is a less complex version which takes no additional parameters. | ||
| − | + | <includeonly> | |
| − | + | [[Category:Date Templates]] | |
| − | + | </includeonly> | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Latest revision as of 16:25, 6 February 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.
