public function FeedsDateTime::addGranularity in Feeds 6
Same name and namespace in other branches
- 7.2 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 588
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);
}