#20363 [Opn->Fbk]: Wrong week number
| From: | sniper@php.net | Date: | Tue, 12 Nov 2002 12:19:49 +0000 |
| Subject: | #20363 [Opn->Fbk]: Wrong week number | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24687@lists.php.net to get a copy of this message | ||
ID: 20363
Updated by: sniper@php.net
Reported By: agnermadsen@hotmail.com
-Status: Open
+Status: Feedback
Bug Type: *Calendar problems
Operating System: windows 2000
PHP Version: 4.2.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2002-11-12 04:58:11] agnermadsen@hotmail.com
the problem exist in 4.2.3 too
------------------------------------------------------------------------
[2002-11-11 09:54:12] derick@php.net
sorry, wrong report...
------------------------------------------------------------------------
[2002-11-11 09:53:18] derick@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2002-11-11 09:51:12] sniper@php.net
Works fine with latest CVS (on linux).
------------------------------------------------------------------------
[2002-11-11 09:14:38] agnermadsen@hotmail.com
Wrong weeknumber is reportet for year=2001, month=12, day 31. The date
function reports that is week number 53, but it is really week number
1. I fear that there are more bugs related to this problem.
**** script start ****
$date1=mktime(0,0,0,1,1,2002);
$dag=date("w",$date1);
if ($dag<=4) {
echo $date1." is week 1";
$date2=mktime(0,0,0,1,1-$dag+1,2002);
echo "<br>";
echo date ("Ymd-W", $date2);
echo "<br>";
echo date ("Ymd-W", $date1);
echo "<br>";
}
**** script end ****
**** output start ****
1009839600 is week 1
20011231-53
20020101-1
**** output end ****
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20363&edit=1