@Test public void testBasicDateParse() throws Exception { Calendar calendar = Calendar.getInstance(); calendar.setTimeZone(DateUtils.GMT); calendar.set(2005, Calendar.OCTOBER, 14, 0, 0, 0); calendar.set(Calendar.MILLISECOND, 0); Date date1 = calendar.getTime(); String[] formats = new String[] { DateUtils.PATTERN_RFC1123 }; Date date2 = DateUtils.parseDate("Fri, 14 Oct 2005 00:00:00 GMT", formats, null); Assert.assertEquals(date1, date2); date2 = DateUtils.parseDate("Fri, 14 Oct 2005 00:00:00 GMT", formats); Assert.assertEquals(date1, date2); date2 = DateUtils.parseDate("Fri, 14 Oct 2005 00:00:00 GMT"); Assert.assertEquals(date1, date2); }
public static Date parseDate(String dateValue) throws DateParseException { return parseDate(dateValue, null, null); }
DateUtils { public static Date parseDate(String dateValue) throws DateParseException { return parseDate(dateValue, null, null); } }
DateUtils { public static Date parseDate(String dateValue) throws DateParseException { return parseDate(dateValue, null, null); } private  DateUtils(); }
DateUtils { public static Date parseDate(String dateValue) throws DateParseException { return parseDate(dateValue, null, null); } private  DateUtils(); static Date parseDate(String dateValue); static Date parseDate(final String dateValue, String[] dateFormats); static Date parseDate(
        String dateValue,
        String[] dateFormats,
        Date startDate
    ); static String formatDate(Date date); static String formatDate(Date date, String pattern); }
DateUtils { public static Date parseDate(String dateValue) throws DateParseException { return parseDate(dateValue, null, null); } private  DateUtils(); static Date parseDate(String dateValue); static Date parseDate(final String dateValue, String[] dateFormats); static Date parseDate(
        String dateValue,
        String[] dateFormats,
        Date startDate
    ); static String formatDate(Date date); static String formatDate(Date date, String pattern); static final String PATTERN_RFC1123; static final String PATTERN_RFC1036; static final String PATTERN_ASCTIME; static final TimeZone GMT; }