CalendarPatterns { public static Date parseImportDate(String dateString) { try { Date resultDate = validDate(dateFormat__ddMMyyyyHHmmss, dateString); if (resultDate != null) { return resultDate; } resultDate = validDate(dateFormat__ddMMyyyy, dateString); if (resultDate != null) { return resultDate; } resultDate = validDate(dateString); if (dateString != null) { return resultDate; } log.error("parseImportDate:: Could not parse date string {}", dateString); } catch (Exception e) { log.error("parseImportDate", e); } return null; } private  CalendarPatterns(); static String getDateByMiliSeconds(Date t); static String getDateWithTimeByMiliSeconds(Date t); static String getDateWithTimeByMiliSecondsWithZone(Date t); static String getExportDate(Date t); static Date parseImportDate(String dateString); static String getDateWithTimeByMiliSecondsAndTimeZone(Date t, TimeZone timezone); static String getTimeForStreamId(Date t); static Date parseDate(String dateString); static Date parseDateBySeparator(String dateString); static Date parseDateWithHour(String dateString); static final FastDateFormat dateFormat__ddMMyyyyHHmmss; static final FastDateFormat dateFormat__ddMMyyyy; static final FastDateFormat dateFormat__ddMMyyyyBySeparator; static final FastDateFormat dateFormat__yyyyMMddHHmmss; static final FastDateFormat STREAM_DATE_FORMAT; static final String FULL_DF_PATTERN; static final String ISO8601_FULL_FORMAT_STRING; static final String ISO8601_DATETIME_FORMAT_STRING; static final String ISO8601_DATE_FORMAT_STRING; static final FastDateFormat FULL_DATE_FORMAT; static final FastDateFormat ISO8601_FULL_FORMAT; static final FastDateFormat ISO8601_DATETIME_FORMAT; static final FastDateFormat ISO8601_DATE_FORMAT; }
@Test void backupDateParseTest() { Date d = CalendarPatterns.parseImportDate("1360832400000"); assertNotNull(d, "Date parsed should not be NULL"); }