You are here

public function DateObject::hasTime in Date 7.3

Same name and namespace in other branches
  1. 7 date_api/date_api.module \DateObject::hasTime()
  2. 7.2 date_api/date_api.module \DateObject::hasTime()

Returns whether this object has time set.

Used primarily for timezone conversion and formatting.

Return value

bool TRUE if the date contains time parts, FALSE otherwise.

2 calls to DateObject::hasTime()
DateObject::arrayErrors in date_api/date_api.module
Finds possible errors in an array of date part values.
DateObject::setTimezone in date_api/date_api.module
Sets the time zone for the current date.

File

date_api/date_api.module, line 533
This module will make the date API available to other modules.

Class

DateObject
Extend PHP DateTime class.

Code

public function hasTime() {
  return $this
    ->hasGranularity('hour');
}