ソースを参照

Update DateTime.php

Mark Scherer 1 年間 前
コミット
5b23fef9dc
1 ファイル変更3 行追加0 行削除
  1. 3 0
      src/I18n/DateTime.php

+ 3 - 0
src/I18n/DateTime.php

@@ -141,6 +141,9 @@ class DateTime extends CakeDateTime {
 			return -1;
 		}
 
+		if ($startDate instanceof CakeDate) {
+			$startDate = $startDate->toNative();
+		}
 		$oDateInterval = $endDate->diff($startDate);
 
 		return $oDateInterval->y;