Template:Date range/doc: Difference between revisions
w>JJMC89 bot III m Moving Category:Wikipedia utility templates to Category:Wikipedia formatting templates per Wikipedia:Categories for discussion/Log/2024 August 19#Category:Wikipedia utility templates |
m 1 revision imported |
||
(No difference)
| |||
Latest revision as of 13:42, 19 January 2026
| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original template page. |
To use
{{Date range|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|1996|April|20|2002|June|9}}
yields
April 20, 1996 – June 9, 2002
and
{{Date range|1996|April|20|2002|June|9|df=y}}
yields
20 April 1996 – 9 June 2002
Days are optional, allowing
{{Date range|year1=1996|month1=Apr|year2=2002|month2=Jun}}
to yield
April 1996 – June 2002.
Template Data
This is the TemplateData documentation for this template used by VisualEditor and other tools.
Date range
[[Category:TemplateData documentation{{#translation:}}]]
<templatedata> { "params": { "1": { "aliases": [ "year1" ], "label": "Start year", "type": "number", "description": "Year the event started", "example": "1920", "required": true }, "2": { "aliases": [ "month1" ], "label": "Start month", "type": "string", "description": "Month the event started", "example": "June", "required": true }, "3": { "aliases": [ "day1" ], "label": "Start day", "type": "string", "suggested": true, "description": "Day the event started", "example": "9" }, "4": { "aliases": [ "year2" ], "label": "End year", "type": "number", "description": "Year the event ended", "example": "1969", "required": true }, "5": { "aliases": [ "month2" ], "label": "End month", "type": "string", "description": "Month the event ended", "example": "April", "required": true }, "6": { "aliases": [ "day2" ], "label": "End day", "type": "string", "description": "Day of month the event ended", "example": "20", "suggested": true }, "df": { "label": "Day first?", "description": "if 'y' or 'yes', day comes before month", "type": "string", "aliases": [ "dayfirst" ] } }, "description": "Represents a range of dates." } </templatedata>
See also
{{Date range and age}}{{Date range and age in years, months, weeks and days}}{{Age in years, months, weeks and days}}- Wikipedia:Age calculation templates
{{frac}}{{page range}}{{ratio}}