PHP 클래스 PHPDaemon\Utils\DateTime

상속: extends DateTime
파일 보기 프로젝트 열기: kakserpom/phpdaemon 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $time = 'now', DateTimeZone $timezone = null ) Support timestamp and available date format
diffAsText ( integer | string | DateTimeInterface $datetime1, integer | string | DateTimeInterface $datetime2, boolean $absolute = false ) : string Calculates a difference between two dates

메소드 상세

__construct() 공개 메소드

Support timestamp and available date format
public __construct ( string $time = 'now', DateTimeZone $timezone = null )
$time string
$timezone DateTimeZone

diffAsText() 공개 정적인 메소드

Calculates a difference between two dates
또한 보기: http://www.php.net/manual/en/datetime.diff.php
public static diffAsText ( integer | string | DateTimeInterface $datetime1, integer | string | DateTimeInterface $datetime2, boolean $absolute = false ) : string
$datetime1 integer | string | DateTimeInterface
$datetime2 integer | string | DateTimeInterface
$absolute boolean
리턴 string Something like this: 1 year. 2 mon. 6 day. 4 hours. 21 min. 10 sec.