Here you can find the source of isValidDate(String dateString)
public static boolean isValidDate(String dateString)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; public class Main { public static SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy"); public static boolean isValidDate(String dateString) { try {/* w ww .ja v a2 s . c om*/ dateFormat.parse(dateString); return true; } catch (Exception e) { return false; } } }