diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-03-25 17:54:22 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-03-25 17:54:22 +0100 |
commit | 8e128604b9bace8a834daa3b02f242f976df85e7 (patch) | |
tree | d520ad25a04ab839eec838fbde16e8cab1094240 /vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php | |
parent | 7e9d8b396a87999b7abef7d08c6038af824a70e6 (diff) |
add makefile for building the project
Diffstat (limited to 'vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php')
-rw-r--r-- | vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php index 005691f48..b265656ac 100644 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php +++ b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/Rss20.php @@ -139,11 +139,11 @@ class Rss20 extends Parser $publish_date = XmlParser::getXPathResult($xml, 'channel/pubDate'); $update_date = XmlParser::getXPathResult($xml, 'channel/lastBuildDate'); - $published = !empty($publish_date) ? $this->date->getDateTime((string) current($publish_date)) : null; - $updated = !empty($update_date) ? $this->date->getDateTime((string) current($update_date)) : null; + $published = !empty($publish_date) ? $this->getDateParser()->getDateTime((string) current($publish_date)) : null; + $updated = !empty($update_date) ? $this->getDateParser()->getDateTime((string) current($update_date)) : null; if ($published === null && $updated === null) { - $feed->date = $this->date->getCurrentDateTime(); // We use the current date if there is no date for the feed + $feed->date = $this->getDateParser()->getCurrentDateTime(); // We use the current date if there is no date for the feed } elseif ($published !== null && $updated !== null) { $feed->date = max($published, $updated); // We use the most recent date between published and updated } else { @@ -162,7 +162,7 @@ class Rss20 extends Parser { $date = XmlParser::getXPathResult($entry, 'pubDate'); - $item->date = empty($date) ? $feed->getDate() : $this->date->getDateTime((string) current($date)); + $item->date = empty($date) ? $feed->getDate() : $this->getDateParser()->getDateTime((string) current($date)); } /** |