@Test public void testToString() { Calendar gCal = GregorianCalendar.getInstance(); gCal.set(Calendar.DAY_OF_MONTH, 1); gCal.set(Calendar.MONTH, 2); gCal.set(Calendar.YEAR, 2013); gCal.set(Calendar.HOUR_OF_DAY, 22); gCal.set(Calendar.MINUTE, 21); gCal.set(Calendar.SECOND, 01); String actualDate = DateUtil.toString(gCal.getTime()); Assert.assertEquals("2013-03-01 22:21:01", actualDate); }
public static String toString(Date date) { if (date != null) { return formatter.format(date); } return null; }
DateUtil { public static String toString(Date date) { if (date != null) { return formatter.format(date); } return null; } }
DateUtil { public static String toString(Date date) { if (date != null) { return formatter.format(date); } return null; } private  DateUtil(); }
DateUtil { public static String toString(Date date) { if (date != null) { return formatter.format(date); } return null; } private  DateUtil(); static String toString(Date date); static String toISO8601String(Date date); static Date dateFromString(String date); static Date nowDate(); }
DateUtil { public static String toString(Date date) { if (date != null) { return formatter.format(date); } return null; } private  DateUtil(); static String toString(Date date); static String toISO8601String(Date date); static Date dateFromString(String date); static Date nowDate();  }