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; 12 years ago (2013-02-01) February 1, 2013; 12 years ago (2013-02-01)
|2013|02|01|df=yes 1 February 2013; 12 years ago (2013-02-01) 1 February 2013; 12 years ago (2013-02-01)
|df=yes|2013|02|01 1 February 2013; 12 years ago (2013-02-01) 1 February 2013; 12 years ago (2013-02-01)
|2013|02|01|df=y 1 February 2013; 12 years ago (2013-02-01) 1 February 2013; 12 years ago (2013-02-01)
100 days ago:
|2024|12|27
December 27, 2024; 3 months ago (2024-12-27) December 27, 2024; 3 months ago (2024-12-27)
Yesterday:
|2025|4|5
April 5, 2025; 1 day ago (2025-04-05) April 5, 2025; 1 day ago (2025-4-5)
Today:
|2025|4|6
April 6, 2025; 0 days ago (2025-04-06) April 6, 2025; 0 days ago (2025-4-6)
Tomorrow:
|2025|4|7
April 7, 2025; 0 days' time (2025-04-07) April 7, 2025; 0 days' time (2025-4-7)
In 4 days:
|2025|4|10
April 10, 2025; 3 days' time (2025-04-10) April 10, 2025; 3 days' time (2025-4-10)
In 1 month:
|2025|5|6
May 6, 2025; 29 days' time (2025-05-06) May 6, 2025; 29 days' time (2025-5-6)
In 76 days (2.5 months -1 day):
|2025|6|21
June 21, 2025; 2 months' time (2025-06-21) June 21, 2025; 2 months' time (2025-6-21)
In 77 days (2.5 months +1 day):
|2025|6|22
June 22, 2025; 2 months' time (2025-06-22) June 22, 2025; 2 months' time (2025-6-22)
In 910 days (2.5 yrs -a bit):
|2027|10|3
October 3, 2027; 2 years' time (2027-10-03) October 3, 2027; 2 years' time (2027-10-3)
In 920 days (2.5 yrs +a bit):
|2027|10|13
October 13, 2027; 2 years' time (2027-10-13) October 13, 2027; 2 years' time (2027-10-13)
Year and month
|2002|03 March 2002; 23 years ago (2002-03) March 2002; 23 years ago (2002-03)
|2002|11 November 2002; 22 years ago (2002-11) November 2002; 22 years ago (2002-11)
-11 months:
|2024|5
May 2024; 11 months ago (2024-05) May 2024; 11 months ago (2024-5)
+11 months:
|2026|3
March 2026; 11 months' time (2026-03) March 2026; 10 months' time (2026-3)
|2022|03 March 2022; 3 years ago (2022-03) March 2022; 3 years ago (2022-03)
|2022|11 November 2022; 2 years ago (2022-11) November 2022; 2 years ago (2022-11)
Year only
-10 yrs:
|2015
2015; 10 years ago (2015) 2015; 10 years ago (2015)
+10 yrs:
|2035
2035; 10 years' time (2035) 2035; 10 years' time (2035)
+11 yrs:
|2036
2036; 11 years' time (2036) 2036; 11 years' time (2036)

Optional separator: parentheses

[edit]
Parameters Current template Sandbox template
Full date (year, month, day)
|2003|02|15|paren=yes February 15, 2003 (22 years ago) (2003-02-15) February 15, 2003 (22 years ago) (2003-02-15)
|2003|02|15|p=y February 15, 2003 (22 years ago) (2003-02-15) February 15, 2003 (22 years ago) (2003-02-15)
|2003|02|15|p=1 February 15, 2003 (22 years ago) (2003-02-15) February 15, 2003 (22 years ago) (2003-02-15)
|2003|02|15|df=y|p=y 15 February 2003 (22 years ago) (2003-02-15) 15 February 2003 (22 years ago) (2003-02-15)
Year and month
|2003|02|p=y February 2003 (22 years ago) (2003-02) February 2003 (22 years ago) (2003-02)
Year only
|2003|paren=yes 2003 (22 years ago) (2003) 2003 (22 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;
22 years ago
 (2003-02-15)
February 15, 2003;
22 years ago
 (2003-02-15)
Year and month
|2003|02|br=y February 2003;
22 years ago
 (2003-02)
February 2003;
22 years ago
 (2003-02)
Year only
|2003|br=1 2003;
22 years ago
 (2003)
2003;
22 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
(22 years ago)
 (2003-02-15)
February 15, 2003
(22 years ago)
 (2003-02-15)
Year and month
|2003|02|p=y|br=y February 2003
(22 years ago)
 (2003-02)
February 2003
(22 years ago)
 (2003-02)
Year only
|2003|p=1|br=1 2003
(22 years ago)
 (2003)
2003
(22 years ago)
 (2003)

Year and month only (no day)

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

Year only (no month or day)

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

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) Error: All values must be integers (help)
|2001|Aug|19|df=yes 19 August 2001; 23 years ago (2001-08-19) Error: All values must be integers (help)
Year and month (no day)
|2002|September September 2002; 22 years ago (2002-09) Error: All values must be integers (help)
|2002|Sep September 2002; 22 years ago (2002-09) Error: All values must be integers (help)
|2002|Sept September 2002; 22 years ago (2002-09) Error: All values must be integers (help)

Undocumented usage

[edit]
Parameters Current template Sandbox template
Year, month, day
|October 20, 2003 October 20, 2003; 21 years ago (October 20, 2003) Error: All values must be integers (help)
|20 October 2003 20 October 2003; 21 years ago (20 October 2003) Error: All values must be integers (help)
|Oct. 20, 2003 Oct. 20, 2003; 21 years ago (Oct. 20, 2003) Error: All values must be integers (help)
|20 Oct 2003 20 Oct 2003; 21 years ago (20 Oct 2003) Error: All values must be integers (help)
Year and month (no day)
|November 2004 November 2004; 20 years ago (November 2004) Error: All values must be integers (help)
|Nov. 2004 Nov. 2004; 20 years ago (Nov. 2004) Error: All values must be integers (help)

Empty/Missing parameters

[edit]
Parameters Current template Sandbox template
No year
No parameters  () Error: Year value is required (help)
||12|20 Error: first parameter is missing. () Error: Year value is required (help)
||12| Error: first parameter is missing. () Error: Year value is required (help)
|||20 Error: first parameter is missing. () Error: Year value is required (help)
No month
|2001||20 2001; 24 years ago (2001) Error: Month value is required when a day is provided (help)
|2001|| 2001; 24 years ago (2001) 2001; 24 years ago (2001)
No day
|2001|12| December 2001; 23 years ago (2001-12) December 2001; 23 years ago (2001-12)
|2001|| 2001; 24 years ago (2001) 2001; 24 years ago (2001)