@Test public void testDateFormatter() { Date date = new Date(System.currentTimeMillis() - 3600); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); String datetime = sdf.format(date); assertEquals(datetime, DateFormatUtil.format(date)); }
public static String format(Date d) { String format = DATE_FORMATS[0]; SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(d); }
DateFormatUtil { public static String format(Date d) { String format = DATE_FORMATS[0]; SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(d); } }
DateFormatUtil { public static String format(Date d) { String format = DATE_FORMATS[0]; SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(d); } private  DateFormatUtil(); }
DateFormatUtil { public static String format(Date d) { String format = DATE_FORMATS[0]; SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(d); } private  DateFormatUtil(); static Date parse(String s); static Date parse(String s, Date defaultDate); static String format(Date d); static String toString(Date d, String format); static Date toDate(String stringRep, String format); }
DateFormatUtil { public static String format(Date d) { String format = DATE_FORMATS[0]; SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(d); } private  DateFormatUtil(); static Date parse(String s); static Date parse(String s, Date defaultDate); static String format(Date d); static String toString(Date d, String format); static Date toDate(String stringRep, String format);  }