Template:Age: Difference between revisions

(Trying to help Lulz to see if we can get an age template going. Somehow excluded from the MediaWiki version.)
No edit summary
 
(4 intermediate revisions by 3 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>
{{TemplateDataHeader}}
{{Documentation}}
<templatedata>{
</noinclude>
"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>

Latest revision as of 19:14, 11 September 2021