public function cleanDate($date)
    {
        $response = $this->query($this->prepareUri('clean/birthdate'), [$date]);
        $result = $this->populate(new Date, $response);
        if (!$result instanceof Date) {
            throw new RuntimeException('Unexpected populate result: ' . get_class($result). '. Expected: ' . Date::class);
        }

        return $result;
    }
public function cleanDate($date)
    {
        $response = $this->query($this->prepareUri('clean/birthdate'), [$date]);
        $result = $this->populate(new Date, $response);
        if (!$result instanceof Date) {
            throw new RuntimeException('Unexpected populate result: ' . get_class($result). '. Expected: ' . Date::class);
        }

        return $result;
    }
public function cleanDate ( $ date ) { $ response = $ this -> query ( $ this -> prepareUri ( 'clean/birthdate' ) , [ $ date ] ) ; $ result = $ this -> populate ( new Date , $ response ) ; if ( ! $ result instanceof Date ) { throw new RuntimeException ( 'Unexpected populate result: ' . get_class ( $ result ) . '. Expected: ' . Date :: class ) ; } return $ result ; }
Cleans date.

@param string $date

@return Date
@throws RuntimeException
@throws InvalidArgumentException
Cleans date .