public function FeedsDateTime::addGranularity in Feeds 7.2
Same name and namespace in other branches
- 6 plugins/FeedsParser.inc \FeedsDateTime::addGranularity()
- 7 plugins/FeedsParser.inc \FeedsDateTime::addGranularity()
Safely adds a granularity entry to the array.
1 call to FeedsDateTime::addGranularity()
- FeedsDateTime::setGranularityFromTime in plugins/
FeedsParser.inc - Protected function to find the granularity given by the arguments to the constructor.
File
- plugins/
FeedsParser.inc, line 859 - Contains FeedsParser and related classes.
Class
- FeedsDateTime
- Extend PHP DateTime class with granularity handling, merge functionality and slightly more flexible initialization parameters.
Code
public function addGranularity($g) {
$this->granularity[] = $g;
$this->granularity = array_unique($this->granularity);
}