Doing a date difference between 24th March 2008 and 31st March 2008.
If you look on a calendar, then there are 7 days between the 2 dates.
Do it through a standard PHP timestamp sum and it only shows 6 days.
Here's the script:It actually shows 6.9583333333333 if I don't put the floor() in, but I need that in for other days.PHP Code:$d1=mktime(0,0,0,03,24,2008);
$d2=mktime(0,0,0,03,31,2008);
number_days = floor(($d2-$d1)/86400);
Anyone else come across this problem?
Ian










Bookmarks