Метод |
Описание |
|
__construct ( DateTime $dateTime ) |
|
|
at ( $date ) : Clock |
Obtains a Clock set to to a specific point. |
|
format ( $format = null ) |
|
|
freeze ( null $date = null ) |
Freezes time to a specific point or current time if no time is given. |
|
fromTimestamp ( $timestamp ) : Clock |
Obtains a Clock set to to a specific point using Unix timestamp. |
|
getTimestamp ( ) |
|
|
isAfter ( Clock $other ) |
|
|
isAfterOrEqualTo ( Clock $other ) |
|
|
isBefore ( Clock $other ) |
|
|
isBeforeOrEqualTo ( Clock $other ) |
|
|
minusDays ( $days ) |
|
|
minusHours ( $hours ) |
|
|
minusMinutes ( $minutes ) |
|
|
minusMonths ( $months ) |
|
|
minusSeconds ( $seconds ) |
|
|
minusYears ( $years ) |
|
|
now ( ) : Clock |
Obtains a Clock set to the current time. |
|
nowAsString ( string $format = null ) : string |
Returns current time as a string. |
|
plusDays ( $days ) |
|
|
plusHours ( $hours ) |
|
|
plusMinutes ( $minutes ) |
|
|
plusMonths ( $months ) |
|
|
plusSeconds ( $seconds ) |
|
|
plusYears ( $years ) |
|
|
setTimezone ( $timezone ) |
|
|
toDateTime ( ) : DateTime |
Converts this object to a DateTime |
|