Software development - programming solutions

Difference between two dates, in days in PHP  
a simple function, return difference between twho dates (PHP4, PHP5)
//return days

function DateDiffDays($data1,$data2)
{
$arr2=explode(".",$data2);
$arr1=explode(".",$data1);

$diff=abs(mktime(0,0,0,$arr2[1],$arr2[0],$arr2[2])-mktime(0,0,0,$arr1[1],$arr1[0],$arr1[2]))/(86400);
$diff=round($diff);

return $diff;
}

eXTReMe Tracker
© 1999 - 2017 (site) © 2010 - 2017 (page) Dan Mihaiu, Europe, Romania
About site statistics   About site   Copyright   Stats   Privacy Policy   Main site