Template talk:Year nav

Latest comment: 8 months ago by Paine Ellsworth in topic Template-protected edit request on 16 August 2023
WikiProject iconYears Template‑class
WikiProject iconThis template is within the scope of WikiProject Years, a collaborative effort to improve the coverage of Years 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.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Years below 101 edit

What about years BC? And what about the 1st century? Check those out and fix them, please! /Ludde23 Talk Contrib 14:38, 6 December 2006 (UTC)Reply

02-Feb-2007: I have developed a new nav-box for 1st century (only): it is fairly complex and called "Template:Year nav 1st century CE" which can handle years 1-100 (and show years BC), such as for year "2":
{{Year nav 1st century CE|2}}
The calculations are so complex that the template is dangerous to maintain, and is being purposely limited to years 1-100. An even more complex template could be created to handle any year, but perhaps, only 1 person in 1000 could understand the multiple nested calculations, making such an any-year template very dangerous to maintain. Wikitables do not yet use typical computer-language syntax, so an any-year template might use "#ifeq" nesting calculations to handle any specified year; however, even experienced computer programmers would see such a template as too arcane and obtuse to easily modify. Rule of programming: "If no one else could modify it, avoid writing it" (rule of thumb). I plan to create some less complex templates to handle only years BC. Later. -Wikid77 14:09, 2 February 2007 (UTC)Reply

More centuries edit

01-February-2007: Perhaps the centuries listed were limited to a choice of 3 due to width-limitations; however, more century numbers could be displayed by dropping "century" from other choices, such as showing "18th" rather than "18th century" (omit "century" outside the center). -Wikid77 14:23, 1 February 2007 (UTC)Reply

Narrowed edit

01-February-2007: The navigation template "Template:Year nav" had been too wide for commonplace 800x600 screens, when displayed in the yearly articles 1500-1999, so I narrowed the nav-box by using small-font for the choice of decades. Just a small narrowing allowed left-side text to format as 6-7 words per line, enough to avoid the peculiar appearance of 5 words-per-line wrapping which often produced very ragged lines because most words are 6-7 letters wide. -Wikid77 14:25, 1 February 2007 (UTC)Reply

Political World Map edit

Can there be a political world map for each year embedded into the year nav? It benefit the study of temporal politics. Possible difficulties I know of:

  1. African nations changes frequently in last century and annual map may not have sufficient granulity to reflect that
  2. Disputed territories between peace treaties

3Laws 23:53, 7 April 2007 (UTC)Reply

Current year edit

I've added some code that will automatically put {{Current-year}} on the current year page. --Philip Stevens 06:35, 23 June 2007 (UTC)Reply

Year nav range edit

{{editprotected}} Please copy the code from {{Year nav range}} into the template, there is no need to have two templates that do the same thing. --Philip Stevens 06:06, 27 June 2007 (UTC)Reply

Are you really asking to have one of these templates deleted or redirect to the other? If so, perhaps you should list this at WP:TFD. If you want help with that, or can't do a portion of the nomination due to the protection, let me know and I'll try to do the parts that you have trouble with. --After Midnight 0001 17:27, 27 June 2007 (UTC)Reply
Since the other template has been nominated, I've disabled this edit protect. If anything else needs to be done here, feel free to leave a message on my talk page or After Midnight's. - auburnpilot talk 23:00, 27 June 2007 (UTC)Reply

Protected erroneous change edit

{{editprotected}}
30-June-2007: That Template:Year_nav was hacked live, without full testing, and erroneous changes got protect-locked into the template on 23-June-2007.

The error message: "Unrecognised parameter 'year' " is caused by checking the keyword "PAGENAME" instead of "{{{1|888}}}" so the fix is to replace the top 2 if-statements with the following 2 code lines:

-->{{#ifeq:{{{1|888}}}|{{CURRENTYEAR}}|{{Current-year}}}}
-->{{#ifexpr:{{{1|888}}}>{{CURRENTYEAR}}|{{future}}}}

That fix replaces PAGENAME with parameter 1: "{{{1|888}}}" (note the triple-braces "{{{_}}}").

I have fixed the related "Template:Year_nav_range" which is intended for experimental changes, because it is used in only a handful of years, while "Template:Year_nav" is used by hundreds of WP articles (intended for thousands). Thanks. -Wikid77 11:23, 30 June 2007 (UTC)Reply

  Done. By the way, the code above would have broken the template; you forgot to use a new <!-- . Cheers. --MZMcBride 14:43, 30 June 2007 (UTC)Reply
Thanks, it tested OK. Glad you caught the unopened comment; these primitive computer languages are still a syntactical nightmare: there was a joke many moons ago that proposed using a comment token "$##%%&@$$" to gig the ad-nauseum language tokens. Wow, it's way into the 21 century now, and much software is still uncommented to avoid runaway comment tokens: "what's new is old [tech] again." -Wikid77 03:33, 1 July 2007 (UTC)Reply

Remove {{future}} tag edit

{{editprotected}}

The {{future}} tag should be removed from this template. It looks rather silly to inform readers that things may change as the year 2054 approaches. See also discussions on WP:CAFET and {{future}}. --Kildor (talk) 07:01, 28 March 2008 (UTC)Reply

No comments or objections have been made to this proposal after almost a week. So I request the following change to this template:

Replace the following two rows (row 4 and 5 in the template):

 -->{{#ifexpr:{{{1|888}}}>{{CURRENTYEAR}}|{{future}}}}
  {| class="infobox" style="text-align: center;"

...with the following row:

 -->{| class="infobox" style="text-align: center;"

Thanks. --Kildor (talk) 14:08, 3 April 2008 (UTC)Reply

  Done Happymelon 15:46, 5 April 2008 (UTC)Reply

Category edit

{{editprotected}} Due to a category move, please remove Category:History navigational boxes and replace with Category:History and events templates. Thank you. --Russ (talk) 10:51, 3 May 2008 (UTC)Reply

Done. --- RockMFR 14:50, 3 May 2008 (UTC)Reply

Decade links edit

The decades denoted nn00s have been moved to nn00–nn09. We need to change the template accordingly, possibly using {{DecadeLink}}. (This might break the spacing, though, so I hesitate to ask for a specific change at this time.) {{year nav 1st century CE}} also needs to be changed, and {{year nav BC}} will need to be changed. — Arthur Rubin (talk) 02:02, 3 October 2008 (UTC)Reply

I propose changing the section

--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 30}}s]] <!--
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 20}}s]] <!--
--> [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) - 10}}s]] <!--
--> - [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10))}}s]] -<!--
-->  [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 10}}s]]<!--
-->  [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 20}}s]]<!--
-->  [[{{#expr: ({{{1|888}}} - ({{{1|888}}} mod 10)) + 30}}s]]

by

--> {{DecadeLink|{{#expr: (({{{1|888}}} - ({{{1|888}}} mod 10)) - 30)/10}}}} <!--
--> {{DecadeLink|{{#expr: (({{{1|888}}} - ({{{1|888}}} mod 10)) - 20)/10}}}} <!--
--> {{DecadeLink|{{#expr: (({{{1|888}}} - ({{{1|888}}} mod 10)) - 10)/10}}}} <!--
--> - {{DecadeLink|{{#expr: (({{{1|888}}} - ({{{1|888}}} mod 10)))/10}}}} -<!--
-->  {{DecadeLink|{{#expr: (({{{1|888}}} - ({{{1|888}}} mod 10)) + 10)/10}}}}<!--
-->  {{DecadeLink|{{#expr: (({{{1|888}}} - ({{{1|888}}} mod 10)) + 20)/10}}}}<!--
-->  {{DecadeLink|{{#expr: (({{{1|888}}} - ({{{1|888}}} mod 10)) + 30)/10}}}}

(That's a literal substitution; the expressions could probably be simplified.) — Arthur Rubin (talk) 02:09, 3 October 2008 (UTC)Reply

If you want to change it by a substitution, the target is to change the 7

[[{{#expr: xxx}}s]]

to

{{DecadeLink|{{#expr: (xxx)/10}}}}

Arthur Rubin (talk) 02:21, 3 October 2008 (UTC)Reply

{{year nav 1st century CE}} might be more complicated, unless we expand {{DecadeLink}} to handle negative decades. — Arthur Rubin (talk) 02:24, 3 October 2008 (UTC)Reply

{{editprotected}} The above would doubtless work, but I've done it using the {{dr}} template, as for the other navboxes. This means that this template will also work for 1st century and BC years (using a minus sign for BC). Please substitute the content of User:Kotniski/Sandbox for the current content of this page. To check that it works, see the examples at User:Kotniski/Exper.--Kotniski (talk) 10:07, 14 October 2008 (UTC)Reply

  Done by you, AFAICT. —Ms2ger (talk) 16:15, 18 October 2008 (UTC)Reply

Suggest having a four year span edit

Millennium: 2nd millennium
Centuries: 19th century - 20th century - 21st century
Decades: 1960s  1970s  1980s  - 1990s -  2000s  2010s  2020s
Years: 1986 1987 1988 1989 - 1990 - 1991 1992 1993 1994

Hello. This template currently displays the year it is given as a parameter and the THREE years either side as links. I would like to suggest increasing this range to FOUR years either side. The reason for this suggestion is that there is a leap year every four years such that jumping forward or backwards by four years might be a convenient option to offer.

I realise that the counter-argument to this change could be "well, why not offer 5 years, or 6 years", but my response is that 5 or 6 years (or 3 years as is currently displayed) is an arbitary choice, whereas 4 years has a calendar-based reason behind it.

The other counter-argument is that the 3 year span fits better in the template but, in the example version I've provided to the right, I've made the years the same size text as the decades and it fits just as well.

Here's hoping for a useful discussion. GDallimore (Talk) 14:15, 5 March 2009 (UTC)Reply

However, 5 years would span a decade so wouldn't be arbitrary. Jimp 05:14, 29 May 2015 (UTC)Reply

Questions edit

Is there any particular reason why the central year and century are bolded but the decade and millenium are not? As a bonus question, is there any particular reason why the preceding and following millenia aren't listed? Thanks. DH85868993 (talk) 01:05, 1 January 2011 (UTC)Reply

Merge edit

In articles this box is typically followed by another two boxes produced such templates as {{C21 year in topic}}. This gives us three boxes typically of different sizes. If these three boxes were combined into a single infobox, it would look a whole lot nicer and there'd be just one template to transclude instead of two. This seems an obvious improvement to me.

In fact, I'd go as far as to suggest merging these along with other templates which we have at the top of year pages ({{Year dab}}, {{Events by month}}, {{Year article header}}, etc.) into a single standard simple-to-use template. Jimp 07:10, 29 May 2015 (UTC)Reply

911 edit

The link 911 leads to a disambiguation page. I was wondering, if somebody can fix the link? Gar (talk) 14:12, 7 May 2017 (UTC)Reply

cat question edit

hi. this template seems to transclude a category link called "categorys with short description". is that supposed to be occurring?

you can ping me when you reply to this question. thanks. --Sm8900 (talk) 17:51, 20 March 2019 (UTC)Reply

911 link edit

The link for 911 needs updating/fixing since the article was moved to 911 (year) however there is a RM at Talk:911 (year)#Requested move 8 July 2019. Crouch, Swale (talk) 18:27, 8 July 2019 (UTC)Reply

Short description edit

@Jonesey95: The short description for 1 BC shows "-1". The article also has an explicit short description. Can we fix this, either by providing more descriptive text or by allowing articles to override it? Certes (talk) 10:32, 28 April 2020 (UTC)Reply

Oof. I don't know what I was thinking. I have reverted my change and made the short description "Calendar year". I have also added the "noreplace" option so that local short descriptions will override the one provided by the template. My apologies all around. – Jonesey95 (talk) 17:03, 29 April 2020 (UTC)Reply
Thanks! No harm done; not many readers will see short descriptions for BC years. Certes (talk) 17:09, 29 April 2020 (UTC)Reply

Template-protected edit request on 16 October 2020 edit

Please replace each of the three links to List of decades, centuries, and millenniums with a link to List of decades, centuries, and millennia. I have moved the list article. GeoffreyT2000 (talk) 23:49, 16 October 2020 (UTC)Reply

  Done * Pppery * it has begun... 15:09, 17 October 2020 (UTC)Reply

Question about "AD" usage edit

Why does the template link to "AD 2014" and not "2014" when previously it would only do that for small year numbers (e.g. AD 14)? Strangely, I found out that this has been the case since September 3, 2020 (or perhaps late in the day on September 2), yet there were no edits to this template between April 29 and October 13. Shāntián Tàiláng (talk) 14:58, 14 June 2021 (UTC)Reply

It's been a few months, but in case anyone clueful comes by at some point, I'm also mildly curious... AngryHarpytalk 18:12, 23 December 2021 (UTC)Reply
The relevant edit to {{Drep}} is here, after discussions at WikiProject Years, e.g. here. For most numbers over 1000, the plain number is the title of an article (2021) or redirect to a section (2099) about that year, but there are exceptions such as 2048 and 2084. Linking via AD 2048 etc. saves the pain of working out exactly which numbers lead to a year and regularly updating the templates. Certes (talk) 18:45, 23 December 2021 (UTC)Reply

Consider adding months edit

Pages for months going from January 1900 to December 1993 exist. Perhaps we could add specific months to year-navboxes. Koopinator (talk) 13:22, 10 March 2023 (UTC)Reply

Template-protected edit request on 16 August 2023 edit

Pages for months going from January 1900 to December 1993 exist. Add functionality making these accessible from year nav, just like how Template:Millenniumbox allows navigation to constituent centuries. If this is doable, I would then like to propose Template:Events by month be deleted.

Also, monthly coverage continues with Portal:Current_events/January_2002, perhaps find some way to incorporate that. Koopinator (talk) 09:59, 16 August 2023 (UTC)Reply

This proposal sounds almost epic in size and would require consensus from a discussion that is well-attended, such as an RfC. There are no fewer than four WikiProjects that oversee the more than a thousand uses of the {{Events by month}} template. We would have to find out what those members would think about deleting such a template. You seem to want this template to lead readers to month articles in addition to year, decade and century articles, and that would indeed require the attention of many editors and their approvals. Please take the time to garner consensus for this proposal before using the {{Edit template-protected}} template. P.I. Ellsworth , ed. put'er there 10:56, 28 August 2023 (UTC)Reply