|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20363 Wrong week number
Submitted: 2002-11-11 09:14 UTC Modified: 2002-11-12 07:35 UTC
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: agnermadsen at hotmail dot com Assigned:
Status: Closed Package: Calendar related
PHP Version: 4.2.3 OS: windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: agnermadsen at hotmail dot com
New email:
PHP Version: OS:


 [2002-11-11 09:14 UTC] agnermadsen at hotmail dot 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 ****
if ($dag<=4) { 
     echo $date1." is week 1";
     echo "<br>";
     echo date ("Ymd-W", $date2);
     echo "<br>";
     echo date ("Ymd-W", $date1);
     echo "<br>";
**** script end ****
**** output start ****
1009839600 is week 1
**** output end ****


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-11 09:51 UTC]
Works fine with latest CVS (on linux).

 [2002-11-11 09:53 UTC]
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
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the 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:54 UTC]
sorry, wrong report...
 [2002-11-12 04:58 UTC] agnermadsen at hotmail dot com
the problem exist in 4.2.3 too
 [2002-11-12 06:19 UTC]
Please try using this CVS snapshot:
For Windows:

 [2002-11-12 07:35 UTC] agnermadsen at hotmail dot com
Works in php version 4.3-dev (pre-release)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 05:01:31 2024 UTC