Ouzo\Utilities\Date::endOfDay PHP 메소드

endOfDay() 공개 정적인 메소드

Example: $date = '2013-09-09 13:03:43'; $end = Date::endOfDay($date); Result: 2013-09-09 23:59:59.9999
public static endOfDay ( string $date ) : string
$date string
리턴 string
    public static function endOfDay($date)
    {
        return self::formatDate($date) . ' 23:59:59.9999';
    }

Usage Example

예제 #1
0
파일: DateTest.php 프로젝트: letsdrink/ouzo
 /**
  * @test
  */
 public function shouldGetEndOfDayForDateWithTime()
 {
     //given
     $date = '2013-09-09 13:03:43';
     //when
     $end = Date::endOfDay($date);
     //then
     $this->assertEquals('2013-09-09 23:59:59.9999', $end);
 }