"ढाँचा:Age in years, months and days/कागजात" का संशोधनहरू बिचको अन्तर

→‎Notes: This template can handle an ambiguous start date, if the end date isn't known you shouldn't be using this template.
TemplateData
पङ्क्ति ३२:
:<code><nowiki>{{Age in years, months and days|2001|1|15|2008|9|5|sc=y}}</nowiki></code> returns "{{Age in years, months and days|2001|1|15|2008|9|5|sc=y}}"
:<code><nowiki>{{Age in years, months and days|</nowiki>{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<14|{{#expr:{{CURRENTYEAR}}-8}}|{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<45|2006|{{#expr:{{CURRENTYEAR}}-8}}}}}}<nowiki>|</nowiki>{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<14|12|{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<45|8|{{#ifexpr:{{CURRENTDAY}}<15|{{#expr:{{CURRENTMONTH}}-1}}|{{CURRENTMONTH}}}}}}}}<nowiki>|</nowiki>{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<14|{{#ifexpr:{{CURRENTDAY}}<15|{{#expr:{{CURRENTDAY}}+15}}|{{#expr:{{CURRENTDAY}}-14}}}}|{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<4|4|{{#ifexpr:{{CURRENTDAY}}<15|{{#expr:{{CURRENTDAY}}+15}}|{{#expr:{{CURRENTDAY}}-14}}}}}}}}<nowiki>|sc=y}}</nowiki></code> returns "{{Age in years, months and days| {{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<14|{{#expr:{{CURRENTYEAR}}-8}}|{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<45|2006|{{#expr:{{CURRENTYEAR}}-8}}}}}}|{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<14|12|{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<45|8|{{#ifexpr:{{CURRENTDAY}}<15|{{#expr:{{CURRENTMONTH}}-1}}|{{CURRENTMONTH}}}}}}}}|{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<14|{{#ifexpr:{{CURRENTDAY}}<15|{{#expr:{{CURRENTDAY}}+15}}|{{#expr:{{CURRENTDAY}}-14}}}}|{{#ifexpr:{{#time:z|{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<4|4|{{#ifexpr:{{CURRENTDAY}}<15|{{#expr:{{CURRENTDAY}}+15}}|{{#expr:{{CURRENTDAY}}-14}}}}}}}}|sc=y}}"
 
==TemplateData==
{{TemplateDataHeader}}
<templatedata>{
"description": "This template returns the number of full years, surplus months, and surplus days between two specified dates. If the second set of parameters is not included, it will return the number of years, months and days between a specified date and today's date.",
"params": {
"1": {
"label": "Year ('from' date)",
"description": "The year of the (first) date",
"type": "number",
"required": true,
"aliases": [ "year" ]
},
"2": {
"label": "Month ('from' date)",
"description": "Number of the month of the (first) date",
"type": "number",
"required": true,
"aliases": [ "month" ]
},
"3": {
"label": "Day of month ('from' date)",
"description": "The day of the month of the (first) date",
"type": "number",
"required": false,
"aliases": [ "day" ]
},
"4": {
"label": "Year ('to' date)",
"description": "The year of the 'to' date, if required",
"type": "number",
"default": "the current year",
"required": false
},
"5": {
"label": "Month ('to' date)",
"description": "Number of the month of the 'to' date, if required",
"type": "number",
"default": "the current month",
"required": false
},
"6": {
"label": "Day of month ('to' date)",
"description": "The day of the month of the 'to' date, if required",
"type": "number",
"default": "the current day",
"required": false
}
}
}</templatedata>
 
=== See also ===