date() 공개 정적인 메소드

Formats a string by date().
또한 보기: http://www.php.net/manual/en/function.date.php
public static date ( string $value, string $format = '' ) : string
$value string Unix timestamp or datetime string for `strtotime`
$format string Default format is `d.m.Y`
리턴 string
예제 #1
0
 public function testDate()
 {
     $value = 1336811080;
     $format = 'd.m.Y H:i';
     $this->assertEquals('12.05.2012 10:24', rex_formatter::date($value, $format));
 }
예제 #2
0
 public function testDate()
 {
     $format = 'd.m.Y H:i';
     $this->assertEquals('12.05.2012 10:24', rex_formatter::date(1336811080, $format));
     $this->assertEquals('27.06.2016 21:40', rex_formatter::date('2016-06-27 21:40:00', $format));
 }