diff() public méthode

public diff ( integer | string | DateTime | DateTimeObject $time, boolean $absolute = false ) : ArrayObject
$time integer | string | DateTime | DateTimeObject Date to compare to.
$absolute boolean Should the interval be forced to be positive?
Résultat Webiny\Component\StdLib\StdObject\ArrayObject\ArrayObject Instance of ArrayObject containing time units (d,m,y,h,i,s) for keys and amounts for their values.
 public function testDiff()
 {
     $start = new DateTimeObject('14.02.2013');
     $end = new DateTimeObject('03.03.2013');
     $diff = $start->diff($end);
     $this->assertSame(17, $diff->key('d'));
 }