Jump to content

Template:Date range and age in years, months, weeks and days/doc

From Wikipedia, the free encyclopedia

Usage

[edit]
{{Date range and age in years, months, weeks and days|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 in years, months, weeks and days|1996|April|20|2002|June|9}}

yields

(1996-April-20) (2002-June-09)April 20, 1996 – June 9, 2002
(6 years, 1 month, 2 weeks and 6 days)

and

{{Date range and age in years, months, weeks and days|1996|April|20|2002|June|9|df=y}}

yields

(1996-April-20) (2002-June-09)20 April 1996 – 9 June 2002
(6 years, 1 month, 2 weeks and 6 days)

TemplateData

[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 and age in years, months, weeks and days in articles based on its TemplateData.

TemplateData for Date range and age in years, months, weeks and days

Represents a range of dates.

Template parameters

ParameterDescriptionTypeStatus
Start year1 year1

Year the event started

Example
1920
Numbersuggested
Start month2 month1

Month the event started

Example
June
Stringsuggested
Start day3 day1

Day the event started

Example
9
Stringsuggested
End year4 year2

Year the event ended

Example
1969
Numbersuggested
End month5 month2

Month the event ended

Example
April
Stringsuggested
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]