Changes
Jump to navigation
Jump to search
limit cat to main article space, provide error message
<includeonly>{{#if:{{{2|}}}
|{{MONTHNAME|{{{2}}}}}
}}{{{1}}} (age {{#if:{{{2|}}}
|{{#ifexpr:{{CURRENTMONTH}}<{{{2}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}
|{{#ifexpr:{{CURRENTMONTH}}>{{{2}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}–{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
}}
}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}–{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
}})<!-- Error checks: -->{{#ifexpr: ( {{{1}}} > {{CURRENTYEAR}} ) OR ( {{CURRENTYEAR}} - {{{1}}} > 150 )
|  {{error|invalid year}}{{main other|[[Category:Pages using age template with invalid date]]}}
}}{{#if:{{{2|}}}|{{#ifexpr: ( {{{2}}} > 12 ) OR ( {{{2}}} < 1 )
|  {{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>
|{{MONTHNAME|{{{2}}}}}
}}{{{1}}} (age {{#if:{{{2|}}}
|{{#ifexpr:{{CURRENTMONTH}}<{{{2}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}
|{{#ifexpr:{{CURRENTMONTH}}>{{{2}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}–{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
}}
}}
|{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}–{{#expr:{{CURRENTYEAR}}-{{{1}}}}}
}})<!-- Error checks: -->{{#ifexpr: ( {{{1}}} > {{CURRENTYEAR}} ) OR ( {{CURRENTYEAR}} - {{{1}}} > 150 )
|  {{error|invalid year}}{{main other|[[Category:Pages using age template with invalid date]]}}
}}{{#if:{{{2|}}}|{{#ifexpr: ( {{{2}}} > 12 ) OR ( {{{2}}} < 1 )
|  {{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>