src/Sasedev/ExtraToolsBundle/Util/DateFormatter.php
public function parse($date, $locale = null)
    {
        $result = new \DateTime();
        $result->setTimestamp($this->parseTimestamp($date, $locale));

        return $result;
    }
public function parse($date, $locale = null)
    {
        $result = new \DateTime();
        $result->setTimestamp($this->parseTimestamp($date, $locale));

        return $result;
    }
public function parse ( $ date , $ locale = null ) { $ result = new \ DateTime ( ) ; $ result -> setTimestamp ( $ this -> parseTimestamp ( $ date , $ locale ) ) ; return $ result ; }
Parse a string representation of a date to a \DateTime

@param string $date
@param string $locale
@return \DateTime datetime

@throws \Exception If fails parsing the string
Parse a string representation of a date to a \ DateTime