// Difference from a date in the future:
$a = new DateTime('2000-01-01');
$b = new DateTime('2000-01-05');
$interval = $b->diff($a);
return $interval->days; // Returns 4
// Difference from a date in the past:
$a = new DateTime('2000-01-01');
$b = new DateTime('1999-12-28');
$interval = $a->diff($b); // Arguments swapped
return $interval->days; // Returns 4
これらの関数の両方が正の4を返すのはなぜですか?日付が過去の場合、負の数を返すにはどうすればよいですか?