Difference between revisions of "Age"
From Sonic Retro
(Created page with "<includeonly>{{#if: {{{2|}}} | {{#vardefine:date2_y|{{year|{{{2}}}}}}}{{#vardefine:date2_m|{{month|{{{2}}}}}}}{{#vardefine:date2_d|{{#explode:{{{2}}}|-|2}}}} | {{#vardefine:da...") |
BSonirachi (talk | contribs) m (Text replacement - "Category:Sonic Retro templates" to "Category:Templates") |
||
Line 35: | Line 35: | ||
{{age|1991-06-23|1999-09-09}} | {{age|1991-06-23|1999-09-09}} | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 19:20, 1 January 2022
Convert a date in the format YYYY-MM-DD to an age in years (based on the current date).
Usage
{{age|1991-06-23}}
returns
32
Optional parameter
Add a second date to calculate the age on that date.
{{age|1991-06-23|1999-09-09}}
returns
8