• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Date range/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Date range
This is the template sandbox page for Template:Date range (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]

To use

edit
{{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

(1996-April-20) (2002-June-09)April 20, 1996 – June 9, 2002

and

{{Date range|1996|April|20|2002|June|9|df=y}}

yields

(1996-April-20) (2002-June-09)20 April 1996 – 9 June 2002

Days are optional, allowing

{{Date range|year1=1996|month1=Apr|year2=2002|month2=Jun}}

to yield

({{{year}}}-{{{month}}}-{{{day}}}) ({{{year}}}-{{{month}}}-{{{day}}})April 1996 – June 2002.


Template Data

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Date range in articles based on its TemplateData.

TemplateData for Date range

Represents a range of dates.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Start year1 year1

Year the event started

Example
1920
Numberrequired
Start month2 month1

Month the event started

Example
June
Stringrequired
Start day3 day1

Day the event started

Example
9
Stringsuggested
End year4 year2

Year the event ended

Example
1969
Numberrequired
End month5 month2

Month the event ended

Example
April
Stringrequired
End day6 day2

Day of month the event ended

Example
20
Stringsuggested
Day first?df dayfirst

if 'y' or 'yes', day comes before month

Stringoptional

See also

edit
  • {{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}}
The above documentation is transcluded from Template:Date range/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Date_range/sandbox&oldid=910705868"
Last edited on 13 August 2019, at 21:32

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 13 August 2019, at 21:32 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop