/** * Format a human-readable version of the DCDate, with optional time. * This needs to be in DCDate because it depends on the granularity of * the original time. * * FIXME: This should probably be replaced with a localized DateFormat. * * @param showTime if true, display the time with the date * @param isLocalTime if true, adjust for local time zone, otherwise UTC * @param locale locale of the user * @return String with the date in a human-readable form. */ public String displayDate(boolean showTime, boolean isLocalTime, Locale locale) { if (isLocalTime) { return displayLocalDate(showTime, locale); } else { return displayUTCDate(showTime, locale); } }