@Test public void testIsValidDateFormatToStringDate() { assertTrue( DateDetector.isValidDateFormatToStringDate( SAMPLE_DATE_FORMAT_US, SAMPLE_DATE_STRING_US ) ); assertFalse( DateDetector.isValidDateFormatToStringDate( null, SAMPLE_DATE_STRING_US ) ); assertFalse( DateDetector.isValidDateFormatToStringDate( SAMPLE_DATE_FORMAT_US, null ) ); }
public static boolean isValidDateFormatToStringDate( String dateFormat, String dateString ) { String detectedDateFormat = detectDateFormat( dateString ); if ( ( dateFormat != null ) && ( dateFormat.equals( detectedDateFormat ) ) ) { return true; } return false; }
DateDetector { public static boolean isValidDateFormatToStringDate( String dateFormat, String dateString ) { String detectedDateFormat = detectDateFormat( dateString ); if ( ( dateFormat != null ) && ( dateFormat.equals( detectedDateFormat ) ) ) { return true; } return false; } }
DateDetector { public static boolean isValidDateFormatToStringDate( String dateFormat, String dateString ) { String detectedDateFormat = detectDateFormat( dateString ); if ( ( dateFormat != null ) && ( dateFormat.equals( detectedDateFormat ) ) ) { return true; } return false; } private  DateDetector(); }
DateDetector { public static boolean isValidDateFormatToStringDate( String dateFormat, String dateString ) { String detectedDateFormat = detectDateFormat( dateString ); if ( ( dateFormat != null ) && ( dateFormat.equals( detectedDateFormat ) ) ) { return true; } return false; } private  DateDetector(); static String getRegexpByDateFormat( String dateFormat ); static String getRegexpByDateFormat( String dateFormat, String locale ); static String getDateFormatByRegex( String regex ); static String getDateFormatByRegex( String regex, String locale ); static Date getDateFromString( String dateString ); static Date getDateFromString( String dateString, String locale ); static Date getDateFromStringByFormat( String dateString, String dateFormat ); static String detectDateFormat( String dateString ); static String detectDateFormat( String dateString, String locale ); static String detectDateFormatBiased( String dateString, String locale, String desiredKey ); static BidiMap getDateFormatToRegExps( String locale ); static boolean isValidDate( String dateString, String dateFormat ); static boolean isValidDate( String dateString ); static boolean isValidDateFormatToStringDate( String dateFormat, String dateString ); static boolean isValidDateFormatToStringDate( String dateFormat, String dateString, String locale ); }
DateDetector { public static boolean isValidDateFormatToStringDate( String dateFormat, String dateString ) { String detectedDateFormat = detectDateFormat( dateString ); if ( ( dateFormat != null ) && ( dateFormat.equals( detectedDateFormat ) ) ) { return true; } return false; } private  DateDetector(); static String getRegexpByDateFormat( String dateFormat ); static String getRegexpByDateFormat( String dateFormat, String locale ); static String getDateFormatByRegex( String regex ); static String getDateFormatByRegex( String regex, String locale ); static Date getDateFromString( String dateString ); static Date getDateFromString( String dateString, String locale ); static Date getDateFromStringByFormat( String dateString, String dateFormat ); static String detectDateFormat( String dateString ); static String detectDateFormat( String dateString, String locale ); static String detectDateFormatBiased( String dateString, String locale, String desiredKey ); static BidiMap getDateFormatToRegExps( String locale ); static boolean isValidDate( String dateString, String dateFormat ); static boolean isValidDate( String dateString ); static boolean isValidDateFormatToStringDate( String dateFormat, String dateString ); static boolean isValidDateFormatToStringDate( String dateFormat, String dateString, String locale );  }