Template:Birth date and age: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary Tag: Reverted |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{ |
<includeonly>{{{{{♥|safesubst:}}}#invoke:age|birth_date_and_age}}<!-- Tracking categories |
||
| ⚫ | -->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using birth date and age with unknown parameters|_VALUE_]]}}|preview=Page using [[Template:Birth date and age]] with unknown parameter "_VALUE_"|showblankpositional=1| 1 | 2 | 3 | day | month | year | df | mf }}</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}}}}} |
|||
}})<!-- Tracking categories |
|||
-->{{#ifexpr: ( {{{1}}} > {{CURRENTYEAR}} ) OR ( {{CURRENTYEAR}} - {{{1}}} > 130 ) |   {{Error|invalid year, age > 130}}{{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]]}}|}} |
|||
}}<!-- |
|||
| ⚫ | |||
-->{{#ifeq: {{NAMESPACENUMBER}} | 0 |
|||
| {{#if: {{#invoke:wd|label|raw}} |
|||
| {{#if: {{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}} |
|||
| {{#if: {{#invoke:wd|properties|raw|P569}} |
|||
| |
|||
| [[Category:Date of birth not in Wikidata]] |
|||
}} |
|||
}} |
|||
| [[Category:Articles without Wikidata item]] |
|||
}} |
|||
}}</includeonly><noinclude> |
|||
{{Documentation}} |
|||
</noinclude> |
|||
Latest revision as of 10:20, 24 November 2025
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}