Template:Start and end dates and age
Appearance
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
When not to use this template
[edit source]Do not use this template for:
- dates that are uncertain e.g., "before 4 April 1933"; "around 18 November 1939".
- dates outside the range given under below.
- other, secondary dates
- outside -emitting templates—if in doubt, see the parent template's documentation
- more than one date in any parent template
Usage
[edit source]{{tlx|Start and end dates and age|YYYY|MM|DD|YYYY|MM|DD|agein|formatting}
Examples
[edit source]- Standard:
{{Start and end dates and age|1939|9|1|1945|9|2}}→ September 1, 1939 – September 2, 1945 (6 years and 1 day) - Day first:
{{Start and end dates and age|1939|9|1|1945|9|2|df=yes}}→ 1 September 1939 – 2 September 1945 (6 years and 1 day) - Same year:
{{Start and end dates and age|1939|9|1|1939|10|2}}→ September 1 – October 2, 1939 (1 month and 1 day) - Same month and year:
{{Start and end dates and age|1939|9|1|1939|9|2}}→ September 1–2, 1939 (1 day) - Present range:
{{Start and end dates and age|1939|9|1|present}}→ September 1, 1939 – present (Error: Second date should be year, month, day)
TemplateData
[edit source]This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Start and end dates and age in articles based on its TemplateData.
TemplateData for Start and end dates and age
Date that an event or entity started or was created and when it ended or was destroyed
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| YYYY | 1 | Start year
| Number | required |
| MM | 2 | Start month
| Number | optional |
| DD | 3 | Start day of month
| Number | optional |
| YYYY | 4 | end year
| Number | optional |
| MM | 5 | End month
| Number | optional |
| DD | 6 | End day of month
| Number | optional |
| agein | 7 | Unites used for listing the age, such as years (y), months (m), weeks (w), and days (d)
| String | optional |
| formatting | 8 | Formatting to be placed between the dates and the age, such as spacing or a line break
| String | optional |
| Day first | df | Set to 'yes' to show the day before the month name
| Line | optional |
Use in microformats
[edit source]Tracking categories
[edit source]See also
[edit source]- {{Start date}}
- {{End date}}