Template:Death date: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Patleahy
Make the same as Death date
Ookami (talk | contribs)
m 25 revisions imported
 
(22 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<includeonly>[[{{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>{{Euro death date and age|1993|2|24}}</nowiki><br>returns {{subst:Euro death date|1993|2|24}} when the reader does not have a date format preference set.
}}{{#ifeq: {{NAMESPACENUMBER}} | 0
 
| {{#if: {{#invoke:wd|label|raw}}
'''Note:''' This template is the same as {{tl|Death date}} except that this template insert the calendar date with the day first (e.g. as '''24 February''', not '''February 24''') when the reader does not have a [[Help:Preferences#Date_format|date format preference]] set.
  | {{#if: {{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}}
 
    | {{#if: {{#invoke:wd|properties|raw|P570}}
<span style="font-weight:bold; color:#CC0000">Note</span>: The template will appear broken when the parameters are left blank.
      |
 
      | [[Category:Date of death not in Wikidata]]
      }}
    }}
  | [[Category:Articles without Wikidata item]]
  }}
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 13:17, 3 September 2020