public static Date parseDate ( final String date , final List < String > patterns ) { for ( final String pattern : patterns ) { final SimpleDateFormat formatter = new SimpleDateFormat ( pattern ) ; try { return formatter . parse ( date ) ; } catch ( final ParseException e ) { // Do nothing... } } return null ; }
Tries to convert the given String to a Date .