isNotTodayAndInTheFuture() public static method

Returns true if given datetime string is not today AND is in the future.
public static isNotTodayAndInTheFuture ( string $dateString, integer | null $timezone = null ) : boolean
$dateString string Datetime string or Unix timestamp
$timezone integer | null User's timezone
return boolean True if datetime is not today AND is in the future
Ejemplo n.º 1
0
 /**
  * Test IsNotTodayAndInTheFuture
  *
  * @return void
  */
 public function testIsNotTodayAndInTheFuture()
 {
     $testDate = date(FORMAT_DB_DATE, time());
     $is = $this->Time->isNotTodayAndInTheFuture($testDate);
     $this->assertFalse($is);
     $testDate = date(FORMAT_DB_DATETIME, time() + 1 * DAY);
     $is = $this->Time->isNotTodayAndInTheFuture($testDate);
     $this->assertTrue($is);
 }