formatTime() public static method

Returns formatted time.
public static formatTime ( string $time, string $format = 'H:i' ) : null | string
$time string
$format string
return null | string
コード例 #1
0
ファイル: DateTest.php プロジェクト: letsdrink/ouzo
 /**
  * @test
  */
 public function shouldFormatTime()
 {
     //given
     $date = '2013-09-09 13:03:43';
     //when
     $timeOnly = Date::formatTime($date);
     //then
     $this->assertEquals('13:03', $timeOnly);
 }