Difference between revisions of "Template:Age/doc"
Jump to navigation
Jump to search
(New page: === Use === This template calculates the current age of a person, if date of birth is known. It depends on {{templink|curfutyear}} to get the current ''Futurama'' year. === Usage === <pr...) |
m (→Examples) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
=== Usage === | === Usage === | ||
<pre>{{age|<year>|<month>|<day>}}</pre> | 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. | ||
<pre>{{age[|<year>[|<month>[|<day>]]]}}</pre> | |||
=== Examples === | === Examples === | ||
;Input | ;Input | ||
:<pre>{{age| | :<pre>{{age}}</pre> | ||
;Output | |||
:{{age}} | |||
;Input | |||
:<pre>{{age|2990}}</pre> | |||
;Output | |||
:{{age|2990}} | |||
;Input | |||
:<pre>{{age|2995|5}}</pre> | |||
;Output | ;Output | ||
:{{age| | :{{age|2995|5}} | ||
;Input | ;Input | ||
:<pre>{{age|2998|2|4}}</pre> | :<pre>{{age|2998|2|4}}</pre> | ||
;Output | ;Output | ||
:{{age|2998|2|4}} | :{{age|2998|2|4}} | ||
;Input | |||
:<pre>{{age|1975|10|8}}</pre> | |||
;Output | |||
:{{age|1975|10|8}} |
Latest revision as of 14:19, 16 April 2009
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