Codice PHP:
function diffData($from$to){
        
$arr_from explode("/"$from);
        
$from_gg $arr_from[0];
        
$from_mm $arr_from[1];
        
$from_aa $arr_from[2];
        
$arr_to explode("/"$to);
        
$to_gg $arr_to[0];
        
$to_mm $arr_to[1];
        
$to_aa $arr_to[2];
        
$data_diff mktime(1200$to_mm$to_gg$to_aa) - mktime(1200$from_mm$from_gg$from_aa);
        
$data_diff  floor(($data_diff 60 60 24) / 1);
        return 
$data_diff;

Con questa funzione calcoli la differenza di giorni e ti ritorna il numero esatto.