Difference between revisions of "Template:Death year and age"

From The League Wiki
Jump to navigation Jump to search
Template>Zyxw
(update Wikidata tracking, tested with /sandbox and articles)
 
m (1 revision imported)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<includeonly>{{#if:{{{3|}}}|{{MONTHNAME|{{{3|}}}}} {{{1|}}}|{{{1|}}}}} (aged&nbsp;{{#expr:{{{1}}}-{{{2}}}-1}}&ndash;{{#expr:{{{1}}}-{{{2}}}}}){{#invoke:Check for unknown parameters|check|ignoreblank=y|preview=Page using [[Template:Death year and age]] with unknown parameter "_VALUE_"|unknown=[[Category:Pages using death year and age template with unknown parameters|_VALUE_{{PAGENAME}}]]|1|2|3}}{{#ifeq: {{NAMESPACENUMBER}} | 0
 
<includeonly>{{#if:{{{3|}}}|{{MONTHNAME|{{{3|}}}}} {{{1|}}}|{{{1|}}}}} (aged&nbsp;{{#expr:{{{1}}}-{{{2}}}-1}}&ndash;{{#expr:{{{1}}}-{{{2}}}}}){{#invoke:Check for unknown parameters|check|ignoreblank=y|preview=Page using [[Template:Death year and age]] with unknown parameter "_VALUE_"|unknown=[[Category:Pages using death year and age template with unknown parameters|_VALUE_{{PAGENAME}}]]|1|2|3}}{{#ifeq: {{NAMESPACENUMBER}} | 0
| {{#if: {{#invoke:Wikidata|pageId}}
+
| {{#if: {{#invoke:wd|label|raw}}
   | {{#if: {{#invoke:String|match|{{#invoke:Wikidata|getPropertyIDs|P31|FETCH_WIKIDATA}},|Q5,|1|1|true|}}
+
   | {{#if: {{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}}
     | {{#if: {{#property:P570}}
+
     | {{#if: {{#invoke:wd|properties|raw|P570}}
 
       |
 
       |
 
       | [[Category:Date of death not in Wikidata]]
 
       | [[Category:Date of death not in Wikidata]]
       }}{{#if: {{#property:P569}}
+
       }}{{#if: {{#invoke:wd|properties|raw|P569}}
 
       |
 
       |
 
       | [[Category:Date of birth not in Wikidata]]
 
       | [[Category:Date of birth not in Wikidata]]

Latest revision as of 22:58, 29 June 2020