php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19788 Date_cacl weekOfYear()
Submitted: 2002-10-06 16:47 UTC Modified: 2002-11-30 10:08 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: fvu at wanadoo dot nl Assigned: pajoye (profile)
Status: Closed Package: PEAR related
PHP Version: 4.2.3 OS: Linux RH 7.3, gnu libiconv
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fvu at wanadoo dot nl
New email:
PHP Version: OS:

 

 [2002-10-06 16:47 UTC] fvu at wanadoo dot nl
<?
require "Date/Date.php";

echo Date_Calc::weekOfYear(5,1,1998) . ", ";
echo Date_Calc::weekOfYear(6,1,1998);
echo "<br>\n";
echo Date_Calc::weekOfYear(5,1,2004) . ", ";
echo Date_Calc::weekOfYear(6,1,2004);
?>

and then output is...

2, 2
1, 2

Why are these values different?

    January 1998                January 2004
Su Mo Tu We Th Fr Sa        Su Mo Tu We Th Fr Sa
             1  2  3                     1  2  3
 4  5  6  7  8  9 10         4  5  6  7  8  9 10
11 12 13 14 15 16 17        11 12 13 14 15 16 17
18 19 20 21 22 23 24        18 19 20 21 22 23 24
25 26 27 28 29 30 31        25 26 27 28 29 30 31

Freddy Vulto

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-27 03:10 UTC] k.schroeder@php.net
Please try the fix posted in http://lists.php.net/article.php?group=php.pear.dev&article=11154.

Regards, Kai
 [2002-11-30 10:07 UTC] pajoye@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.

Hello,

Jesus added a usefull gregorianToIso function. This function is used from now in weekOfYear.

Feel free to come back if you got any further problems,

Thank's for the bug report

regards,

pierre
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC