Jump to content

Template talk:YEAR

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:YEAR/sandbox)

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)[reply]

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)[reply]

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