/** * * @param dateFormat - format which we will try to apply for string * @param dateString - string which contains date * @param locale - locale for date format * @return true if we found that we know dateFormat and it applied for given string */ public static boolean isValidDateFormatToStringDate( String dateFormat, String dateString, String locale ) { String detectedDateFormat = dateFormat != null ? detectDateFormatBiased( dateString, locale, dateFormat ) : detectDateFormat( dateString, locale ); if ( ( dateFormat != null ) && ( dateFormat.equals( detectedDateFormat ) ) ) { return true; } return false; } }