public function setPubDate($pubDate)
    {
        if ($pubDate instanceof \DateTime) {
            $this->pubDate = $pubDate;
        } else {
            $this->pubDate = new \DateTime($pubDate);
        }

        return $this;
    }
public function setPubDate($pubDate)
    {
        if ($pubDate instanceof \DateTime) {
            $this->pubDate = $pubDate;
        } else {
            $this->pubDate = new \DateTime($pubDate);
        }

        return $this;
    }
public function setPubDate ( $ pubDate ) { if ( $ pubDate instanceof \ DateTime ) { $ this -> pubDate = $ pubDate ; } else { $ this -> pubDate = new \ DateTime ( $ pubDate ) ; } return $ this ; }
Sets pubDate.

@param \DateTime|string $pubDate

@return Feed
Sets pubDate .