original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Set the 'date' element of feed item
  
  @param string $date  The content of 'date' element
  @return void
docstring_tokens: Set the date element of feed item