Template:Age: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
(Undo revision 3895513 by Windy (talk) Considering this template is used for ages, the older dates are closer to what you're going to be seeing it used for most of the time)
Tag: Undo
m (Changed protection settings for "Template:Age": being in your 30's is actually cool and good ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(No difference)

Revision as of 16:25, April 19, 2023

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

Syntax:
{{age|date1|date2}} or
{{age|date1}}
Examples:
{{age|July 7, 1989|July 14, 2003}} returns "14"
{{age|July 7, 1989}} returns "35"
The full range of possible date formats is based on php's strtotime() function and is explained here, but for simplicity it's usually best to just stick to the format above.
{{age|July 7 1989}} returns "35"
{{age|7 July 1989}} returns "35"
{{age|1989-7-23}} returns "35"
Note:
This template does not check for incorrect input.