@Test public void getEndDate_invalidDate() { String someDate = "noDate"; String deFormattedDate = DateUtil.getEndDate(someDate, 30, Locale.GERMAN); System.out.println("deFormattedDate: " + deFormattedDate); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.GERMAN); String today = df.format(new Date()); assertTrue(deFormattedDate.equals(today)); }
public static String getEndDate(String startDateString, int noDays, Locale locale) { Date endDate = getEndDate(startDateString, noDays); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); return df.format(endDate); }
DateUtil { public static String getEndDate(String startDateString, int noDays, Locale locale) { Date endDate = getEndDate(startDateString, noDays); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); return df.format(endDate); } }
DateUtil { public static String getEndDate(String startDateString, int noDays, Locale locale) { Date endDate = getEndDate(startDateString, noDays); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); return df.format(endDate); }  }
DateUtil { public static String getEndDate(String startDateString, int noDays, Locale locale) { Date endDate = getEndDate(startDateString, noDays); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); return df.format(endDate); }  static boolean isMoreThanOneDayBefore(Date date); static Date getYesterday(); static Date getDayBefore(Date date); static Date getDayBefore(Date date, int numberOfDays); static String extractDate(Date date, Locale locale); static String extractTime(Date date, Locale locale); static DateFilter getDateFilterFromDDaysBeforeToToday(int days); static String getEndDate(String startDateString, int noDays, Locale locale); static int getRemainingDays(String startDateString, int noDays); }
DateUtil { public static String getEndDate(String startDateString, int noDays, Locale locale) { Date endDate = getEndDate(startDateString, noDays); DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); return df.format(endDate); }  static boolean isMoreThanOneDayBefore(Date date); static Date getYesterday(); static Date getDayBefore(Date date); static Date getDayBefore(Date date, int numberOfDays); static String extractDate(Date date, Locale locale); static String extractTime(Date date, Locale locale); static DateFilter getDateFilterFromDDaysBeforeToToday(int days); static String getEndDate(String startDateString, int noDays, Locale locale); static int getRemainingDays(String startDateString, int noDays);  }