Help us get to over 8,769 articles in 2026.

If you know of a magician not listed in MagicPedia, start a New Biography for them. Contact us at magicpediahelp@gmail.com

Template:Age2: Difference between revisions

From Magicpedia, the free online encyclopedia for magicians by magicians.
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<includeonly>
<includeonly>{{#expr:({{{3|{{CURRENTYEAR}}}}})-({{{1}}})-(({{#if:{{MONTHNUMBER|{{#explode:{{{2}}}| |0}}}}|{{MONTHNUMBER|{{#explode:{{{2}}}| |0}}}}|{{CURRENTMONTH}}}})<({{MONTHNUMBER|{{#explode:{{{2}}}| |0}}}})or(
 
{{#if:{{MONTHNUMBER|{{#explode:{{{4}}}| |0}}}}|{{MONTHNUMBER|{{#explode:{{{4}}}| |0}}}}|{{CURRENTMONTH}} }}
 
)=({{MONTHNUMBER|{{#explode:{{{2}}}| |0}}}})and
({{#if:{{#explode:{{#explode:{{{4}}}| |1}}|,|0}} |{{#explode:{{#explode:{{{4}}}| |1}}|,|0}}    |{{CURRENTDAY}}}})
<({{#explode:{{#explode:{{{2}}}| |1}}|,|0}}))}}</includeonly>
 
 




Line 5: Line 13:
Month name = {{#explode:{{{2}}}| |0}}
Month name = {{#explode:{{{2}}}| |0}}


Month number = {{MONTHNUMBER|{{#explode:{{{2}}}| |0}} }}
Month number = {{MONTHNUMBER|{{#explode:{{{2}}}| |0}}}}


day = {{ {{#explode:{{#explode:{{{2}}}| |1}}|,|0}}
day =   {{#explode:{{#explode:{{{2}}}| |1}}|,|0}}


{{#expr:(
{{#expr:(

Revision as of 20:05, 17 May 2012



Month = {{{2}}} Month name = {{{2}}}

Month number = Expression error: Unrecognized punctuation character "{".

day =

Expression error: Unrecognized punctuation character "{".</includeonly>



This template returns the number of full years between two specified dates. If the second set of parameters is not included, it will return the number of full years between a specified date and today's date. Syntax:

  {{age2|year1|month1 day1|year2|month2 day2}} or
    {{age2|year1|month1 day1}}

Examples:

   {{age2|1989|July 23,|2003|7|14}} returns "13



Month = July 23, Month name = July

Month number = 7

day = 23

Expression error: Unrecognized word "july"."

   {{age2|1989|July 23}} returns "Expression error: Unexpected < operator.



Month = 7 Month name = 7

Month number = 7

day =

Expression error: Unexpected < operator."

   When using this template to calculate a person's age at death or a person's age on a specified date (rather than the person's current age), please substitute it into the page.
        Example: {{subst:age2|1989|July 23|2003|7|July 14}}