code: public static boolean isDate(String date) {
          if (isEmpty(date)) return defaultEmptyOK;
          String month;
          String day;
          String year;
  
          int dateSlash1 = date.indexOf("/");
          int dateSlash2 = date.lastIndexOf("/");
  
          if (dateSlash1 <= 0 || dateSlash1 == dateSlash2) return false;
          month = date.substring(0, dateSlash1);
          day = date.substring(dateSlash1 + 1, dateSlash2);
          year = date.substring(dateSlash2 + 1);
  
          return isDate(year, month, day);
      }
docs: isDate returns true if string argument date forms a valid date.