• New article from the Springfield Shopper: Krusty’s aunt helps repair Homer’s relationship with Patty and Selma this December!
  • New article from the Springfield Shopper: Season 36 News: A new episode title, “P.S., I Hate You”, has been announced!
  • Wikisimpsons needs more Featured Article, Picture, Quote, Episode and Comprehensive article nominations!
  • Wikisimpsons has a Discord server! Click here for your invite! Join to talk about the wiki, Simpsons and Tapped Out news, or just to talk to other users.
  • Make an account! It's easy, free, and your work on the wiki can be attributed to you.
TwitterFacebookDiscord

Difference between revisions of "Template:Birthyear"

Wikisimpsons - The Simpsons Wiki
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>{{#if:{{{2|}}}
 
<includeonly>{{#if:{{{2|}}}
 
  |{{MONTHNAME|{{{2}}}}}&nbsp;
 
  |{{MONTHNAME|{{{2}}}}}&nbsp;
}}{{{1}}} (age&nbsp;{{#if:{{{2|}}}
+
}}{{Linkless exists|{{{1|}}}|[[{{{1|}}}]]|{{{1|}}}}} (age&nbsp;{{#if:{{{2|}}}
 
  |{{#ifexpr:{{CURRENTMONTH}}<{{{2}}}
 
  |{{#ifexpr:{{CURRENTMONTH}}<{{{2}}}
 
   |{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}
 
   |{{#expr:{{CURRENTYEAR}}-{{{1}}}-1}}
Line 14: Line 14:
 
}}{{#if:{{{2|}}}|{{#ifexpr: ( {{{2}}} > 12 ) OR ( {{{2}}} < 1 )
 
}}{{#if:{{{2|}}}|{{#ifexpr: ( {{{2}}} > 12 ) OR ( {{{2}}} < 1 )
 
  | &#32;{{error|invalid month}}{{main other|[[Category:Pages using age template with invalid date]]}}|}}
 
  | &#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:Birthyear]] with unknown parameter "_VALUE_"|unknown={{main other|[[Category:Pages using birthyear template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|1|2}}{{#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>[[Category:Templates]]</noinclude>
 
}}</includeonly><noinclude>[[Category:Templates]]</noinclude>

Latest revision as of 10:55, May 27, 2022