From: australia at bookrealm dot com
Operating system: SuSE Linux 8.2
PHP version: 4.3.1
PHP Bug Type: Date/time related
Bug description: 'yday' in getdate() function is out by one day

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 bug report at [url]http://bugs.php.net/?id=25787&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25787&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25787&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25787&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25787&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25787&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25787&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25787&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25787&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25787&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25787&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25787&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25787&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25787&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25787&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25787&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=25787&r=float[/url]