datetime diff doesn't work
- by Ahmet vardar
Hi
here is my code
function check($dt) {
$date = date("Y-m-d");
$start = new DateTime($date);
$end = new DateTime($dt);
$diff = $start->diff( $end );
return $diff->format( '%d days' );
}
print check('2009-12-14');
that prints 29 days
where am i wrong ?