摘要:
导出Excel util /** * 导出Excel * @param sheetName sheet名称 * @param title 标题 * @param values 内容 * @param wb HSSFWorkbook对象 * @return */public static HSSFWo 阅读全文
摘要:
UTF-8编码转换为ISO-9959-1 public static String utf8ToIso88591(String str) { if (str == null) { return str; } try { return new String(str.getBytes("UTF-8"), 阅读全文
摘要:
时间毫秒值转换为时间字符串 /** * 时间毫秒值转换为时间字符串 * @param format 时间格式 * @param timestamp 时间毫秒值 * @return */public static String stampToTime(String format, long times 阅读全文
摘要:
字符串时间转换成毫秒值 /** * 时间转换毫秒值 * @param format 时间格式 * @param time 时间 * @return */public static long timeToStamp(String format, String time) { SimpleDateFor 阅读全文
摘要:
/** * 时间加减月数 * @param startDate 要处理的时间,Null则为当前时间 * @param months 加减的月数 * @return Date */public static Date dateAddMonths(Date startDate, int months) 阅读全文
摘要:
时间加减天数 public static Date dateAddDays(Date startDate, int days) { if (startDate == null) { startDate = new Date(); } Calendar c = Calendar.getInstance 阅读全文
摘要:
时间加减秒数 /** * 时间加减秒数 * @param startDate 要处理的时间,Null则为当前时间 * @param seconds 加减的秒数 * @return */public static Date dateAddSeconds(Date startDate, int seco 阅读全文
摘要:
时间加减分钟 /** * 时间加减分钟 * @param startDate 要处理的时间,Null则为当前时间 * @param minutes 加减的分钟 * @return */public static Date dateAddMinutes(Date startDate, int minu 阅读全文
摘要:
获取当前系统时间最近12月的年月(含当月) public static List getLatest12Month(){ String[] latest12Months = new String[12]; Calendar cal = Calendar.getInstance(); List lis 阅读全文
摘要:
取得当前月份的天数 public static int getMonthLastDay(int year, int month) { Calendar a = Calendar.getInstance(); a.set(Calendar.YEAR, year); a.set(Calendar.MON 阅读全文
摘要:
得到指定月的天数 public static int getMonthLastDay(int year, int month) { Calendar a = Calendar.getInstance(); a.set(Calendar.YEAR, year); a.set(Calendar.MONT 阅读全文