support dc:date elements in rss and atom feeds

This commit is contained in:
Andrew Dolgov 2013-06-01 09:49:56 +04:00
parent 67f4fe1780
commit ce5d234d63
2 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,12 @@ class FeedItem_Atom extends FeedItem_Common {
if ($updated) {
return strtotime($updated->nodeValue);
}
$date = $this->xpath->query("dc:date", $this->elem)->item(0);
if ($date) {
return strtotime($date->nodeValue);
}
}
function get_link() {

View File

@ -16,6 +16,12 @@ class FeedItem_RSS extends FeedItem_Common {
if ($pubDate) {
return strtotime($pubDate->nodeValue);
}
$date = $this->xpath->query("dc:date", $this->elem)->item(0);
if ($date) {
return strtotime($date->nodeValue);
}
}
function get_link() {