code: public static boolean isISODate(final String val) throws BadDateException {
      try {
        if (val.length() != 8) {
          return false;
        }
        fromISODate(val);
        return true;
      } catch (Throwable t) {
        return false;
      }
    }
docs: Check Date is "yyyyMMdd"
  
  @param val String to check
  @return boolean
  @throws BadDateException on format error