Difference between revisions of "Template:Birth date and age2/doc"
Jump to navigation
Jump to search
imported>WhatamIdoing (Undid revision 697149066 by Useddenim (talk) Revert blanking of WP:TemplateData) |
imported>DePiep |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| − | <!-- Categories | + | <!-- Categories go at the bottom of this page. --> |
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. | ||
| + | == Usage == | ||
; Syntax | ; Syntax | ||
: {{tlc|{{lc:{{BASEPAGENAME}}}} |''specified year''|''specified month''|''specified day'' |''year of birth''|''month of birth''|''day of birth''}} | : {{tlc|{{lc:{{BASEPAGENAME}}}} |''specified year''|''specified month''|''specified day'' |''year of birth''|''month of birth''|''day of birth''}} | ||
| Line 14: | Line 15: | ||
{{tlf|{{lc:{{BASEPAGENAME}}}} <nowiki>|1988|6|10 |1961|7|4 |df=y</nowiki>}} produces: {{birth date and age2 |1988|6|10 |1961|7|4 |df=y}} | {{tlf|{{lc:{{BASEPAGENAME}}}} <nowiki>|1988|6|10 |1961|7|4 |df=y</nowiki>}} produces: {{birth date and age2 |1988|6|10 |1961|7|4 |df=y}} | ||
| − | + | == TemplateData == | |
| − | {{ | + | {{TemplateData header}} |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
<templatedata> | <templatedata> | ||
{ | { | ||
| Line 46: | Line 42: | ||
}, | }, | ||
"4": { | "4": { | ||
| − | |||
"example": "1952", | "example": "1952", | ||
"type": "number", | "type": "number", | ||
"suggested": true, | "suggested": true, | ||
| − | "label": " | + | "label": "Birth year" |
}, | }, | ||
"5": { | "5": { | ||
| − | |||
"example": "4", | "example": "4", | ||
"suggested": true, | "suggested": true, | ||
| − | "label": " | + | "label": "Birth month", |
| + | "type": "number" | ||
}, | }, | ||
"6": { | "6": { | ||
| − | |||
"example": "18", | "example": "18", | ||
"type": "number", | "type": "number", | ||
"suggested": true, | "suggested": true, | ||
| − | "label": " | + | "label": "Birth day" |
}, | }, | ||
"df": { | "df": { | ||
| − | "example": " | + | "label": "date first format", |
| − | "type": "string", | + | "description": "sets format to dmy", |
| − | " | + | "example": "y, yes", |
| − | "description": " | + | "type": "string" |
| + | }, | ||
| + | "mf": { | ||
| + | "label": "month first format", | ||
| + | "description": "mf=yes sets format to mdy", | ||
| + | "default": "this is the templates default" | ||
} | } | ||
}, | }, | ||
| Line 81: | Line 80: | ||
"5", | "5", | ||
"6", | "6", | ||
| − | "df" | + | "df", |
| + | "mf" | ||
] | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
| + | |||
| + | == See also == | ||
| + | {{Birth, death and age templates}} | ||
| + | |||
| + | <includeonly>{{basepage subpage | ||
| + | | <!-- Categories below this line, please: --> | ||
| + | [[Category:Date mathematics templates]] | ||
| + | }}</includeonly> | ||
Latest revision as of 17:01, 23 March 2018
| This is a documentation subpage for Template:Birth date and age2. It contains usage information, categories and other content that is not part of the original template page. |
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: 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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Specified year | 1 | Adds the specified year.
| Number | suggested |
| Specified month | 2 | Adds the specified month.
| Number | suggested |
| Specified day | 3 | Adds the specified day.
| Number | suggested |
| Birth year | 4 | no description
| Number | suggested |
| Birth month | 5 | no description
| Number | suggested |
| Birth day | 6 | no description
| Number | suggested |
| date first format | df | sets format to dmy
| String | optional |
| month first format | mf | mf=yes sets format to mdy
| Unknown | optional |
See also