Template:Years or months ago/testcases
From IDU Wiki
Jump to navigationJump to search
| File:Gnome-applications-science.svg | This is the template test cases page for the sandbox of Template:Years or months ago. 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 with these links: |
The following examples use May 2026 as the current month and year. If that is not correct, click purge to update the page.
Live template vs. Sandbox[edit source]
Year and month[edit source]
| Parameters | Live template | Sandbox template | {{Start date and age}} | {{Time ago}} | {{Time ago}} min = months |
|---|---|---|---|---|---|
| Prior years | |||||
|2024|1
|
2 years ago | 2 years ago | January 2024 | 2 years ago | 2 years ago |
|2025|1
|
1 year ago | 1 year ago | January 2025 | 16 months ago | 16 months ago |
|2025|2
|
1 year ago | 1 year ago | February 2025 | 15 months ago | 15 months ago |
|2025|3
|
1 year ago | 1 year ago | March 2025 | 14 months ago | 14 months ago |
|2025|4
|
1 year ago | 1 year ago | April 2025 | 13 months ago | 13 months ago |
|2025|5
|
1 year ago | 1 year ago | May 2025 | 12 months ago | 12 months ago |
|2025|6
|
11 months ago | 11 months ago | June 2025 | 11 months ago | 11 months ago |
|2025|7
|
10 months ago | 10 months ago | July 2025 | 10 months ago | 10 months ago |
|2025|8
|
9 months ago | 9 months ago | August 2025 | 9 months ago | 9 months ago |
|2025|9
|
8 months ago | 8 months ago | September 2025 | 8 months ago | 8 months ago |
|2025|10
|
7 months ago | 7 months ago | October 2025 | 7 months ago | 7 months ago |
|2025|11
|
6 months ago | 6 months ago | November 2025 | 6 months ago | 6 months ago |
|2025|12
|
5 months ago | 5 months ago | December 2025 | 5 months ago | 5 months ago |
| Current year | |||||
|2026|1
|
4 months ago | 4 months ago | January 2026 | 4 months ago | 4 months ago |
|2026|2
|
3 months ago | 3 months ago | February 2026 | 3 months ago | 3 months ago |
|2026|3
|
2 months ago | 2 months ago | March 2026 | 2 months ago | 2 months ago |
|2026|4
|
1 month ago | 1 month ago | April 2026 | 58 days ago | 1 month ago |
|2026|5
|
0 months ago | 0 months ago | May 2026 | 28 days ago | 0 months ago |
|2026|6
|
1 month's time | 1 month hence | June 2026 | 2 days' time | 0 months' time |
|2026|7
|
2 months' time | 2 months hence | July 2026 | 32 days' time | 1 month's time |
|2026|8
|
3 months' time | 3 months hence | August 2026 | 2 months' time | 2 months' time |
|2026|9
|
4 months' time | 4 months hence | September 2026 | 3 months' time | 3 months' time |
|2026|10
|
5 months' time | 5 months hence | October 2026 | 4 months' time | 4 months' time |
|2026|11
|
6 months' time | 6 months hence | November 2026 | 5 months' time | 5 months' time |
|2026|12
|
7 months' time | 7 months hence | December 2026 | 5 months' time | 5 months' time |
| Future years | |||||
|2027|1
|
8 months' time | 8 months hence | January 2027 | 6 months' time | 6 months' time |
|2027|2
|
9 months' time | 9 months hence | February 2027 | 7 months' time | 7 months' time |
|2027|3
|
10 months' time | 10 months hence | March 2027 | 8 months' time | 8 months' time |
|2027|4
|
11 months' time | 11 months hence | April 2027 | 9 months' time | 9 months' time |
|2027|5
|
1 year's time | 1 year hence | May 2027 | 10 months' time | 10 months' time |
|2027|6
|
1 year's time | 1 year hence | June 2027 | 11 months' time | 11 months' time |
|2027|7
|
1 year's time | 1 year hence | July 2027 | 12 months' time | 12 months' time |
|2027|8
|
1 year's time | 1 year hence | August 2027 | 13 months' time | 13 months' time |
|2027|9
|
1 year's time | 1 year hence | September 2027 | 14 months' time | 14 months' time |
|2027|10
|
1 year's time | 1 year hence | October 2027 | 15 months' time | 15 months' time |
|2027|11
|
1 year's time | 1 year hence | November 2027 | 16 months' time | 16 months' time |
|2027|12
|
1 year's time | 1 year hence | December 2027 | 17 months' time | 17 months' time |
|2028|12
|
2 years' time | 2 years hence | December 2028 | 2 years' time | 2 years' time |
Year only (no month)[edit source]
| Parameters | Live template | Sandbox template | {{Start date and age}} | {{Time ago}} | {{Time ago}} min = years |
|---|---|---|---|---|---|
|2024
|
2 years ago | 2 years ago | 2024 | 2 years ago | 2 years ago |
|2025
|
1 year ago | 1 year ago | 2025 | 11 months ago | 1 year ago |
|2026
|
0 years ago | 0 years ago | 2026 | 15 hours ago | 0 years ago |
|2027
|
1 year's time | 1 year hence | 2027 | 11 months' time | 0 years' time |
|2028
|
2 years' time | 2 years hence | 2028 | 23 months' time | 1 year's time |
Non-breaking space[edit source]
Test use of a non-breaking space between the number and the units (years, months, etc). A breaking space is used between the units and "ago" (similar to the output of Template:Time ago). These examples are placed inside a narrow <div> to force a line break.
| Parameters | Live template | Sandbox template | {{Time ago}} |
|---|---|---|---|
|2024
|
2 years ago
|
2 years ago
|
2 years ago
|
|2025
|
1 year ago
|
1 year ago
|
12 months ago
|
|2026|2
|
3 months ago
|
3 months ago
|
3 months ago
|
|2026|4
|
1 month ago
|
1 month ago
|
31 days ago
|
|2026|6
|
1 month's time
|
1 month hence
|
31 days' time
|
|2026|9
|
4 months' time
|
4 months hence
|
3 months' time
|
|2027
|
1 year's time
|
1 year hence
|
12 months' time
|
|2028
|
2 years' time
|
2 years hence
|
2 years' time
|
No parameters[edit source]
| Live template | Sandbox template |
|---|---|
| 0 years ago | 0 years ago |
Live template vs. Template:Time ago (with min_magnitude)[edit source]
Year and month[edit source]
| Template | Output | {{Time ago}} template | {{Time ago}} output |
|---|---|---|---|
{{Years or months ago|2024|5}}
|
2 years ago | {{Time ago|2024-5|min_magnitude=months}}
|
2 years ago |
{{Years or months ago|2025|5}}
|
1 year ago | {{Time ago|2025-5|min_magnitude=months}}
|
12 months ago |
{{Years or months ago|2026|2}}
|
3 months ago | {{Time ago|2026-2|min_magnitude=months}}
|
3 months ago |
{{Years or months ago|2026|3}}
|
2 months ago | {{Time ago|2026-3|min_magnitude=months}}
|
2 months ago |
{{Years or months ago|2026|4}}
|
1 month ago | {{Time ago|2026-4|min_magnitude=months}}
|
1 month ago |
{{Years or months ago|2026|5}}
|
0 months ago | {{Time ago|2026-5|min_magnitude=months}}
|
0 months ago |
{{Years or months ago|2026|6}}
|
1 month's time | {{Time ago|2026-6|min_magnitude=months}}
|
0 months' time |
{{Years or months ago|2026|7}}
|
2 months' time | {{Time ago|2026-7|min_magnitude=months}}
|
1 month's time |
{{Years or months ago|2027|5}}
|
1 year's time | {{Time ago|2027-5|min_magnitude=months}}
|
10 months' time |
{{Years or months ago|2028|5}}
|
2 years' time | {{Time ago|2028-5|min_magnitude=months}}
|
22 months' time |
Year only (no month)[edit source]
| Template | Output | {{Time ago}} template | {{Time ago}} output |
|---|---|---|---|
{{Years or months ago|2024}}
|
2 years ago | {{Time ago|2024|min_magnitude=years}}
|
2 years ago |
{{Years or months ago|2025}}
|
1 year ago | {{Time ago|2025|min_magnitude=years}}
|
1 year ago |
{{Years or months ago|2026}}
|
0 years ago | {{Time ago|2026|min_magnitude=years}}
|
0 years ago |
{{Years or months ago|2027}}
|
1 year's time | {{Time ago|2027|min_magnitude=years}}
|
0 years' time |
{{Years or months ago|2028}}
|
2 years' time | {{Time ago|2028|min_magnitude=years}}
|
1 year's time |