Help us get to over 8,767 articles in 2025.
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
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 9: | Line 9: | ||
<!-- | |||
Month = {{{2}}} | Month = {{{2}}} | ||
Month name = {{#explode:{{{2}}}| |0}} | Month name = {{#explode:{{{2}}}| |0}} | ||
| Line 16: | Line 16: | ||
day = {{#explode:{{#explode:{{{2}}}| |1}}|,|0}} | day = {{#explode:{{#explode:{{{2}}}| |1}}|,|0}} | ||
--> | |||
{{#expr:( | {{#expr:( | ||
{{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(( {{MONTHNUMBER|{{#explode:{{{4}}}| |0}} }} |{{CURRENTMONTH}} )<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{MONTHNUMBER|{{#explode:{{{2}}}| |0}} }})and({{#explode:{{{4}}}| |1}}|{{CURRENTDAY}} )<({{{3}}}))}}</includeonly><noinclude> | {{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(( {{MONTHNUMBER|{{#explode:{{{4}}}| |0}} }} |{{CURRENTMONTH}} )<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{MONTHNUMBER|{{#explode:{{{2}}}| |0}} }})and({{#explode:{{{4}}}| |1}}|{{CURRENTDAY}} )<({{{3}}}))}}</includeonly><noinclude> | ||
| Line 25: | Line 25: | ||
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. | 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: | Syntax: | ||
:<nowiki>{{age2|year1|month1 day1|year2|month2 day2}} or | |||
:{{age2|year1|month1 day1}}</nowiki> | |||
Examples: | Examples: | ||
:<nowiki>{{age2|1989|July 23,|2003|7|14}}</nowiki> returns "{{age2|1989|July 23,|2003|July 14,}}" | |||
:<nowiki>{{age2|1989|July 23}}</nowiki> returns "{{age2|1989|7|23}}" | |||
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. | |||
:<nowiki> Example: {{subst:age2|1989|July 23|2003|7|July 14}}</nowiki> | |||
</noinclude> | </noinclude> | ||
Revision as of 20:08, 17 May 2012
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
Expression error: Unrecognized word "july"."
- {{age2|1989|July 23}} returns "Expression error: Unexpected < operator.
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}}