Template:Start date and age/testcases
Appearance
| This is the template test cases page for the sandbox of Template:Start date and age. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Default separator: semicolon
[edit]| Parameters | Current template | Sandbox template |
|---|---|---|
| Full date (year, month, day) | ||
|2013|02|01 |
February 1, 2013 | February 1, 2013 |
|2013|02|01|df=yes |
1 February 2013 | 1 February 2013 |
|df=yes|2013|02|01 |
1 February 2013 | 1 February 2013 |
|2013|02|01|df=y |
1 February 2013 | 1 February 2013 |
100 days ago:|2026|5|4 |
May 4, 2026 | May 4, 2026 |
Yesterday:|2026|8|11 |
August 11, 2026 | August 11, 2026 |
Today:|2026|8|12 |
August 12, 2026 | August 12, 2026 |
Tomorrow:|2026|8|13 |
August 13, 2026 | August 13, 2026 |
In 4 days:|2026|8|16 |
August 16, 2026 | August 16, 2026 |
In 1 month:|2026|9|12 |
September 12, 2026 | September 12, 2026 |
In 76 days (2.5 months -1 day):|2026|10|27 |
October 27, 2026 | October 27, 2026 |
In 77 days (2.5 months +1 day):|2026|10|28 |
October 28, 2026 | October 28, 2026 |
In 910 days (2.5 yrs -a bit):|2029|2|7 |
February 7, 2029 | February 7, 2029 |
In 920 days (2.5 yrs +a bit):|2029|2|17 |
February 17, 2029 | February 17, 2029 |
| Year and month | ||
|2002|03 |
March 2002 | March 2002 |
|2002|11 |
November 2002 | November 2002 |
-11 months:|2025|9 |
September 2025 | September 2025 |
+11 months:|2027|7 |
July 2027 | July 2027 |
|2022|03 |
March 2022 | March 2022 |
|2022|11 |
November 2022 | November 2022 |
| Year only | ||
-10 yrs:|2016 |
2016 | 2016 |
+10 yrs:|2036 |
2036 | 2036 |
+11 yrs:|2037 |
2037 | 2037 |
Optional separator: parentheses
[edit]| Parameters | Current template | Sandbox template |
|---|---|---|
| Full date (year, month, day) | ||
|2003|02|15|paren=yes |
February 15, 2003 | February 15, 2003 |
|2003|02|15|p=y |
February 15, 2003 | February 15, 2003 |
|2003|02|15|p=1 |
February 15, 2003 | ERROR: p must be either "yes" or "y" (help) |
|2003|02|15|df=y|p=y |
15 February 2003 | 15 February 2003 |
| Year and month | ||
|2003|02|p=y |
February 2003 | February 2003 |
| Year only | ||
|2003|paren=yes |
2003 | 2003 |
Line break with semicolon
[edit]| Parameters | Current template | Sandbox template |
|---|---|---|
| Full date (year, month, day) | ||
|2003|02|15|br=yes |
February 15, 2003 | February 15, 2003 |
| Year and month | ||
|2003|02|br=y |
February 2003 | February 2003 |
| Year only | ||
|2003|br=1 |
2003 | ERROR: br must be either "yes" or "y" (help) |
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 | February 15, 2003 |
| Year and month | ||
|2003|02|p=y|br=y |
February 2003 | February 2003 |
| Year only | ||
|2003|p=1|br=1 |
2003 | ERROR: p must be either "yes" or "y" (help) |
Year and month only (no day)
[edit]| Parameters | Current template | Sandbox template |
|---|---|---|
|2024|11 |
November 2024 | November 2024 |
|2025|10 |
October 2025 | October 2025 |
|2025|11 |
November 2025 | November 2025 |
|2025|12 |
December 2025 | December 2025 |
|2026|1 |
January 2026 | January 2026 |
|2026|2 |
February 2026 | February 2026 |
|2026|3 |
March 2026 | March 2026 |
|2026|4 |
April 2026 | April 2026 |
|2026|5 |
May 2026 | May 2026 |
|2026|6 |
June 2026 | June 2026 |
|2026|7 |
July 2026 | July 2026 |
|2026|8 |
August 2026 | August 2026 |
|2026|9 |
September 2026 | September 2026 |
|2026|10 |
October 2026 | October 2026 |
|2026|11 |
November 2026 | November 2026 |
|2026|12 |
December 2026 | December 2026 |
|2027|1 |
January 2027 | January 2027 |
|2027|2 |
February 2027 | February 2027 |
|2027|3 |
March 2027 | March 2027 |
Year only (no month or day)
[edit]| Parameters | Current template | Sandbox template |
|---|---|---|
|2024 |
2024 | 2024 |
|2025 |
2025 | 2025 |
|2026 |
2026 | 2026 |
|2027 |
2027 | 2027 |
|2028 |
2028 | 2028 |
Month as text (name or abbreviation)
[edit]| Parameters | Current template | Sandbox template |
|---|---|---|
| Year, month, day | ||
|2001|August|19 |
August 19, 2001 | ERROR: All values must be integers (help) |
|2001|Aug|19|df=yes |
19 August 2001 | ERROR: All values must be integers (help) |
| Year and month (no day) | ||
|2002|September |
September 2002 | ERROR: All values must be integers (help) |
|2002|Sep |
September 2002 | ERROR: All values must be integers (help) |
|2002|Sept |
September 2002 | ERROR: All values must be integers (help) |
Undocumented usage
[edit]| Parameters | Current template | Sandbox template |
|---|---|---|
| Year, month, day | ||
|October 20, 2003 |
October 20, 2003 | ERROR: All values must be integers (help) |
|20 October 2003 |
20 October 2003 | ERROR: All values must be integers (help) |
|Oct. 20, 2003 |
Oct. 20, 2003 | ERROR: All values must be integers (help) |
|20 Oct 2003 |
20 Oct 2003 | ERROR: All values must be integers (help) |
| Year and month (no day) | ||
|November 2004 |
November 2004 | ERROR: All values must be integers (help) |
|Nov. 2004 |
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 | ERROR: Month value is required when a day is provided (help) |
|2001|| |
2001 | 2001 |
| No day | ||
|2001|12| |
December 2001 | December 2001 |
|2001|| |
2001 | 2001 |