Template:Age: Difference between revisions
From Inkipedia, the Splatoon wiki
(changed category to Inline Templates) |
(clarified examples to better display usage of the template) |
||
Line 30: | Line 30: | ||
=== Examples === | === Examples === | ||
<code><nowiki>{{Age|2015|5|28}}</nowiki></code> → {{S}} is {{Age|2015|5|28}} years old. | {{S}} is <code><nowiki>{{Age|2015|5|28}}</nowiki></code> years old. → {{S}} is {{Age|2015|5|28}} years old. | ||
<code><nowiki>{{Age|2015|8|5|2017|9|30}}</nowiki></code> → The first [[Splatnet]] existed for {{Age|2015|8|5|2017|9|30}} years. | The first [[Splatnet]] existed for <code><nowiki>{{Age|2015|8|5|2017|9|30}}</nowiki></code> years. → The first [[Splatnet]] existed for {{Age|2015|8|5|2017|9|30}} years. | ||
[[Category:Inline templates]]</noinclude> | [[Category:Inline templates]]</noinclude> |
Revision as of 19:15, 2 July 2023
A template that automatically calculates people's age based on their date of birth, or other lengths of time in years.
Usage
{{Age|<year>|<month>|<day>|<death_year>|<death_month>|<death_day>}}
Parameters
All the parameters must be numbers for the expression to work.
year |
Unnamed, required. | The year the person was born in. |
category |
Unnamed, required. | The month the person was born in. |
day |
Unnamed, required. | The number of the day the person was born on. |
death_year |
Unnamed, optional. | If included, will replace the current year. |
death_month |
Unnamed, optional. | If included, will replace the current month's number. |
death_day |
Unnamed, optional. | If included, will replace the current day's number. |
Examples
Splatoon is {{Age|2015|5|28}}
years old. → Splatoon is 8 years old.
The first Splatnet existed for {{Age|2015|8|5|2017|9|30}}
years. → The first Splatnet existed for 2 years.