Template talk:Decades and years

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
WikiProject Time (Rated Template-class)
WikiProject iconThis template is within the scope of WikiProject Time, a collaborative effort to improve the coverage of Time on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 Template  This template does not require a rating on the project's quality scale.

Update August 2015[edit]

I'm considering redoing this multiply-nested template you use fewer nests. Possible improvements:

  1. Make it work properly in other namespaces. (It's currently only referenced in mainspace, and by century articles. It used to be used in century categories, but consensus was to replace it by a simple forward-back template, with the millennia and decade links visible by normal Wikipedia methods (millennia by the parent category, and decades by child category).
  2. Adjust the links to 0s and 0s BC so that they aren't redlinked.
  3. Possibly pipe the links so that "(decade)" is not visible, as in [[100s (decade)|100s]] and [[100s BC (decade)|100s BC]]

Arthur Rubin (talk) 00:37, 14 August 2015 (UTC)

I'm working on it. The problem here is that the template was originally written when the convention was to name the "first decade of the century" pages as 100–109, but when that was moved to 100s (decade) on 30 November 2011‎, that sort of broke this template. So then GeoffreyT2000 tried to fix it on 11 August 2015, but I'm not sure whether that's the right patch. I'm working on sorting it all out. Instead of linking to 9–1 BC though, it should really link to 0s BC (decade) and that should redirect to 0s BC. Some research links:
It would have been better if these were all moved in a planned and coordinated fashion, rather than ad hoc over a period of time. Obviously updates to this template were an afterthought. wbm1058 (talk) 23:47, 12 November 2016 (UTC)
  1. Make it work properly in other namespaces.  Done I believe the category space is the only other namespace where we might want to use this. See Template:Decades and years/testcases#Categories. To avoid red links for the first decade of each century, simply create redirects, e.g. redirect Category:100s (decade) to Category:100s. Or perhaps move Category:100s to Category:100s (decade) for consistency with the article 100s (decade). I'm not sure what the best links for the collapsible navbars are, but this edit could be reverted and tweaked to link to Category:Decades and Category:Years rather than Decade and Year.
  2. Adjust the links to 0s and 0s BC so that they aren't redlinked.  Done That was simply a matter of creating two new redirects: 0s (decade) and 0s BC (decade). These two 9-year long "decades" are exceptions to the standard naming convention for the first decade of a century AD / last decade of a century BC.
  3. Possibly pipe the links so that "(decade)" is not visible, as in [[100s (decade)|100s]] and [[100s BC (decade)|100s BC]]  Done {{Decades and years/decade}} determines whether "(decade)" disambiguation in the link is needed, and then passes a parameter down to {{Decades and years/yearlink}}, which actually builds the links.
wbm1058 (talk) 14:24, 14 November 2016 (UTC)

Update January 2017[edit]

Following the consensus in Talk:AD 1 RfC to display years AD 1AD 100 with their prefix, I have applied the necessary changes to this template, essentially to the year generator {{Decades and years/yearlink}}. We now use simpler syntax with invocations of {{dr}} which takes care of the AD/BC display and hyperlinking. Links to decades still uses part of the old code but this may yet evolve. Given that those templates were long unused outside of article space, I have dropped support for other namespaces (parameter {{{1}}} is now marked deprecated all along the template chain). Navigation in categories has recently been improved with the revamped {{Decade category header}}, so I don't think we are losing anything precious here. Courtesy ping to fellow contributors wbm58, Arthur Rubin and Certes. — JFG talk 22:47, 5 January 2017 (UTC)