#19788 [Opn]: Date_Calc::weekOfYear() function problem
| From: | k.schroeder@php.net | Date: | Wed, 27 Nov 2002 09:10:45 +0000 |
| Subject: | #19788 [Opn]: Date_Calc::weekOfYear() function problem | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-11155@lists.php.net to get a copy of this message | ||
ID: 19788
Updated by: k.schroeder@php.net
Reported By: fvu@wanadoo.nl
Status: Open
Bug Type: PEAR related
Operating System: Windows
PHP Version: 4.2.3
New Comment:
Please try the fix posted in
http://lists.php.net/article.php?group=php.pear.dev&article=11154.
Regards, Kai
Previous Comments:
------------------------------------------------------------------------
[2002-10-06 16:47:51] fvu@wanadoo.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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19788&edit=1