private boolean isDateFormatString(String string){
  if (string.length() < 3) {
    return false;
  }
  final int strLength=string.length();
  final char startChar=string.charAt(0);
  final char endChar=string.charAt(strLength - 1);
  if (startChar == '/' || endChar == '/') {
    return false;
  }
 else   if (Character.isLetter(startChar) && string.charAt(1) == ':') {
    return false;
  }
  final Matcher dateFormatMatcher=DATE_FORMAT_PATTERN.matcher(string);
  return dateFormatMatcher.find();
}

private boolean isDateFormatString ( String string ) { if ( string . length ( ) < 3 ) { return false ; } final int strLength = string . length ( ) ; final char startChar = string . charAt ( 0 ) ; final char endChar = string . charAt ( strLength - 1 ) ; if ( startChar == '/' || endChar == '/' ) { return false ; } else if ( Character . isLetter ( startChar ) && string . charAt ( 1 ) == ':' ) { return false ; } final Matcher dateFormatMatcher = DATE_FORMAT_PATTERN . matcher ( string ) ; return dateFormatMatcher . find ( ) ; }
check whether a string containing at least one ' / ' or ' \ ' character is likely to be a date format string .
