Difference between revisions of "Template:Date range and age/doc"
Jump to navigation
Jump to search
imported>Daviddwd m (Update to TemplateData) |
imported>Daviddwd |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{documentation subpage}} | {{documentation subpage}} | ||
==== To use ==== | ==== To use ==== | ||
| − | : | + | |
| + | :{{Tlx|Date range and age|Year of event start|Month of event start|Day of event start|Year of event end|Month of event end|Day of event end|df=y}} | ||
| + | |||
| + | For example: | ||
| + | |||
| + | {{Tlx|Date range and age|1996|April|20|2002|June|9|df=y}} | ||
| + | |||
| + | yields | ||
| + | |||
| + | {{Date range and age|1996|April|20|2002|June|9|df=y}} | ||
| + | |||
| + | == Template Data == | ||
| + | {{TemplateDataHeader}} | ||
| + | |||
<templatedata> | <templatedata> | ||
{ | { | ||
| Line 52: | Line 65: | ||
"type": "string", | "type": "string", | ||
"description": "Month the event ended", | "description": "Month the event ended", | ||
| − | "example": "April" | + | "example": "April", |
| + | "suggested": true | ||
}, | }, | ||
"6": { | "6": { | ||
| Line 61: | Line 75: | ||
"type": "string", | "type": "string", | ||
"description": "Day of month the event ended", | "description": "Day of month the event ended", | ||
| − | "example": "20" | + | "example": "20", |
| + | "suggested": true | ||
}, | }, | ||
"df": { | "df": { | ||
"label": "Day first?", | "label": "Day first?", | ||
"description": "if 'y' or 'yes', day comes before month", | "description": "if 'y' or 'yes', day comes before month", | ||
| − | "type": "string" | + | "type": "string", |
| + | "aliases": [ | ||
| + | "dayfirst" | ||
| + | ] | ||
} | } | ||
| − | } | + | }, |
| + | "description": "Represents a range of dates, and calculates the number of elapsed days in between" | ||
} | } | ||
</templatedata> | </templatedata> | ||
| + | |||
| + | == See also == | ||
| + | *{{tlx|Date range}} | ||
| + | *{{tlx|Date range and age in years, months, weeks and days}} | ||
| + | *{{tlx|Age in years, months, weeks and days}} | ||
| + | *[[Wikipedia:Age calculation templates]] | ||
Latest revision as of 00:23, 7 December 2018
| This is a documentation subpage for Template:Date range and age. It contains usage information, categories and other content that is not part of the original template page. |
To use
{{Date range and age|Year of event start|Month of event start|Day of event start|Year of event end|Month of event end|Day of event end}}
For example:
{{Date range and age|1996|April|20|2002|June|9}}
yields
20 April, 1996 – 9 June 2002
(2241 days)
Template Data
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 Date range and age
Represents a range of dates, and calculates the number of elapsed days in between
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Start year | 1 year1 | Year the event started
| Number | suggested |
| Start month | 2 month1 | Month the event started
| String | suggested |
| Start day | 3 day1 | Day the event started
| String | suggested |
| End year | 4 year2 | Year the event ended
| Number | suggested |
| End month | 5 month2 | Month the event ended
| String | suggested |
| End day | 6 day2 | Day of month the event ended
| String | suggested |
| Day first? | df dayfirst | if 'y' or 'yes', day comes before month | String | optional |