Template:Year2range
| This template is used on approximately 8,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
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|2026}}→ 2026–27{{Year2range|{{CURRENTYEAR}}}}→ 2026–27{{Year2range| {{#expr:2026+1}} }}→ 2027–28{{Year2range| {{#expr:2026-8}} }}→ 2018–19{{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|2026|5}}→ 2026–31{{Year2range|2026|-5}}→ 2026–21{{Year2range|2026|1}}→ 2026–27{{Year2range|2026}}→ 2026–27
This template will often be used with {{Title year}}, {{Title year+1}} and {{Title year-1}} and dedicated templates are provided for these cases.
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.