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

From blackwiki
Jump to navigation Jump to search
imported>DixonDBot
m (Migrating 2 interwiki links, now provided by Wikidata on d:Q6438902)
imported>Sardanaphalus
(formattingt (including <tt> replacement), removed heading and link (now in template), sandbox non-categorization)
Line 2: Line 2:
 
<!-- Categories and interwikis go at the bottom of this page. -->
 
<!-- Categories and interwikis go at the bottom of this page. -->
  
== Usage ==
+
This template displays a person's birth date and age at a specified date.<br/>
This template displays a person's birth date and age at a specified date.<br>
 
 
This allows you to show how old a person was at the time they participated in an event or made an achievement.
 
This allows you to show how old a person was at the time they participated in an event or made an achievement.
  
; Syntax<nowiki>:</nowiki>
+
; Syntax
: <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki></tt>''specified year''<tt><nowiki>|</nowiki></tt>''specified month''<tt><nowiki>|</nowiki></tt>''specified day''<tt><nowiki>|</nowiki></tt>''year of birth''<tt><nowiki>|</nowiki></tt>''month of birth''<tt><nowiki>|</nowiki></tt>''day of birth''<tt><nowiki>}}</nowiki></tt>
+
: {{tc|{{lc:{{BASEPAGENAME}}}}&nbsp;|''specified year''|''specified month''|''specified day''&nbsp;|''year of birth''|''month of birth''|''day of birth''}}
  
; Format:
+
; Format
:<tt><nowiki>{{</nowiki>{{PAGENAME}}|yyyy|mm|dd|yyyy|mm|dd|df=y<nowiki>}}</nowiki></tt>
+
: {{tcpl|{{lc:{{BASEPAGENAME}}}}&nbsp;|''yyyy''|''mm''|''dd''&nbsp;|''yyyy''|''mm''|''dd''&nbsp;|df{{=}}y}}
 +
 
 +
; Example
 +
{{plaincode|{{braces|{{lc:{{BASEPAGENAME}}}} <nowiki>|1988|6|10 |1961|7|4 |df=y</nowiki>}}}} produces:&nbsp; {{birth date and age2 |1988|6|10 |1961|7|4 |df=y}}
  
; Example<nowiki>:</nowiki>
 
<nowiki>{{Birth date and age2|1988|6|10|1961|7|4|df=y}}</nowiki> displays as "{{Birth date and age2|1988|6|10|1961|7|4|df=y}}".
 
  
== See also ==
 
* [[Wikipedia:Age calculation templates]]
 
 
{{Birth, death and age templates}}
 
{{Birth, death and age templates}}
<includeonly>
 
<!-- Categories and interwikis go here: -->
 
[[Category:Date mathematics templates|Birth date and age2]]
 
  
</includeonly>
+
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox |
 +
| <!-- Categories below this line, please: -->
 +
[[Category:Date mathematics templates]]
 +
}}</includeonly>

Revision as of 17:04, 7 December 2014

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.

Syntax
{{birth date and age2 |specified year|specified month|specified day |year of birth|month of birth|day of birth}}
Format
Template:Tcpl
Example

Template:Plaincode produces:  (1961-07-04)4 July 1961 (aged 26)