Last modified: 2010-05-15 14:36:21 UTC
Template {{CURRENTWEEK}} is unstable. Its value is at times "02" with two digits, and at times "2" with only one digit. This bug happened this morning on fr.wikipedia.org. Until then, the value was "2" with only one digit. According to http://meta.wikimedia.org/wiki/Help:Magic_words#CURRENT WEEK , Template CURRENTWEEK is « A variable, returning the number of the current week (1-52). » As the author wrote « (1-52) », not « (01-52) » the value should have one digit until 9 and two digits from 10 to 52.
RESOLVED WORKSFORME, can't reproduce this, we always produce a zero-padded value, the documentation is wrong.
Thanks for your remark, but according to what I observed on fr.wikipedia.org, the documentation was right until yesterday. By the way, Template {{CURRENTDAY}} also displayed only one digit : "9" not "09", for example, last monday, January 9th 2006. If the change is definitive, it is not really a problem. What is troublesome is that the value switches from "02" to "2" and from "2" to "02" at random every minute or possibly every second.
Here are two screenshots made a few minutes ago, showing that {{CURRENTWEEK}} takes at turns both values : http://img358.imageshack.us/img358/9964/currentweektest8c e.jpg http://img481.imageshack.us/img481/8190/currentweektest21 nq.jpg
The same links, with tinyurls : http://tinyurl.com/djunu http://tinyurl.com/crd6p
Oh excellent, PHP5 has it zero padded but PHP4 does not, and since we're in the process of an upgrade to PHP5 you're getting it zero padded and not zero-padded depending on the server REOPENING
FIXED in CVS HEAD This bug has a parsertest called "Magic Word: {{CURRENTWEEK}} (@bug 4594)"
Should we expect the same change to occur with {{CURRENTDAY}} with CURRENTDAY taking the value "01" on February 1st 2006 instead of "1" like on January 1st 2006 ?
(In reply to comment #7) Not according to the fix for bug 2522, which adds CURRENTDAY2.
(In reply to comment #8) > Not according to the fix for bug 2522, which adds CURRENTDAY2. Sorry, I got that backwards. This PHP bugfix in the recent v5.1.2 could be related: http://bugs.php.net/bug.php?id=34302
(In reply to comment #9) > ... > This PHP bugfix in the recent v5.1.2 could be related: > ... should have typed v5.1.0