Dota 2 Wiki
No edit summary
mNo edit summary
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
<includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude>[[Category:Function templates]] {{Wikipedia doc}}
{{user current age/years
 
  +
|day={{{day|{{CURRENTDAY}}}}}
 
  +
==TemplateData==
|month={{{month|{{CURRENTMONTH}}}}}
 
  +
<templatedata>
|year={{{year|{{CURRENTYEAR}}}}}
 
  +
{
}}
 
  +
"description": "This template returns the number of full years between two specified dates. If the second set of parameters is not included, it will return the number of full years between a specified date and today's date.",
  +
"params": {
  +
"1": {
  +
"label": "Year (\"from\" date)",
  +
"description": "The year of the \"from\" date",
  +
"type": "number",
  +
"required": true
  +
},
  +
"2": {
  +
"label": "Month (\"from\" date)",
  +
"description": "The month of the \"from\" date, 1 through 12",
  +
"type": "number",
  +
"required": true
  +
},
  +
"3": {
  +
"label": "Day (\"from\" date)",
  +
"description": "The day (of month) of the \"from\" date, 1 through 31",
  +
"type": "number",
  +
"required": true
  +
},
  +
"4": {
  +
"label": "Year2 (\"to\" date)",
  +
"description": "The year of the \"to\" date, if required",
  +
"type": "number",
  +
"required": false,
  +
"default": "{{CURRENTYEAR}}"
  +
},
  +
"5": {
  +
"label": "Month2 (\"to\" date)",
  +
"description": "The month of the \"to\" date, if required",
  +
"type": "number",
  +
"required": false,
  +
"default": "{{CURRENTMONTH}}"
  +
},
  +
"6": {
  +
"label": "Day2 (\"to\" date)",
  +
"description": "The day (of month) of the \"to\" date, if required",
  +
"type": "number",
  +
"required": false,
  +
"default": "{{CURRENTDAY}}"
  +
}
 
}
  +
}
  +
</templatedata>
  +
  +
[[zh:Template:Age]]
  +
  +
</noinclude>

Latest revision as of 15:09, 11 April 2018

Wikipedia icon
Documentation for this template is available at Template:Age on Wikipedia.

TemplateData

This template returns the number of full years between two specified dates. If the second set of parameters is not included, it will return the number of full years between a specified date and today's date.

Template parameters

ParameterDescriptionTypeStatus
Year ("from" date)1

The year of the "from" date

Numberrequired
Month ("from" date)2

The month of the "from" date, 1 through 12

Numberrequired
Day ("from" date)3

The day (of month) of the "from" date, 1 through 31

Numberrequired
Year2 ("to" date)4

The year of the "to" date, if required

Default
{{CURRENTYEAR}}
Numberoptional
Month2 ("to" date)5

The month of the "to" date, if required

Default
{{CURRENTMONTH}}
Numberoptional
Day2 ("to" date)6

The day (of month) of the "to" date, if required

Default
{{CURRENTDAY}}
Numberoptional