@Test public void formatAsDays__givenMoreThan30Days__shouldFormatInDays() { assertEquals("Future format for months wrong", "60 days from now", durationFormatter.formatAsDays(inTwoMonths)); assertEquals("Past format for months wrong", "60 days ago", durationFormatter.formatAsDays(twoMonthsAgo)); }
public String formatAsDays(Instant instant) { return formatAsDays(toDate(instant)); }
DurationFormatter { public String formatAsDays(Instant instant) { return formatAsDays(toDate(instant)); } }
DurationFormatter { public String formatAsDays(Instant instant) { return formatAsDays(toDate(instant)); } private  DurationFormatter(Locale locale); }
DurationFormatter { public String formatAsDays(Instant instant) { return formatAsDays(toDate(instant)); } private  DurationFormatter(Locale locale); static DurationFormatter forLocale(Locale locale); static DurationFormatter forRequestLocale(); String format(Instant instant); String format(LocalDateTime localDateTime); String format(Date date); String formatAsDays(Instant instant); String formatAsDays(Date date); String formatDifference(Instant instant); String formatDifference(LocalDateTime localDateTime); String formatDifference(Date date); String formatDifferenceAsDays(Instant instant); String formatDifferenceAsDays(Date date); }
DurationFormatter { public String formatAsDays(Instant instant) { return formatAsDays(toDate(instant)); } private  DurationFormatter(Locale locale); static DurationFormatter forLocale(Locale locale); static DurationFormatter forRequestLocale(); String format(Instant instant); String format(LocalDateTime localDateTime); String format(Date date); String formatAsDays(Instant instant); String formatAsDays(Date date); String formatDifference(Instant instant); String formatDifference(LocalDateTime localDateTime); String formatDifference(Date date); String formatDifferenceAsDays(Instant instant); String formatDifferenceAsDays(Date date);  }