/** * Returns the date in the format "yyyy-MM-dd". * Use {@link #getDateString(long, String)} to specify a * custom date format instead. * @param time * @return */ public static String getDateString(long time) { return getDateString(time, "yyyy-MM-dd"); }
/** * Returns the date in the format "yyyy-MM-dd HH:mm:ss". * Use {@link #getDateString(long, String)} to specify a * custom date format instead. * @param time * @return */ public static String getDateAndTimeString(long time) { return getDateString(time, "yyyy-MM-dd HH:mm:ss"); }
if(source.getValue() <= 0) time = "not set"; else time = TimeUtils.getDateString(source.getValue()); break; default: