From: [EMAIL PROTECTED]
Operating system: windows 2000
PHP version: 4.2.1
PHP Bug Type: *Calendar problems
Bug description: Wrong week number
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 bug report at http://bugs.php.net/?id=20363&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20363&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20363&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20363&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20363&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20363&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20363&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20363&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20363&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20363&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20363&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20363&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20363&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20363&r=isapi