Difference between revisions of "Template:Age"

From Crystal Path
Jump to navigationJump to search
(Created page with '<includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</incl…')
 
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude>
+
<includeonly>
 +
{{#if:{{{BYear|}}}|{{#expr:({{{CYear|}}})-({{#if:{{{BYear|}}}|{{{BYear}}}|0}})-(({{{CMonth|}}})<({{#if:{{{BMonth|}}}|{{{BMonth}}}|0}})or({{{CMonth|}}})=({{#if:{{{BMonth|}}}|{{{BMonth}}}|0}})and({{{CDay|}}})<({{#if:{{{BDay|}}}|{{{BDay}}}|0}}))}}|Unknown}}
 +
</includeonly>
 +
<noinclude>
 +
==Usage==
 +
<pre>
 +
{{Age|BYear=|BMonth=|BDay=|CYear=|CMonth=|CDay=}}
 +
</pre>
 +
'''BYear''', '''BMonth''', and '''BDay''' are used to signify a character's birth year, month, and day, respectively. '''CYear''', '''CMonth''', and '''CDay''' are used to represent the current date up to the '''end''' of the respective Realm story.
 +
 
 +
'''Example:'''
 +
<pre>
 +
{{Age|BYear=2132|BMonth=7|BDay=26|CYear=2153|CMonth=1|CDay=1}}
 +
</pre>
 +
The output from the above will display the following: {{Age|BYear=2132|BMonth=7|BDay=26|CYear=2153|CMonth=1|CDay=1}}
 
</noinclude>
 
</noinclude>

Latest revision as of 15:25, 15 April 2011


Usage

{{Age|BYear=|BMonth=|BDay=|CYear=|CMonth=|CDay=}}

BYear, BMonth, and BDay are used to signify a character's birth year, month, and day, respectively. CYear, CMonth, and CDay are used to represent the current date up to the end of the respective Realm story.

Example:

{{Age|BYear=2132|BMonth=7|BDay=26|CYear=2153|CMonth=1|CDay=1}}

The output from the above will display the following: 20