Difference between revisions of "Template:Age"

From ShadowHaven Reloaded
Jump to navigation Jump to search
Tag: visualeditor-wikitext
Tag: visualeditor-wikitext
Line 1: Line 1:
{{#expr: {{#time:Y |now + 61 years}} - {{{Year}}} - {{#ifexpr: {{#time:m |now + 61 years}} < {{{Month}}} | 1 |  {{#ifexpr: {{#time:m |now + 61 years}} > {{{Month}}} | 0 |  {{#ifexpr: {{#time:d |now + 61 years}} < {{{Day}}} | 1 | 0 }} }} }} }}
{{#expr: {{#time:Y |now + 61 years}} - {{{Year}}} - {{#ifexpr: {{#time:m |now + 61 years}} < {{{Month}}} | 1 |  {{#ifexpr: {{#time:m |now + 61 years}} > {{{Month}}} | 0 |  {{#ifexpr: {{#time:d |now + 61 years}} < {{{Day}}} | 1 | 0 }} }} }} }}
<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"
|-
|
==Usage==
This 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:
* Month must be the month in number format.
* Year must be the full, 4 digit year.
So, if you enter this:
<pre>
{{Age|
|Month=9
|Day=29
|Year=2060
|}}
</pre>
The template will return the current age of {{Age|
|Month=9
|Day=29
|Year=2060
|}}
[[Category:Templates]]
[[Category:Character Page Templates]]
[[Category:Contact Templates]]
|}
</noinclude>

Revision as of 04:04, 18 March 2020

Expression error: Unrecognized punctuation character "{".


Usage

This 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:

  • Month must be the month in number format.
  • Year must be the full, 4 digit year.

So, if you enter this:

{{Age|
|Month=9
|Day=29
|Year=2060
|}}

The template will return the current age of 24