我有约会
object(DateTime)[44]
public 'date' => string '1980-11-21 00:00:00.000000' (length=26)
public 'timezone_type' => int 3
public 'timezone' => string 'Europe/Moscow' (length=13)
/srv/www/vhosts/drevlanka.ru/work/support/functions.inc.php:3109:
object(DateTime)[48]
public 'date' => string '2019-11-20 00:00:00.000000' (length=26)
public 'timezone_type' => int 3
public 'timezone' => string 'Europe/Moscow' (length=13)
和代码
$interval = $dateTwo->diff($birthdate);
// $interval = $birthdate->diff($dateTwo);
var_dump($interval);
如果$bistdate<$dateTwo
,我有当前间隔,但是如果$bistdate>$dateTwo
,此函数返回不正确的天差。