Plantilla:Age
Ir a la navegación
Ir a la búsqueda
Documentation The documentation below is transcluded from Plantilla:Age/doc. (edit | history)
[purge]
This template is used to display the difference between two dates in years. It is mainly used to display an automatically updated number of years that have passed since a certain date, for instance, in the
parameter of age
{{user infobox}}
template calls.
Usage
{{ age | <year (older date)> | <month (older date)> | <day (older date)> | <year (newer date)> (optional) | <month (newer date)> (optional) | <day (newer date)> (optional) }}
- First, second, and third unnamed parameters
The older of the two dates to compare. For the age of a user, for instance, this would be the user's birthday.
- Fourth, fifth, and sixth unnamed parameters
The newer of the two dates to compare. This defaults to the current date (2024|09|08
).
Notes
- All number may omit leading zeros.
- If the "older date" is actually the newer one, the template will display a negative number.
Examples
Code | Result |
---|---|
{{age|1983|11|12}} |
40 |
{{age|1983|11|12 | 2011|05|16}} |
27 |
{{age|2015|06|30}} |
9 |
{{age|2015|06|30 | 2016|06|29}} |
0 |
{{age|2034|09|08}} |
-10 |