@Test public void testDateToString() throws ParseException{ Assert.assertEquals("12/31/2009", DateUtil.dateToString(dec_31_2009, "MM/dd/yyyy")); Assert.assertEquals("", DateUtil.dateToString(null, "MM/dd/yyyy")); }
public static String dateToString(Date obj, String format) { if (obj == null) return ""; SimpleDateFormat dtFormatter = new SimpleDateFormat(format); return dtFormatter.format(obj); }
DateUtil { public static String dateToString(Date obj, String format) { if (obj == null) return ""; SimpleDateFormat dtFormatter = new SimpleDateFormat(format); return dtFormatter.format(obj); } }
DateUtil { public static String dateToString(Date obj, String format) { if (obj == null) return ""; SimpleDateFormat dtFormatter = new SimpleDateFormat(format); return dtFormatter.format(obj); } private  DateUtil(); }
DateUtil { public static String dateToString(Date obj, String format) { if (obj == null) return ""; SimpleDateFormat dtFormatter = new SimpleDateFormat(format); return dtFormatter.format(obj); } 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 dateToString(Date obj, String format) { if (obj == null) return ""; SimpleDateFormat dtFormatter = new SimpleDateFormat(format); return dtFormatter.format(obj); } 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);  }