Template:Death date: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Rich Farmbrough
remove linear seperator.
Ookami (talk | contribs)
m 25 revisions imported
 
(13 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{df|}}}|[[{{{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 | 1993 | 2 | 24}}</nowiki><br>returns {{Death date | 1993 | 2 | 24}}
}}{{#ifeq: {{NAMESPACENUMBER}} | 0
 
| {{#if: {{#invoke:wd|label|raw}}
An optional parameter, df, can be set (to "y" or "yes" for example) to display the day before the month. This is primarily used in articles about people from parts of the world where the day precedes the month in a date. Conversely the unimplemented parameter , mf, can be set as a hint for "month first", currently the default behaviour.
  | {{#if: {{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}}
 
    | {{#if: {{#invoke:wd|properties|raw|P570}}
; Example<nowiki>:</nowiki>
      |
 
      | [[Category:Date of death not in Wikidata]]
<nowiki>{{Death date | 1993 | 2 | 24 | df=yes}}</nowiki><br> returns "{{Death date | 1993 | 2 | 24 | df=yes}}"
      }}
 
    }}
'''Note''': The template will appear broken when the parameters are left blank.
  | [[Category:Articles without Wikidata item]]
 
  }}
==See also==
}}</includeonly><noinclude>
[[Template:Death date and age]]
{{Documentation}}
 
[[Category:Date mathematics templates|{{PAGENAME}}]]
 
</noinclude>
</noinclude>

Latest revision as of 13:17, 3 September 2020