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
파일: DateTest.php 프로젝트: letsdrink/ouzo
 /**
  * @test
  */
 public function shouldModifyCurrentDate()
 {
     //when
     $date = Date::modifyNow('2 days');
     //then
     $this->assertGreaterThan(Clock::nowAsString(), $date);
 }
All Usage Examples Of Ouzo\Utilities\Clock::nowAsString