Ouzo\Utilities\Clock::nowAsString PHP Method

nowAsString() public static method

Example: Clock::freeze('2011-01-02 12:34'); $result = Clock::nowAsString('Y-m-d'); Result: 2011-01-02
public static nowAsString ( string $format = null ) : string
$format string
return string
    public static function nowAsString($format = null)
    {
        return self::now()->format($format);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @test
  */
 public function shouldModifyCurrentDate()
 {
     //when
     $date = Date::modifyNow('2 days');
     //then
     $this->assertGreaterThan(Clock::nowAsString(), $date);
 }
All Usage Examples Of Ouzo\Utilities\Clock::nowAsString