public function FeedsDateTime::hasGranularity in Feeds 8.2
Checks granularity array for a given entry.
3 calls to FeedsDateTime::hasGranularity()
- FeedsDateTime::hasTime in lib/
Drupal/ feeds/ FeedsDateTime.php - Returns whether this object has time set. Used primarily for timezone conversion and fomratting.
- FeedsDateTime::merge in lib/
Drupal/ feeds/ FeedsDateTime.php - This function will keep this object's values by default.
- FeedsDateTime::setTimezone in lib/
Drupal/ feeds/ FeedsDateTime.php - 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
- lib/
Drupal/ feeds/ FeedsDateTime.php, line 159
Class
- FeedsDateTime
- Extend PHP DateTime class with granularity handling, merge functionality and slightly more flexible initialization parameters.
Namespace
Drupal\feedsCode
public function hasGranularity($g) {
return in_array($g, $this->granularity);
}