Minecraft Wiki
Advertisement
This is the documentation page. It should be transcluded into the main template page. See Template:Documentation for more information

This template returns the number of full years between two specified dates. If the second set of parameters is not included, it will return the number of full years between a specified date and today's date.

Syntax:
{{age|year1|month1|day1|year2|month2|day2}} or
{{age|year1|month1|day1}}
Examples:
{{age|2000|1|1|2020|12|31}} returns "20"
{{age|2000|1|1}} returns "23"
When using this template to calculate an age with a known end date, please substitute it into the page.
Example: {{subst:age|2009|05|17|2011|11|18}} to return "2"
Note:
This template does not check for incorrect input:
{{age|2000|0|100|2020|0|233}} returns "20" (surplus days do not count as extra months)
{{age|2000|-1|0|2020|88|0}} returns "20" (surplus months do not count as extra years)

See also

Advertisement