VOOZH about

URL: https://en.wikipedia.org/wiki/Template_talk:YEAR

⇱ Template talk:YEAR - Wikipedia


Jump to content
From Wikipedia, the free encyclopedia
👁 Image
Template:YEAR is indefinitely protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.

Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.

2000s bug

[edit]

This template appears to be broken for the years 2000-2459. Test cases:

input result comment
{{subst:YEAR|September 4, 2426}} 2004 day+2000
{{subst:YEAR|September 3, 2000}} 2003 day+2000
{{subst:YEAR|September 8, 2459}} 2008 day+2000
{{subst:YEAR|September 8, 2460}} 2460 ...but 2460 and above is fine
{{subst:YEAR|2000-09-03}} 2000 correct when in YYYY-MM-DD format
{{subst:YEAR|September 3, 1999}} 1999 1999 and below is fine
{{subst:YEAR|September 153, 2014}} 0153 looks like some kind of modulo issue

It looks like it's grabbing the day instead of the year for some reason. Is this a problem with this template, or with the #date parser function? Ibadibam (talk) 01:04, 1 January 2014 (UTC)[]

Broken

[edit]

This template appears to be broken. Testing it, {{year|October 15, 2020}} produces 2015, which is...not correct. {{u|Sdkb}}talk 04:35, 21 December 2020 (UTC)[]

This is the same bug as above. --Izno (talk) 05:09, 21 December 2020 (UTC)[]
Fixed by [1], hopefully without breaking any existing uses relying on the wrong check. PrimeHunter (talk) 08:54, 21 December 2020 (UTC)[]
Thanks! {{u|Sdkb}}talk 10:22, 21 December 2020 (UTC)[]

"Cleanly substed"?

[edit]

The documentation says that this template can be cleanly substed, but when I tried it, I got this mess. Can someone please fix either the template or the documentation? Thanks. – Jonesey95 (talk) 14:34, 31 December 2024 (UTC)[]