You are here

public function FeedsDateTime::__toString in Feeds 7.2

Returns the string representation.

Will try to use the literal input, if that is a string. Fallsback to ISO-8601.

Return value

string The string version of this DateTime object.

File

plugins/FeedsParser.inc, line 793
Contains FeedsParser and related classes.

Class

FeedsDateTime
Extend PHP DateTime class with granularity handling, merge functionality and slightly more flexible initialization parameters.

Code

public function __toString() {
  if (is_scalar($this->originalValue)) {
    return (string) $this->originalValue;
  }
  return $this
    ->format('Y-m-d\\TH:i:sO');
}