src/core/Feed/Writer/Item.php
public function setDate($date)
    {
        if (!is_numeric($date))
        {
            $date = strtotime($date);
        }

        if ($this->version == Eresus_Feed_Writer::ATOM)
        {
            $tag = 'updated';
            $value = date(DATE_ATOM, $date);
        }
        elseif ($this->version == Eresus_Feed_Writer::RSS2)
        {
            $tag = 'pubDate';
            $value = date(DATE_RSS, $date);
        }
        else
        {
            $tag = 'dc:date';
            $value = date("Y-m-d", $date);
        }

        $this->addElement($tag, $value);
    }
public function setDate($date)
    {
        if (!is_numeric($date))
        {
            $date = strtotime($date);
        }

        if ($this->version == Eresus_Feed_Writer::ATOM)
        {
            $tag = 'updated';
            $value = date(DATE_ATOM, $date);
        }
        elseif ($this->version == Eresus_Feed_Writer::RSS2)
        {
            $tag = 'pubDate';
            $value = date(DATE_RSS, $date);
        }
        else
        {
            $tag = 'dc:date';
            $value = date("Y-m-d", $date);
        }

        $this->addElement($tag, $value);
    }
public function setDate ( $ date ) { if ( ! is_numeric ( $ date ) ) { $ date = strtotime ( $ date ) ; } if ( $ this -> version == Eresus_Feed_Writer :: ATOM ) { $ tag = 'updated' ; $ value = date ( DATE_ATOM , $ date ) ; } elseif ( $ this -> version == Eresus_Feed_Writer :: RSS2 ) { $ tag = 'pubDate' ; $ value = date ( DATE_RSS , $ date ) ; } else { $ tag = 'dc:date' ; $ value = date ( "Y-m-d" , $ date ) ; } $ this -> addElement ( $ tag , $ value ) ; }
Set the 'date' element of feed item

@param string $date  The content of 'date' element
@return void
Set the date element of feed item