formatTime() public static méthode

Returns formatted time.
public static formatTime ( string $time, string $format = 'H:i' ) : null | string
$time string
$format string
Résultat null | string
Exemple #1
0
 /**
  * @test
  */
 public function shouldFormatTime()
 {
     //given
     $date = '2013-09-09 13:03:43';
     //when
     $timeOnly = Date::formatTime($date);
     //then
     $this->assertEquals('13:03', $timeOnly);
 }