Template:CharacterAge: Difference between revisions

From FBSA Wiki
Jump to navigation Jump to search
m (1 revision imported)
(Fix to adjacent data (spurious newline messing up tables).)
 
Line 1: Line 1:
<includeonly>{{#ifexpr: {{CURRENTMONTH}} = {{{birthmonth|0}}} | {{#ifexpr: {{CURRENTDAY}} < {{{birthday|0}}} | {{#expr: {{CURRENTYEAR}} - 1 - {{{birthyear|0}}}}} | {{#expr: {{CURRENTYEAR}} - {{{birthyear|0}}}}} }} | {{#ifexpr: {{CURRENTMONTH}} < {{{birthmonth|0}}} | {{#expr: {{CURRENTYEAR}} - 1 - {{{birthyear|0}}}}} | {{#expr: {{CURRENTYEAR}} - {{{birthyear|0}}}}} }} }}</includeonly>
<includeonly>{{#ifexpr: {{CURRENTMONTH}} = {{{birthmonth|0}}} | {{#ifexpr: {{CURRENTDAY}} < {{{birthday|0}}} | {{#expr: {{CURRENTYEAR}} - 1 - {{{birthyear|0}}}}} | {{#expr: {{CURRENTYEAR}} - {{{birthyear|0}}}}} }} | {{#ifexpr: {{CURRENTMONTH}} < {{{birthmonth|0}}} | {{#expr: {{CURRENTYEAR}} - 1 - {{{birthyear|0}}}}} | {{#expr: {{CURRENTYEAR}} - {{{birthyear|0}}}}} }} }}</includeonly><noinclude>This automatically calculates you character's age and keeps it up-to-date as time passes.
<noinclude>This automatically calculates you character's age and keeps it up-to-date as time passes.


Simply add the following to the age field of your character boxes:
Simply add the following to the age field of your character boxes:

Latest revision as of 23:00, 21 November 2020

This automatically calculates you character's age and keeps it up-to-date as time passes.

Simply add the following to the age field of your character boxes:

{{CharacterAge | birthday = XX | birthmonth = XX | birthyear = XXXX}}

...and replace the XXs with the relevant numbers. For "birthday" and "birthmonth", try to keep these in a 2-digit format. For the "birthyear" write out the full year (usually 4 digits), and characters who are older than Christ will have a minus number, and that works too.

All credit to Crazy Dragon