Template:Years or months ago/testcases
Jump to navigation
Jump to search
| This is the template test cases page for the sandbox of Template:Years or months ago. Script error: No such module "Purge". 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 January 2022 as the current month and year. If that is not correct, click purge to update the page.nooooooo
Contents
Live template vs. Sandbox
Year and month
| Parameters | Live template | Sandbox template | {{Start date and age}} | {{Time ago}} | {{Time ago}} min = months |
|---|---|---|---|---|---|
| Prior years | |||||
|2020|1
|
2 years ago | 2 years ago | January 2020 | 2 years ago | 2 years ago |
|2021|1
|
1 year ago | 1 year ago | January 2021 | 12 months ago | 12 months ago |
|2021|2
|
11 months ago | 11 months ago | February 2021 | 11 months ago | 11 months ago |
|2021|3
|
10 months ago | 10 months ago | March 2021 | 10 months ago | 10 months ago |
|2021|4
|
9 months ago | 9 months ago | April 2021 | 9 months ago | 9 months ago |
|2021|5
|
8 months ago | 8 months ago | May 2021 | 8 months ago | 8 months ago |
|2021|6
|
7 months ago | 7 months ago | June 2021 | 7 months ago | 7 months ago |
|2021|7
|
6 months ago | 6 months ago | July 2021 | 6 months ago | 6 months ago |
|2021|8
|
5 months ago | 5 months ago | August 2021 | 5 months ago | 5 months ago |
|2021|9
|
4 months ago | 4 months ago | September 2021 | 4 months ago | 4 months ago |
|2021|10
|
3 months ago | 3 months ago | October 2021 | 3 months ago | 3 months ago |
|2021|11
|
2 months ago | 2 months ago | November 2021 | 2 months ago | 2 months ago |
|2021|12
|
1 month ago | 1 month ago | December 2021 | 32 days ago | 1 month ago |
| Current year | |||||
|2022|1
|
0 months ago | 0 months ago | January 2022 | 32 hours ago | 0 months ago |
|2022|2
|
1 month's time | 1 month's time | February 2022 | 29 days' time | 0 months' time |
|2022|3
|
2 months' time | 2 months' time | March 2022 | 57 days' time | 1 month's time |
|2022|4
|
3 months' time | 3 months' time | April 2022 | 2 months' time | 2 months' time |
|2022|5
|
4 months' time | 4 months' time | May 2022 | 3 months' time | 3 months' time |
|2022|6
|
5 months' time | 5 months' time | June 2022 | 4 months' time | 4 months' time |
|2022|7
|
6 months' time | 6 months' time | July 2022 | 5 months' time | 5 months' time |
|2022|8
|
7 months' time | 7 months' time | August 2022 | 6 months' time | 6 months' time |
|2022|9
|
8 months' time | 8 months' time | September 2022 | 7 months' time | 7 months' time |
|2022|10
|
9 months' time | 9 months' time | October 2022 | 8 months' time | 8 months' time |
|2022|11
|
10 months' time | 10 months' time | November 2022 | 9 months' time | 9 months' time |
|2022|12
|
11 months' time | 11 months' time | December 2022 | 10 months' time | 10 months' time |
| Future years | |||||
|2023|1
|
1 year's time | 1 year's time | January 2023 | 11 months' time | 11 months' time |
|2023|2
|
1 years' time | 1 years' time | February 2023 | 12 months' time | 12 months' time |
|2023|3
|
1 years' time | 1 years' time | March 2023 | 13 months' time | 13 months' time |
|2023|4
|
1 years' time | 1 years' time | April 2023 | 14 months' time | 14 months' time |
|2023|5
|
1 years' time | 1 years' time | May 2023 | 15 months' time | 15 months' time |
|2023|6
|
1 years' time | 1 years' time | June 2023 | 16 months' time | 16 months' time |
|2023|7
|
1 years' time | 1 years' time | July 2023 | 17 months' time | 17 months' time |
|2023|8
|
1 years' time | 1 years' time | August 2023 | 18 months' time | 18 months' time |
|2023|9
|
1 years' time | 1 years' time | September 2023 | 19 months' time | 19 months' time |
|2023|10
|
1 years' time | 1 years' time | October 2023 | 20 months' time | 20 months' time |
|2023|11
|
1 years' time | 1 years' time | November 2023 | 21 months' time | 21 months' time |
|2023|12
|
1 years' time | 1 years' time | December 2023 | 22 months' time | 22 months' time |
|2024|12
|
2 years' time | 2 years' time | December 2024 | 2 years' time | 2 years' time |
Year only (no month)
| Parameters | Live template | Sandbox template | {{Start date and age}} | {{Time ago}} | {{Time ago}} min = years |
|---|---|---|---|---|---|
|2020
|
2 years ago | 2 years ago | 2020 | 2 years ago | 2 years ago |
|2021
|
1 year ago | 1 year ago | 2021 | 12 months ago | 1 year ago |
|2022
|
0 years ago | 0 years ago | 2022 | 8 hours ago | 0 years ago |
|2023
|
1 year's time | 1 year's time | 2023 | 12 months' time | 1 year's time |
|2024
|
2 years' time | 2 years' time | 2024 | 24 months' time | 2 years' time |
Non-breaking space
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}} |
|---|---|---|---|
|2019
|
3 years ago
|
3 years ago
|
2 years ago
|
|2020
|
2 years ago
|
2 years ago
|
13 months ago
|
|2021|9
|
4 months ago
|
4 months ago
|
3 months ago
|
|2021|12
|
1 month ago
|
1 month ago
|
31 days ago
|
|2022|2
|
1 month's time
|
1 month's time
|
31 days' time
|
|2022|4
|
3 months' time
|
3 months' time
|
3 months' time
|
|2023
|
1 year's time
|
1 year's time
|
13 months' time
|
|2024
|
2 years' time
|
2 years' time
|
2 years' time
|
No parameters
| Live template | Sandbox template |
|---|---|
| 0 years ago | 0 years ago |
Live template vs. Template:Time ago (with min_magnitude)
Year and month
| Template | Output | {{Time ago}} template | {{Time ago}} output |
|---|---|---|---|
{{Years or months ago|2020|1}}
|
2 years ago | {{Time ago|2020-1|min_magnitude=months}}
|
2 years ago |
{{Years or months ago|2021|1}}
|
1 year ago | {{Time ago|2021-1|min_magnitude=months}}
|
12 months ago |
{{Years or months ago|2019|10}}
|
2 years ago | {{Time ago|2019-10|min_magnitude=months}}
|
2 years ago |
{{Years or months ago|2020|11}}
|
1 year ago | {{Time ago|2020-11|min_magnitude=months}}
|
14 months ago |
{{Years or months ago|2021|12}}
|
1 month ago | {{Time ago|2021-12|min_magnitude=months}}
|
1 month ago |
{{Years or months ago|2022|1}}
|
0 months ago | {{Time ago|2022-1|min_magnitude=months}}
|
0 months ago |
{{Years or months ago|2022|2}}
|
1 month's time | {{Time ago|2022-2|min_magnitude=months}}
|
0 months' time |
{{Years or months ago|2022|3}}
|
2 months' time | {{Time ago|2022-3|min_magnitude=months}}
|
1 month's time |
{{Years or months ago|2023|1}}
|
1 year's time | {{Time ago|2023-1|min_magnitude=months}}
|
11 months' time |
{{Years or months ago|2024|1}}
|
2 years' time | {{Time ago|2024-1|min_magnitude=months}}
|
23 months' time |
Year only (no month)
| Template | Output | {{Time ago}} template | {{Time ago}} output |
|---|---|---|---|
{{Years or months ago|2020}}
|
2 years ago | {{Time ago|2020|min_magnitude=years}}
|
2 years ago |
{{Years or months ago|2021}}
|
1 year ago | {{Time ago|2021|min_magnitude=years}}
|
1 year ago |
{{Years or months ago|2022}}
|
0 years ago | {{Time ago|2022|min_magnitude=years}}
|
0 years ago |
{{Years or months ago|2023}}
|
1 year's time | {{Time ago|2023|min_magnitude=years}}
|
1 year's time |
{{Years or months ago|2024}}
|
2 years' time | {{Time ago|2024|min_magnitude=years}}
|
2 years' time |