3 Replies Latest reply on Apr 10, 2008 2:13 PM by 807591

    How to validate a given date like April 9

      Hi All,

      I am stuck up validating date in the format April 9.

      Please find my code below:

      public static boolean isValidDateFormat(String date) {

      SimpleDateFormat sdf = new SimpleDateFormat("MMMM d");
      try {
      } catch (ParseException e) {
      return false;

      return true;
      This is working fine but for invalid values like April 99, April -1, February 31 etc this is returning true. Is there any in built API's for validating this in JAVA