/** * 获取生日 * * @param date * @param needYear * @return */ public static String getBirthday(long date, boolean needYear) { int[] details = TimeUtil.getWholeDetail(date); if (needYear) { return details[0] + "年" + details[1] + "月" + details[2] + "日"; } return details[1] + "月" + details[2] + "日"; }
/** * 获取完整时间 yyyy年mm月dd日hh时mm分 * * @param date * @return */ public static String getWholeTime(long date) { int[] details = TimeUtil.getWholeDetail(date); return details[0] + "年" + details[1] + "月" + details[2] + "日 " + details[3] + "时" + details[4] + "分"; }