I want to find the number of days between two dates, then find the fractional number of months between the two dates, then rounddown the number of frational months to a whole number. I know there are a number of ways to do this and was hoping you could give me some tips on the best way. I have reviewed some of the examples on php.net and there are many ways that this can be done.
here is a brief e.g.
$start_date = 11/1/07
$final_date = 11/17/08
$final_date - $start_date = $number of days
$months = $number_of_days/365.25 *12
$months_rounded_down = rounddown($months)
function round_down($num, $d = 0)
return sgn($num)*p_floor(abs($num), $d);
thanks for the help