Difference between revisions of "Template:Birth date and age2"

From blackwiki
Jump to navigation Jump to search
imported>Primefac
(add switch for if you don't want "age" in the (age X))
imported>Primefac
(Undid revision 809508116 by Primefac (talk) nm)
Line 1: Line 1:
<includeonly><span style="display:none"> (<span class="bday">{{{4|{{{year}}}}}}-{{padleft:{{{5|{{{month}}}}}}|2|0}}-{{padleft:{{{6|{{{day}}}}}}|2|0}}</span>)</span>{{#if:{{{df|}}}|{{#expr:{{{6|{{{day}}}}}}}} {{MONTHNAME|{{{5|{{{month}}}}}}}}|{{MONTHNAME|{{{5|{{{month}}}}}}}} {{#expr:{{{6|{{{day}}}}}}}},}} {{{4|{{{year}}}}}} ({{#ifeq:{{{agetag}}}|no||aged&nbsp;}}{{age | {{{4|{{{year}}}}}} | {{{5|{{{month}}}}}} | {{{6|{{{day}}}}}} | {{{1|{{{year}}}}}} | {{{2|{{{month}}}}}} | {{{3|{{{day}}}}}} }})</includeonly><noinclude>
+
<includeonly><span style="display:none"> (<span class="bday">{{{4|{{{year}}}}}}-{{padleft:{{{5|{{{month}}}}}}|2|0}}-{{padleft:{{{6|{{{day}}}}}}|2|0}}</span>)</span>{{#if:{{{df|}}}|{{#expr:{{{6|{{{day}}}}}}}} {{MONTHNAME|{{{5|{{{month}}}}}}}}|{{MONTHNAME|{{{5|{{{month}}}}}}}} {{#expr:{{{6|{{{day}}}}}}}},}} {{{4|{{{year}}}}}} (aged {{age | {{{4|{{{year}}}}}} | {{{5|{{{month}}}}}} | {{{6|{{{day}}}}}} | {{{1|{{{year}}}}}} | {{{2|{{{month}}}}}} | {{{3|{{{day}}}}}} }})</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 15:48, 9 November 2017

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

This template displays a person's birth date and age at a specified date.
This allows you to show how old a person was at the time they participated in an event or made an achievement.

Usage

Syntax
{{birth date and age2 |specified year|specified month|specified day |year of birth|month of birth|day of birth}}
Format
{{birth date and age2 |yyyy|mm|dd |yyyy|mm|dd |df=y}}
Example

{{birth date and age2 |1988|6|10 |1961|7|4 |df=y}} produces:  (1961-07-04)4 July 1961 (aged 26)

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Birth date and age2

This template displays a person's birth date and age at a specified date.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Specified year1

Adds the specified year.

Example
1970
Numbersuggested
Specified month2

Adds the specified month.

Example
5
Numbersuggested
Specified day3

Adds the specified day.

Example
23
Numbersuggested
Birth year4

no description

Example
1952
Numbersuggested
Birth month5

no description

Example
4
Numbersuggested
Birth day6

no description

Example
18
Numbersuggested
date first formatdf

sets format to dmy

Example
y, yes
Stringoptional
month first formatmf

mf=yes sets format to mdy

Default
this is the templates default
Unknownoptional

See also