Difference between revisions of "Template:Age"
Jump to navigation
Jump to search
m (Removed protection from "Template:Age": as requested) |
(explaining usage) |
||
| Line 1: | Line 1: | ||
<includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude> | <includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude> | ||
| − | + | This template allows the displayof a person's current calculated age. It will always be up to date, because it's calculated by the server based on the year, month and day of their birth. This can be especially useful in biographical articles. | |
| + | |||
| + | ==Documentation== | ||
| + | Usage of this template is fairly straightforward. It takes in three required numerical parameters: year, month, and day, in that order.<br /> | ||
| + | <code>'''<nowiki>{{age|YYYY|MM|DD}}</nowiki>'''</code> | ||
| + | |||
| + | For example, the birth date of June 12, 1986 would be entered as <code><nowiki>{{age|1986|06|12}}</nowiki></code> | ||
[[Category:Navigation box]] | [[Category:Navigation box]] | ||
</noinclude> | </noinclude> | ||
Revision as of 02:52, April 28, 2017
This template allows the displayof a person's current calculated age. It will always be up to date, because it's calculated by the server based on the year, month and day of their birth. This can be especially useful in biographical articles.
Documentation
Usage of this template is fairly straightforward. It takes in three required numerical parameters: year, month, and day, in that order.
{{age|YYYY|MM|DD}}
For example, the birth date of June 12, 1986 would be entered as {{age|1986|06|12}}