check for valid date issue
<p>I would like to check for a valid date in 'mm/dd/yyyy' format. When I call the function below with <code>isValidDateTime('12/10/2012')</code>, it returns false. Could you please let me know what could be wrong?</p>

<pre><code>function isValidDateTime($dateTime)
{
    if (preg_match("/^(\d{2})/(\d{2})/(\d{4}) ([0-5][0-9]):([0-5][0-9]):([01][0-9]|2[0-3])$/", $dateTime, $matches)) {
        if (checkdate($matches[1], $matches[3], $matches[2])) {
            return true;
        }
    }

    return false;
}
</code></pre>
