Difference between revisions of "Template:Age"
Jump to navigation
Jump to search
(→Usage) Tag: visualeditor-wikitext |
Tag: visualeditor-wikitext |
||
| Line 1: | Line 1: | ||
{{#if: {{{Year}}} | {{#expr: {{#time:Y |now + 61 years}} - {{{Year}}} - {{#ifexpr: {{#time:m |now + 61 years}} < {{{Month|1}}} | 1 | {{#ifexpr: {{#time:m |now + 61 years}} > {{{Month|1}}} | 0 | {{#ifexpr: {{#time:d |now + 61 years}} < {{{Day|1}}} | 1 | 0 }} }} }} }} }} | <includeonly>{{#if: {{{Year}}} | {{#expr: {{#time:Y |now + 61 years}} - {{{Year}}} - {{#ifexpr: {{#time:m |now + 61 years}} < {{{Month|1}}} | 1 | {{#ifexpr: {{#time:m |now + 61 years}} > {{{Month|1}}} | 0 | {{#ifexpr: {{#time:d |now + 61 years}} < {{{Day|1}}} | 1 | 0 }} }} }} }} }} | ||
</includeonly> | |||
<noinclude> | <noinclude> | ||
{| cellpadding=5 cellspacing=0 style="border: black 2px solid; width: 100%; -moz-border-radius: 20px; -webkit-border-radius: 25px; border-radius: 25px; background-color: #DDD" | {| cellpadding=5 cellspacing=0 style="border: black 2px solid; width: 100%; -moz-border-radius: 20px; -webkit-border-radius: 25px; border-radius: 25px; background-color: #DDD" | ||
Revision as of 01:43, 19 March 2020
UsageThis template allows you to put in a character's date of birth, and it will automatically calculate their age based on the current in-game date. The following requirements apply:
So, if you enter this: {{Age|
|Month=9
|Day=29
|Year=2060
|}}
The template will return the current age of 26 |