@Test public void testConvertShortDateException () throws ParseException { String nul = null; Assert.assertNull(DateUtil.convertShortDate("")); Assert.assertNull(DateUtil.convertShortDate(nul)); try { DateUtil.convertShortDate("unknown"); Assert.fail("Exception not thrown on invalid date.[]"); } catch (ParseException pex) { } }
public static String convertShortDate(Date obj) { return dateToString(obj, "yyyyMMdd"); }
DateUtil { public static String convertShortDate(Date obj) { return dateToString(obj, "yyyyMMdd"); } }
DateUtil { public static String convertShortDate(Date obj) { return dateToString(obj, "yyyyMMdd"); } private  DateUtil(); }
DateUtil { public static String convertShortDate(Date obj) { return dateToString(obj, "yyyyMMdd"); } private  DateUtil(); static String dateToString(Date obj, String format); static Date stringToDate(String strDate, String format); static Date convertFlexibleDate(String strDate, String[] formats); static String convertShortDate(Date obj); static Date convertShortDate(String str); static Date convertShortDate(String str, Date defaultDate); static Date convertFlexibleDate(String strDate); static boolean compareNullableDates(Date date1, Date date2); static boolean hasTime(Date date); static Date getClientCurrentDate(final Calendar calendar, final TimeZone timeZone); static Date getDateFrom(int count, Date date); static Date getDayOfTheWeek(int day, int week, int year); static Date removeTime(Date date); }
DateUtil { public static String convertShortDate(Date obj) { return dateToString(obj, "yyyyMMdd"); } private  DateUtil(); static String dateToString(Date obj, String format); static Date stringToDate(String strDate, String format); static Date convertFlexibleDate(String strDate, String[] formats); static String convertShortDate(Date obj); static Date convertShortDate(String str); static Date convertShortDate(String str, Date defaultDate); static Date convertFlexibleDate(String strDate); static boolean compareNullableDates(Date date1, Date date2); static boolean hasTime(Date date); static Date getClientCurrentDate(final Calendar calendar, final TimeZone timeZone); static Date getDateFrom(int count, Date date); static Date getDayOfTheWeek(int day, int week, int year); static Date removeTime(Date date);  }