+ /**
+ * Get ISO date from DateTime according to feed type.
+ *
+ * @param DateTime $date Date to format.
+ * @param string|bool $format Force format.
+ *
+ * @return string Formatted date.
+ */
+ protected function getIsoDate(DateTime $date, $format = false)
+ {
+ if ($format !== false) {
+ return $date->format($format);
+ }
+ if ($this->feedType == self::$FEED_RSS) {
+ return $date->format(DateTime::RSS);
+
+ }
+ return $date->format(DateTime::ATOM);
+ }
+