function isValidDate($date)
{
    list($year, $month, $day) = explode('-', $date);
    if (!is_numeric($year) || !is_numeric($month) || !is_numeric($day))
    {
        return false;
    }
    return checkdate($month, $day, $year);
}