code: public boolean isValidDate(String month, String day, String year, 
                                 String hour, String minute, String second, 
                                 String millisecond) {
          boolean valid = true;
          try {
              valid = isValidDate(Integer.parseInt(month), Integer.parseInt(day), 
                                  Integer.parseInt(year), Integer.parseInt(hour), 
                                  Integer.parseInt(minute), 
                                  Integer.parseInt(second), 
                                  Integer.parseInt(millisecond));
          }
          catch (NumberFormatException nfe) {
              valid = false;
          }
  
          return valid;
      }
docs: Check if all values in the given data are valid and that the result will
  be a valid date.
  
  @param month The month (1-12)
  @param day The day (1-31)
  @param year The year (4-digit)
  @param hour The hour (0-23)
  @param minute The minutes (0-59)
  @param second The seconds (0-59)
  @param millisecond The milliseconds (0-999)
  
  @return <code>true</code> if all data represents a valid date,
  <code>false</code> otherwise