private function isValidFormat($date)
    {
        foreach ($this->formats as $format) {
            if (date($format, strtotime($date)) == $date) {
                return true;
            }
        }

        return false;
    }
private function isValidFormat($date)
    {
        foreach ($this->formats as $format) {
            if (date($format, strtotime($date)) == $date) {
                return true;
            }
        }

        return false;
    }
private function isValidFormat ( $ date ) { foreach ( $ this -> formats as $ format ) { if ( date ( $ format , strtotime ( $ date ) ) == $ date ) { return true ; } } return false ; }
Validates date string against known formats

@param string $data
@return boolean
Validates date string against known formats