DateFormatUtil { @NotNull public static String formatDate(@NotNull Date time) { return formatDate(time.getTime()); } private  DateFormatUtil(); static long getDifferenceInDays(@NotNull Date startDate, @NotNull Date endDate); @NotNull static SyncDateFormat getDateFormat(); @NotNull static SyncDateFormat getTimeFormat(); @NotNull static SyncDateFormat getTimeWithSecondsFormat(); @NotNull static SyncDateFormat getDateTimeFormat(); @NotNull static SyncDateFormat getIso8601Format(); @NotNull static String formatTime(@NotNull Date time); @NotNull static String formatTime(long time); @NotNull static String formatTimeWithSeconds(@NotNull Date time); @NotNull static String formatTimeWithSeconds(long time); @NotNull static String formatDate(@NotNull Date time); @NotNull static String formatDate(long time); @NotNull static String formatPrettyDate(@NotNull Date date); @NotNull static String formatPrettyDate(long time); @NotNull static String formatDateTime(Date date); @NotNull static String formatDateTime(long time); @NotNull static String formatPrettyDateTime(Date date); @NotNull static String formatPrettyDateTime(long time); @NotNull static String formatDuration(long delta); @NotNull static String formatFrequency(long time); @NotNull static String formatBetweenDates(long d1, long d2); @NotNull static String formatAboutDialogDate(@NotNull Date date); static final long SECOND; static final long MINUTE; static final long HOUR; static final long DAY; static final long WEEK; static final long MONTH; static final long YEAR; static final long DAY_FACTOR; @SuppressWarnings("unused")
  static final SyncDateFormat ISO8601_DATE_FORMAT; }
@Test public void testBasics() throws ParseException { Clock.setTime(2004, Calendar.DECEMBER, 10, 17, 10); doTestPrettyDate("Today", "10.12.2004 17.00.00"); doTestPrettyDate("Today", "10.12.2004 00.00.00"); doTestPrettyDate("Yesterday", "09.12.2004 23.59.59"); doTestPrettyDate(DateFormatUtil.formatDate(DATE_FORMAT.parse("08.12.2004 23.59.59")), "08.12.2004 23.59.59"); doTestPrettyDate(DateFormatUtil.formatDate(DATE_FORMAT.parse("10.12.2003 17.00.00")), "10.12.2003 17.00.00"); }