Jump to content

Template:Title year2range-1/doc

From Wikipedia, the free encyclopedia

This is the current revision of this page, as edited by Tom.Reding (talk | contribs) at 16:30, 29 August 2021 (→‎See also: +{{String-handling templates}}). The present address (URL) is a permanent link to this version.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Usage

[edit]

Takes a year from the name of the page, subtracts 1, and converts it into a range, by applying {{Year2range}} to {{Title year}}. It does not pass through the {{Title year}} parameters but can take a parameter to specify the range, which is 1 year by default. So eg on Category:2024 in France :

  • {{Title year2range-1}} → 2023–24
  • {{Title year2range-1|1}} → 2023–24
  • {{Title year2range-1|5}} → 2023–28
  • {{Title year2range-1|-5}} → 2023–18

To go the other way, to generate a year from a range in the page name, you just use {{Title year}} (or {{Title year+1}} or {{Title year-1}} as appropriate)

See also

[edit]