Re: Re: Can't get accurate day of year
| From: | Hugh Danaher | Date: | Sun, 06 Jan 2002 00:03:05 +0000 |
| Subject: | Re: Re: Can't get accurate day of year | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-79583@lists.php.net to get a copy of this message | ||
So, I add 1 to the number and move on.
Thanks,
Hugh
----- Original Message -----
From: Jim Winstead <jimw@apache.org>
To: <php-general@lists.php.net>
Sent: Saturday, January 05, 2002 3:24 PM
Subject: [PHP] Re: Can't get accurate day of year
> Hugh Danaher <hdanaher@earthlink.net> wrote:
> > 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.
>
> as http://www.php.net/date says, the range of the 'z'
> format is from 0
> to 365. january 1st is day 0.
>
> jim
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>