Template talk:Year parameter usage check

Potential problems
this looks clever. Might there be problems when the territory name includes years, e.g. Category:Province of Quebec (1763–1791)? – Fayenatic  L ondon 07:47, 10 November 2018 (UTC)
 * I hope that all such cases will have the category-year before the country name, e.g.
 * Category:YYYY in the Province of Quebec (1763–1791)
 * Category:YYYY establishments in the Province of Quebec (1763–1791)
 * Category:YYYY disestablishments in the Province of Quebec (1763–1791)
 * Category:YYYY elections in the Province of Quebec (1763–1791)
 * I hadn't thoght of this paricular problem, so thanks for raising it.
 * But the reason for applying this checking template was to identify such issues before adjusting the templates to a parameterless form. If a "territoryname (YYYY–YYYY)" category would break on a parameterless version version of the template, then this check should identify that.
 * I expect that there will be some types of by-year template which do use a year after the teritoryname. But my plan is to make all parameterless  templates allow an optional a year param (coded basically as  ) ... so if there are cases where the year param is needed, I just need to avoid stripping the year param off those cat pages. -- Brown Haired Girl (talk) • (contribs) 15:09, 10 November 2018 (UTC)
 * Cheers. I also thought there might be some spurious results if the template somehow gets called on parent categories such as Category:Establishments in the Province of Quebec (1763–1791) by year. – Fayenatic  L ondon 19:52, 10 November 2018 (UTC)

Current content sorted
I cleared some of the current "≠ year" errors; DH85868993 did the rest – see discussion. The remaining case, Category:1996–97 in IndyCar, is mentioned there as problematic, since it was an aberration from the usual pattern for that sport.

Looking up what happens for other categories named 1996–97, I found Template:NHL seasons CatNav, Template:Ice hockey seasons by year CatNav… which have so far not been treated with LinkCatIfExists2 nor YearParamUsageCheck. Perhaps they are already on your to-do list. – Fayenatic  L ondon 22:31, 13 December 2018 (UTC)