#20363 [Bgs->Opn]: Wrong week number
| From: | agnermadsen at hotmail dot com | Date: | Tue, 12 Nov 2002 10:58:11 +0000 |
| Subject: | #20363 [Bgs->Opn]: Wrong week number | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24677@lists.php.net to get a copy of this message | ||
ID: 20363
User updated by: agnermadsen@hotmail.com
Reported By: agnermadsen@hotmail.com
-Status: Bogus
+Status: Open
Bug Type: *Calendar problems
Operating System: windows 2000
-PHP Version: 4.2.1
+PHP Version: 4.2.3
New Comment:
the problem exist in 4.2.3 too
Previous Comments:
------------------------------------------------------------------------
[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