PHP 4.0 Bug #7640 Updated: problem with weeknumbers
| From: | rasmus@php.net | Date: | Sun, 05 Nov 2000 05:23:30 +0000 |
| Subject: | PHP 4.0 Bug #7640 Updated: problem with weeknumbers | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-37153@lists.php.net to get a copy of this message | ||
ID: 7640
Updated by: rasmus
Reported By: jesper@barra.se
Status: Closed
Bug Type: Date/time related
Assigned To:
Comments:
True. And on my Linux the specific example returns 52 and 52.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-04 23:52:57] jah@php.net
A small correction. This *isn't* the expected result. Or at least, with my understanding of the
actual definition of %V.
They should both be 52.
But keeping closed anyway, this is not a PHP related bug.
PHP just calls the systems c-library function strftime and
passes the result back. Nothing to fix unless we roll up our
own version (in which case there could be too much to
fix...).
---------------------------------------------------------------------------
[2000-11-04 20:16:33] rasmus@php.net
That is expected behaviour. Please read the manual: http://www.php.net/manual/function.strftime.php
%V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where
week 1 is the first week that has at least 4 days in the current year, and with Monday as the first
day of the week.
---------------------------------------------------------------------------
[2000-11-04 17:59:07] jesper@barra.se
print strftime("%V",mktime(0,0,0,12,31,1999));
# prints weeknumber 52
print strftime("%V",mktime(0,0,0,01,01,2000));
# prints weeknumber 53
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7640