You are here

public function FeedsDateTime::hasGranularity in Feeds 6

Same name and namespace in other branches
  1. 7.2 plugins/FeedsParser.inc \FeedsDateTime::hasGranularity()
  2. 7 plugins/FeedsParser.inc \FeedsDateTime::hasGranularity()

Checks granularity array for a given entry.

3 calls to FeedsDateTime::hasGranularity()
FeedsDateTime::hasTime in plugins/FeedsParser.inc
Returns whether this object has time set. Used primarily for timezone conversion and fomratting.
FeedsDateTime::merge in plugins/FeedsParser.inc
This function will keep this object's values by default.
FeedsDateTime::setTimezone in plugins/FeedsParser.inc
Overrides default DateTime function. Only changes output values if actually had time granularity. This should be used as a "converter" for output, to switch tzs.

File

plugins/FeedsParser.inc, line 605

Class

FeedsDateTime
Extend PHP DateTime class with granularity handling, merge functionality and slightly more flexible initialization parameters.

Code

public function hasGranularity($g) {
  return in_array($g, $this->granularity);
}