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}}} | 1 |  {{#ifexpr: {{#time:m |now + 61 years}} > {{{Month|1}}} | 0 |  {{#ifexpr: {{#time:d |now + 61 years}} < {{{Day|1}}} | 1 | 0 }} }} }} }}


<noinclude>
<noinclude>

Revision as of 00:52, 19 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 25