Template:Death date: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Patleahy
Add a df (day first) option to this template. See Template talk:Euro birth date#Suggested move.
Ookami (talk | contribs)
m 25 revisions imported
 
(18 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<includeonly>{{#ifeq:{{{df}}}|yes|[[{{{3}}} {{MONTHNAME|{{{2}}}}}]]|[[{{MONTHNAME|{{{2}}}}} {{{3}}}]]}} [[{{{1}}}]]</includeonly><noinclude>
<includeonly><span style="display:none">(<span class="dday deathdate">{{{1}}}-{{padleft:{{MONTHNUMBER|{{{2}}}}}|2|0}}-{{padleft:{{{3}}}|2|0}}</span>)</span>{{#if:{{{df|}}}|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},}} {{#expr:{{{1}}}}}<!--
== Usage ==
-- Error checks --
Returns a person's date of death.
-->{{#ifexpr: ( {{{1|}}} > {{CURRENTYEAR}} )
 
| &#32;{{error|invalid year}}{{main other|[[Category:Pages using age template with invalid date]]}}
; Syntax<nowiki>:</nowiki>
}}{{#if:{{{2|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 )
: <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki></tt>''year of death''<tt><nowiki>|</nowiki></tt>''month of death''<tt><nowiki>|</nowiki></tt>''day of death''<tt><nowiki>}}</nowiki></tt>
| &#32;{{error|invalid month}}{{main other|[[Category:Pages using age template with invalid date]]}}|}}
 
}}{{#if:{{{3|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 )
; Example<nowiki>:</nowiki>
| &#32;{{error|invalid day}}{{main other|[[Category:Pages using age template with invalid date]]}}|}}
<nowiki>{{death date and age|1993|2|24}}</nowiki><br>returns {{death date|1993|2|24}}
}}{{#ifeq: {{NAMESPACENUMBER}} | 0
 
| {{#if: {{#invoke:wd|label|raw}}
<span style="font-weight:bold; color:#CC0000">Note</span>: The template will appear broken when the parameters are left blank.
  | {{#if: {{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}}
 
    | {{#if: {{#invoke:wd|properties|raw|P570}}
==See also==
      |
[[Template:Death date and age]]
      | [[Category:Date of death not in Wikidata]]
 
      }}
[[Category:Date mathematics templates|{{PAGENAME}}]]
    }}
 
  | [[Category:Articles without Wikidata item]]
  }}
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 13:17, 3 September 2020