Hello All and Happy New Year.  
I have a simple routine to get the year, date and the day of year.  Year and date come 
out correctly but the day of year is one less than the date.  It being January, it's 
easy to see the error. The only thing I can figure, is that the date(z) function gets 
a fractional value and rounds down not rounds up.  I really could use some input on 
this before I just add one to the result and move on.
Thanks,
Hugh


$date_array=getdate(); / / gets today's date info
foreach ($date_array as $key=>$val)
 {
 $key=$val;
 }
 $current_year=$date_array[year];  / / returns 2002
 $std_date=date("n-j-y");                / / returns 1-5-02
 $day_of_year=date(z);                  / / returns 4 !!
 
 

Reply via email to