http://www.php.net/manual/en/datetime.diff.php

seguito da un

$notti = $giorni - 1?