Re: [PHP] take date and convert to day of year fixed!

2001-11-14 Thread sundogcurt
> >- Original Message ----- >From: "Martin Towell" <[EMAIL PROTECTED]> >To: "GENERAL PHP LIST" <[EMAIL PROTECTED]> >Sent: Wednesday, November 14, 2001 3:19 AM >Subject: RE: [PHP] take date and convert to day of year > > >>I&#x

Re: [PHP] take date and convert to day of year

2001-11-14 Thread Papp Gyozo
mp as you did in your earlier codes. - Original Message - From: "Martin Towell" <[EMAIL PROTECTED]> To: "GENERAL PHP LIST" <[EMAIL PROTECTED]> Sent: Wednesday, November 14, 2001 3:19 AM Subject: RE: [PHP] take date and convert to day of year > I'm r

RE: [PHP] take date and convert to day of year

2001-11-13 Thread Martin Towell
L PHP LIST Subject: Re: [PHP] take date and convert to day of year I have tried to implement your code Martin, and I do thank you VERY MUCH for the help, but your code seems to have the same trouble as mine, it doesn't matter what date I start with, I end up with 364 as the day of the year

Re: [PHP] take date and convert to day of year

2001-11-13 Thread sundogcurt
I have tried to implement your code Martin, and I do thank you VERY MUCH for the help, but your code seems to have the same trouble as mine, it doesn't matter what date I start with, I end up with 364 as the day of the year, I am on win32 though I don't know if that matters. Here is what I tri

RE: [PHP] take date and convert to day of year

2001-11-13 Thread Martin Towell
looking at the manual, getdate() is meant to be passed a unix time stamp, so, you'll need to use strtotime() first thus: $utime = strtotime("30-Nov-1971"); $dob = getdate($utime); $dobnum = $dob['yday']; print $dobnum; Notice I changed the format of the date, when I tried using the original form