Datetime
Handling datetime information
Handling datetime information
Get datetime object from variable:
$Datetime = $this->get('datetime', $order_time);
Extends eDate. Class is chainable. ie. all methods that returns 'this' can be written in chain. When cast to string, class returns the date in local or setFormat() -format.
Method | Return type | Description |
---|---|---|
getHm() | 00:00 | Get hours and minutes |
Compare to other date | Return type | Description |
---|---|---|
countSecondsTo(datetime) | int | Get number of seconds to given datetime. |
countSecondsFrom(datetime) | int | Get number of seconds from given date. |
countMinutesTo(datetime[,decimals,round]) | int | Get number of minutes to given datetime. |
countMinutesFrom(datetime[,decimals,round]) | int | Get number of minutes from given date. |
countHoursTo(datetime[,decimals,round]) | int | Get number of hours to given datetime. |
countHoursFrom(datetime[,decimals,round]) | int | Get number of hours from given date. |