Ouzo\Utilities\Clock::nowAsString PHP Метод

nowAsString() публичный статический Метод

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
Результат string
    public static function nowAsString($format = null)
    {
        return self::now()->format($format);
    }

Usage Example

Пример #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