Changes

Jump to: navigation, search

Template:Birth year and age

1,113 bytes added, 21:08, 19 September 2016
limit cat to main article space, provide error message
<includeonly>{{#if:{{{2|}}}
|{{MONTHNAME|{{{2}}}}}&nbsp;
}}{{{1}}} (age&nbsp;{{#if:{{{2|}}}
|{{#ifexpr:{{CURRENTMONTH}}<{{{2}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}
|{{#ifexpr:{{CURRENTMONTH}}>{{{2}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}&ndash;{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
}}
}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}&ndash;{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
}})<!-- Error checks: -->{{#ifexpr: ( {{{1}}} > {{CURRENTYEAR}} ) OR ( {{CURRENTYEAR}} - {{{1}}} > 150 )
| &#32;{{error|invalid year}}{{main other|[[Category:Pages using age template with invalid date]]}}
}}{{#if:{{{2|}}}|{{#ifexpr: ( {{{2}}} > 12 ) OR ( {{{2}}} < 1 )
| &#32;{{error|invalid month}}{{main other|[[Category:Pages using age template with invalid date]]}}|}}
}}{{#invoke:Check for unknown parameters|check|ignoreblank=y|preview=Page using [[Template:Birth year and age]] with unknown parameter "_VALUE_"|unknown={{main other|[[Category:Pages using birth year and age template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|1|2}}</includeonly><noinclude>
{{documentation}}
</noinclude>
Anonymous user

Navigation menu