No edit summary |
@DeletedUser41170185 (talk | contribs) 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
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Year ("from" date) | 1 | The year of the "from" date | Number | required |
Month ("from" date) | 2 | The month of the "from" date, 1 through 12 | Number | required |
Day ("from" date) | 3 | The day (of month) of the "from" date, 1 through 31 | Number | required |
Year2 ("to" date) | 4 | The year of the "to" date, if required
| Number | optional |
Month2 ("to" date) | 5 | The month of the "to" date, if required
| Number | optional |
Day2 ("to" date) | 6 | The day (of month) of the "to" date, if required
| Number | optional |