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

From blackwiki
Jump to navigation Jump to search
imported>WOSlinker
(undo redirect as Death date and age‎ template now has a dday class for hCards)
Line 1: Line 1:
<includeonly>{{#if:{{{df|}}}|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},}} {{{1}}} (aged&nbsp;{{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|{{{2}}}|{{{3}}}}})</includeonly><noinclude>
+
<includeonly>{{#if:{{{df|}}}|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},}} {{{1}}} (aged&nbsp;{{#if:{{{5|}}}
{{Documentation}}
+
|{{#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 disappeared year -->{{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{{3}}}}}
 +
    |{{#ifexpr:{{{2}}}>{{{5}}}<!-- if birth month but not day exist and birth month was reached in disappeared year -->
 +
    |{{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}}
 +
    |<!-- if birth month but not day exist and birth month is the disappeared month -->{{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{{3}}}}}–{{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}}
 +
    }}
 +
  }}
 +
  }}
 +
|{{Age in years|{{{4}}}|{{{1}}}}}}})
 +
</includeonly><noinclude>
 +
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 16:32, 8 June 2016

Template documentation[view] [edit] [history] [purge]

Usage

This template can be used to give the date a person went missing, and automatically calculate their age on that day.

Note: This template is based on, and has exactly the same syntax as {{Death date and age}}.

Syntax

{{Disappeared date and age|YYYY|MM|DD|YYYY|MM|DD}}

Where the first date is the date of disappearance, and the second date is the date of birth.

See also