Re: [PHP] 2 dates, difference in days AARGH!!

2002-12-12 Thread Steve Yates
"Curtis Gordon" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Why not use $now_date = mktime(0,0,0,date('m'),date('d'),date('Y')); ? Also, do you really use on each line? Wouldn't that just slow down processing as PHP jumps in & out of "code mode?"

Re: [PHP] 2 dates, difference in days AARGH!!

2002-12-11 Thread Curtis Gordon
I have made those changes, thank you (I even read the integers required thing but for some reason didn't register it). Here is what I have now. Working with Dec 25, 2002 (a difference that should be 14 days). difference in days: AND IT WORKS Thank you Chris you have saved, my hairlin

Re: [PHP] 2 dates, difference in days AARGH!!

2002-12-11 Thread Chris Wesley
Oh, and $today['wday'] ... that's the day of the week. I'm almost positive you want the day of the month: $today['mday']. hth, ~Chris On Wed, 11 Dec 2002, Chris Wesley wrote: > On Wed, 11 Dec 2002, Curtis Gordon wrote: > > > future date: > > > > current date: > > > > > (0,0,0

Re: [PHP] 2 dates, difference in days AARGH!!

2002-12-11 Thread Chris Wesley
On Wed, 11 Dec 2002, Curtis Gordon wrote: > future date: > > current date: > > (0,0,0,$today['month'],$today['wday'],$today['year']);?> $today['month'] is text, ie. "December", and mktime() requires all integer arguments. If you use $today['mon'] instead, it seems like you'll get what you wa

[PHP] 2 dates, difference in days AARGH!!

2002-12-11 Thread Curtis Gordon
HI! I have two dates, one in the future, and the current date, I want to calculate the difference between the two in # of days. I have converted both dates to seconds: future date: current date: Then I found the difference between the two: Now I want to convert the difference to "days": (