Difference between revisions of "Template:Event date and age"

From blackwiki
Jump to navigation Jump to search
imported>Ish ishwar
(rv, well then it's best to change it to pass the arbitrary T3 criteria, the templates are semantically different and causing problems with wikidata)
imported>Primefac
(Undid revision 833642476 by Ish ishwar (talk) you were bold, I reverted, and now it's time to discuss it somewhere.)
 
Line 1: Line 1:
<includeonly>{{#if:{{{df|}}}|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},}} {{{1}}}<span style="display:none">(<span class="dday deathdate">{{{1}}}-{{padleft:{{MONTHNUMBER|{{{2}}}}}|2|0}}-{{padleft:{{{3}}}|2|0}}</span>)</span> (aged&nbsp;{{#if:{{{5|}}}
+
#REDIRECT [[Template:Death date and age]] {{Redirects with possibilities}}
|{{#if:{{{6|}}}
 
  |<!-- if all birth values are specified -->{{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|{{{2}}}|{{{3}}}}}
 
  |{{#ifexpr:{{{2}}}<{{{5}}}
 
    |<!-- if birth month but not day exist and birth month was not reached in death year -->{{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{{3}}}}}
 
    |{{#ifexpr:{{{2}}}>{{{5}}}<!-- if birth month but not day exist and birth month was reached in death year -->
 
    |{{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}}
 
    |<!-- if birth month but not day exist and birth month is the death month -->{{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{{3}}}}}–{{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}}
 
    }}
 
  }}
 
  }}
 
|{{Age in years|{{{4}}}|{{{1}}}}}}})<!--
 
-- Error checks --
 
-->{{#ifexpr: ( {{{1|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{{1|}}} ) OR ( {{{1|}}} - {{{4|}}} > 150 )
 
| &#32;{{error|invalid year}}{{main other|[[Category:Pages using age template with invalid date]]}}
 
}}{{#if:{{{5|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 ) OR ( {{{5|}}} > 12 ) OR ( {{{5|}}} < 1 )
 
| &#32;{{error|invalid month}}{{main other|[[Category:Pages using age template with invalid date]]}}|}}
 
}}{{#if:{{{6|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 ) OR ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
 
| &#32;{{error|invalid day}}{{main other|[[Category:Pages using age template with invalid date]]}}|}}
 
}}</includeonly><noinclude>
 
{{documentation}}
 
</noinclude>
 

Latest revision as of 19:16, 1 April 2018

  • With possibilities: This is a redirect from a title that potentially could be expanded into a new article or other type of associated page such as a new template. The topic described by this title may be more detailed than is currently provided on the target page or in a section of that page.
    • {{R printworthy}} should be used together with this template when applied to a redirect in mainspace.
    • When used on a template redirect, it will automatically populate Category:Template redirects with possibilities.
    • When the target page becomes too large, or for any reason a new page would be an improvement, this redirect may be replaced with an article, template or other project page that is carved out of the target page. See also {{R to section}} and use together with this rcat when appropriate.
    • If the topic of the redirect is not susceptible to expansion, then use other rcats such as {{R to section}} or {{R to list entry}} when appropriate.
    • Since a new page may be created, links to this redirect should not be replaced with a direct link to the target page.