addInterval() public static method

Adds interval to current time and returns a formatted date.
public static addInterval ( string $interval, string $format = self::DEFAULT_TIME_FORMAT ) : string
$interval string
$format string
return string
Example #1
0
 /**
  * @test
  */
 public function shouldAddIntervalToCurrentDate()
 {
     //when
     $date = Date::addInterval('P2Y');
     //then
     $this->assertGreaterThan(Clock::nowAsString(), $date);
 }