ID: 25787 Updated by: [EMAIL PROTECTED] Reported By: australia at bookrealm dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: SuSE Linux 8.2 PHP Version: 4.3.1 New Comment:
Day count for this date (2003-10-08) is 280. e.g. # php -r 'echo date("z");' 280 It's propably mcal that is broken. (and I mean the library, not extension) Previous Comments: ------------------------------------------------------------------------ [2003-10-08 04:21:51] australia at bookrealm dot com Description: ------------ The array key 'yday' from getdate() is one day less than it should be. Bug can be confirmed using mcal_day_of_year(). Reproduce code: --------------- <?php $y = date(Y); $m = date(n); $d = date(j); echo mcal_day_of_year($y,$m,$d) . "<br />"; $day_year = getdate(); echo $day_year[yday]; ?> Expected result: ---------------- Example date: 2003-10-8 Expected result: 281 281 Actual result: -------------- Example date: 2003-10-8 Actual result: 281 280 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25787&edit=1