Template:Year2range
Appearance
Usage
This template takes a year in the form of a positive number of up to 4 digits and converts it to a range, thus :
{{Year2range|2025}}
→ 2025–26{{Year2range|{{CURRENTYEAR}}}}
→ 2025–26{{Year2range| {{#expr:2025+1}} }}
→ 2026–27{{Year2range| {{#expr:2025-8}} }}
→ 2017–18{{Year2range|1999}}
→ 1999–2000{{Year2range|1899}}
→ 1899–1900{{Year2range|999}}
→ 999–1000{{Year2range|32}}
→ 32–33{{Year2range|3}}
→ 3–4{{Year2range|}}
→{{Year2range|12345}}
→ Error!! Template:Year2range expects a number of up to four digits.{{Year2range|Nineteen Eighty Four}}
→ Error!! Template:Year2range expects a number of up to four digits.{{Year2range|-3}}
→ Error!! Template:Year2range expects a number of up to four digits.
A second parameter can be used to specify the size of the range, with a default of 1 year if omitted :
{{Year2range|1997|8}}
→ 1997–2005{{Year2range|2025|5}}
→ 2025–30{{Year2range|2025|-5}}
→ 2025–20{{Year2range|2025|1}}
→ 2025–26{{Year2range|2025}}
→ 2025–26
This template will often be used with {{Title year}}, {{Title year+1}} and {{Title year-1}} and dedicated templates are provided for these cases.