getDifferenceInMinutes() public method

Get the difference in minutes.
public getDifferenceInMinutes ( ExpressiveDate $compare = null ) : string
$compare ExpressiveDate
return string
コード例 #1
0
ファイル: ExpressiveDateTest.php プロジェクト: ymnl007/92five
 public function testGetDateDifferenceInMinutes()
 {
     $past = new ExpressiveDate('-10 minutes');
     $future = new ExpressiveDate('+1 minute');
     $this->assertEquals(-11, $future->getDifferenceInMinutes($past));
     $this->assertEquals(11, $past->getDifferenceInMinutes($future));
 }