Difference between revisions of "Template:Age"
Jump to navigation
Jump to search
(New page: <includeonly>{{#expr:{{curfutyear}}-{{{1|3000}}}-{{#ifexpr:{{{2|4}}}<={{CURRENTMONTH}}|{{#ifexpr:{{{2|4}}}={{CURRENTMONTH}}|{{#expr:{{{3|10}}}<={{CURRENTDAY}}|0|1}}|0}}|1}}}}<includeonly><...) |
m (Protected "Template:Age": High traffic page ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))) |
||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#expr:{{curfutyear}}-{{{1| | <includeonly>{{#expr:{{curfutyear}}-{{{1|{{CURRENTYEAR}}}}}-{{#ifexpr:{{{2|0}}}<={{CURRENTMONTH}}|{{#ifexpr:{{{2|0}}}={{CURRENTMONTH}}|{{#ifexpr:{{{3|0}}}<={{CURRENTDAY}}|0|1}}|0}}|1}}}}</includeonly><noinclude>{{documentation}}</noinclude> |
Latest revision as of 01:15, 6 June 2012
Documentation for {{age}}
Use
This template calculates the current age of a person, if date of birth is known. It depends on {{curfutyear}} to get the current Futurama year.
Usage
Each parameter is optional, if day is not supplied, null will be assumed, if month is not supplied, null will be assumed, if year is not supplied, the current year (not Futurama year) is assumed.
{{age[|<year>[|<month>[|<day>]]]}}
Examples
- Input
{{age}}
- Output
- 1000
- Input
{{age|2990}}
- Output
- 34
- Input
{{age|2995|5}}
- Output
- 29
- Input
{{age|2998|2|4}}
- Output
- 26
- Input
{{age|1975|10|8}}
- Output
- 1048