Jump to content

Template:Start date and age/testcases

From Wikipedia, the free encyclopedia

Default separator: semicolon

[edit]
Parameters Current template Sandbox template
Full date (year, month, day)
|2013|02|01 February 1, 2013; 11 years ago (2013-02-01) February 1, 2013; 11 years ago (2013-02-01)
|2013|02|01|df=yes 1 February 2013; 11 years ago (2013-02-01) 1 February 2013; 11 years ago (2013-02-01)
|df=yes|2013|02|01 1 February 2013; 11 years ago (2013-02-01) 1 February 2013; 11 years ago (2013-02-01)
|2013|02|01|df=y 1 February 2013; 11 years ago (2013-02-01) 1 February 2013; 11 years ago (2013-02-01)
|2013|02|01|df=1 1 February 2013; 11 years ago (2013-02-01) 1 February 2013; 11 years ago (2013-02-01)
|2010|1|2|df=no January 2, 2010; 14 years ago (2010-01-02) January 2, 2010; 14 years ago (2010-01-02)
|2008|8|9|df=n August 9, 2008; 16 years ago (2008-08-09) August 9, 2008; 16 years ago (2008-08-09)
|2003|7|5|df=0 July 5, 2003; 21 years ago (2003-07-05) July 5, 2003; 21 years ago (2003-07-05)
100 days ago:
|2024|7|25
July 25, 2024; 3 months ago (2024-07-25) July 25, 2024; 3 months ago (2024-07-25)
Yesterday:
|2024|11|1
November 1, 2024; 1 day ago (2024-11-01) November 1, 2024; 1 day ago (2024-11-01)
Today:
|2024|11|2
November 2, 2024; 0 days ago (2024-11-02) November 2, 2024; 0 days ago (2024-11-02)
Tomorrow:
|2024|11|3
November 3, 2024; 0 days' time (2024-11-03) November 3, 2024; 0 days' time (2024-11-03)
In 4 days:
|2024|11|6
November 6, 2024; 3 days' time (2024-11-06) November 6, 2024; 3 days' time (2024-11-06)
In 1 month:
|2024|12|2
December 2, 2024; 29 days' time (2024-12-02) December 2, 2024; 29 days' time (2024-12-02)
In 76 days (2.5 months -1 day):
|2025|1|17
January 17, 2025; 2 months' time (2025-01-17) January 17, 2025; 2 months' time (2025-01-17)
In 77 days (2.5 months +1 day):
|2025|1|18
January 18, 2025; 2 months' time (2025-01-18) January 18, 2025; 2 months' time (2025-01-18)
In 910 days (2.5 yrs -a bit):
|2027|5|1
May 1, 2027; 2 years' time (2027-05-01) May 1, 2027; 2 years' time (2027-05-01)
In 920 days (2.5 yrs +a bit):
|2027|5|11
May 11, 2027; 2 years' time (2027-05-11) May 11, 2027; 2 years' time (2027-05-11)
Year and month
|2002|03 March 2002; 22 years ago (2002-03) March 2002; 22 years ago (2002-03)
|2002|11 November 2002; 22 years ago (2002-11) November 2002; 22 years ago (2002-11)
-11 months:
|2023|12
December 2023; 11 months ago (2023-12) December 2023; 11 months ago (2023-12)
+11 months:
|2025|10
October 2025; 11 months' time (2025-10) October 2025; 11 months' time (2025-10)
|2022|03 March 2022; 2 years ago (2022-03) March 2022; 2 years ago (2022-03)
|2022|11 November 2022; 2 years ago (2022-11) November 2022; 2 years ago (2022-11)
Year only
-10 yrs:
|2014
2014; 10 years ago (2014) 2014; 10 years ago (2014)
+10 yrs:
|2034
2034; 10 years' time (2034) 2034; 10 years' time (2034)
+11 yrs:
|2035
2035; 11 years' time (2035) 2035; 11 years' time (2035)

Optional separator: parentheses

[edit]
Parameters Current template Sandbox template
Full date (year, month, day)
|2003|02|15|paren=yes February 15, 2003 (21 years ago) (2003-02-15) February 15, 2003 (21 years ago) (2003-02-15)
|2003|02|15|p=y February 15, 2003 (21 years ago) (2003-02-15) February 15, 2003 (21 years ago) (2003-02-15)
|2003|02|15|p=1 February 15, 2003 (21 years ago) (2003-02-15) February 15, 2003 (21 years ago) (2003-02-15)
|2003|02|15|df=y|p=y 15 February 2003 (21 years ago) (2003-02-15) 15 February 2003 (21 years ago) (2003-02-15)
Year and month
|2003|02|p=y February 2003 (21 years ago) (2003-02) February 2003 (21 years ago) (2003-02)
Year only
|2003|paren=yes 2003 (21 years ago) (2003) 2003 (21 years ago) (2003)

Line break with semicolon

[edit]
Parameters Current template Sandbox template
Full date (year, month, day)
|2003|02|15|br=yes February 15, 2003;
21 years ago
 (2003-02-15)
February 15, 2003;
21 years ago
 (2003-02-15)
Year and month
|2003|02|br=y February 2003;
21 years ago
 (2003-02)
February 2003;
21 years ago
 (2003-02)
Year only
|2003|br=1 2003;
21 years ago
 (2003)
2003;
21 years ago
 (2003)

Line break with parentheses

[edit]
Parameters Current template Sandbox template
Full date (year, month, day)
|2003|02|15|p=yes|br=yes February 15, 2003
(21 years ago)
 (2003-02-15)
February 15, 2003
(21 years ago)
 (2003-02-15)
Year and month
|2003|02|p=y|br=y February 2003
(21 years ago)
 (2003-02)
February 2003
(21 years ago)
 (2003-02)
Year only
|2003|p=1|br=1 2003
(21 years ago)
 (2003)
2003
(21 years ago)
 (2003)

Year and month only (no day)

[edit]
Parameters Current template Sandbox template
|2022|11 November 2022; 2 years ago (2022-11) November 2022; 2 years ago (2022-11)
|2023|10 October 2023; 1 year ago (2023-10) October 2023; 1 year ago (2023-10)
|2023|11 November 2023; 1 year ago (2023-11) November 2023; 1 year ago (2023-11)
|2023|12 December 2023; 11 months ago (2023-12) December 2023; 11 months ago (2023-12)
|2024|1 January 2024; 10 months ago (2024-01) January 2024; 10 months ago (2024-01)
|2024|2 February 2024; 9 months ago (2024-02) February 2024; 9 months ago (2024-02)
|2024|3 March 2024; 8 months ago (2024-03) March 2024; 8 months ago (2024-03)
|2024|4 April 2024; 7 months ago (2024-04) April 2024; 7 months ago (2024-04)
|2024|5 May 2024; 6 months ago (2024-05) May 2024; 6 months ago (2024-05)
|2024|6 June 2024; 5 months ago (2024-06) June 2024; 5 months ago (2024-06)
|2024|7 July 2024; 4 months ago (2024-07) July 2024; 4 months ago (2024-07)
|2024|8 August 2024; 3 months ago (2024-08) August 2024; 3 months ago (2024-08)
|2024|9 September 2024; 2 months ago (2024-09) September 2024; 2 months ago (2024-09)
|2024|10 October 2024; 1 month ago (2024-10) October 2024; 1 month ago (2024-10)
|2024|11 November 2024; 0 months ago (2024-11) November 2024; 0 months ago (2024-11)
|2024|12 December 2024; 1 month's time (2024-12) December 2024; 1 month's time (2024-12)
|2025|1 January 2025; 2 months' time (2025-01) January 2025; 2 months' time (2025-01)
|2025|2 February 2025; 3 months' time (2025-02) February 2025; 3 months' time (2025-02)
|2025|3 March 2025; 4 months' time (2025-03) March 2025; 4 months' time (2025-03)

Year only (no month or day)

[edit]
Parameters Current template Sandbox template
|2022 2022; 2 years ago (2022) 2022; 2 years ago (2022)
|2023 2023; 1 year ago (2023) 2023; 1 year ago (2023)
|2024 2024; 0 years ago (2024) 2024; 0 years ago (2024)
|2025 2025; 1 year's time (2025) 2025; 1 year's time (2025)
|2026 2026; 2 years' time (2026) 2026; 2 years' time (2026)

Month as text (name or abbreviation)

[edit]
Parameters Current template Sandbox template
Year, month, day
|2001|August|19 August 19, 2001; 23 years ago (2001-08-19) August 19, 2001; 23 years ago (2001-08-19)
|2001|Aug|19|df=yes 19 August 2001; 23 years ago (2001-08-19) 19 August 2001; 23 years ago (2001-08-19)
Year and month (no day)
|2002|September September 2002; 22 years ago (2002-09) September 2002; 22 years ago (2002-09)
|2002|Sep September 2002; 22 years ago (2002-09) September 2002; 22 years ago (2002-09)
|2002|Sept September 2002; 22 years ago (2002-09) September 2002; 22 years ago (2002-09)

Undocumented usage

[edit]
Parameters Current template Sandbox template
Year, month, day
|October 20, 2003 October 20, 2003; 21 years ago (October 20, 2003) October 20, 2003; 21 years ago (October 20, 2003)
|20 October 2003 20 October 2003; 21 years ago (20 October 2003) 20 October 2003; 21 years ago (20 October 2003)
|Oct. 20, 2003 Oct. 20, 2003; 21 years ago (Oct. 20, 2003) Oct. 20, 2003; 21 years ago (Oct. 20, 2003)
|20 Oct 2003 20 Oct 2003; 21 years ago (20 Oct 2003) 20 Oct 2003; 21 years ago (20 Oct 2003)
Year and month (no day)
|November 2004 November 2004; 20 years ago (November 2004) November 2004; 20 years ago (November 2004)
|Nov. 2004 Nov. 2004; 20 years ago (Nov. 2004) Nov. 2004; 20 years ago (Nov. 2004)

Empty/Missing parameters

[edit]
Parameters Current template Sandbox template
No year
No parameters  ()  ()
||12|20 Error: first parameter is missing. () Error: first parameter is missing. ()
||12| Error: first parameter is missing. () Error: first parameter is missing. ()
|||20 Error: first parameter is missing. () Error: first parameter is missing. ()
No month
|2001||20 2001; 23 years ago (2001) 2001; 23 years ago (2001)
|2001|| 2001; 23 years ago (2001) 2001; 23 years ago (2001)
No day
|2001|12| December 2001; 22 years ago (2001-12) December 2001; 22 years ago (2001-12)
|2001|| 2001; 23 years ago (2001) 2001; 23 years ago (2001)