public function FeedsDateTime::addGranularity in Feeds 7
Same name and namespace in other branches
- 6 plugins/FeedsParser.inc \FeedsDateTime::addGranularity()
- 7.2 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 552
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);
}