摘要: 导出Excel util /** * 导出Excel * @param sheetName sheet名称 * @param title 标题 * @param values 内容 * @param wb HSSFWorkbook对象 * @return */public static HSSFWo 阅读全文
posted @ 2021-08-10 17:05 游走人间的蒲公英 阅读(60) 评论(0) 推荐(0) 编辑
摘要: UTF-8编码转换为ISO-9959-1 public static String utf8ToIso88591(String str) { if (str == null) { return str; } try { return new String(str.getBytes("UTF-8"), 阅读全文
posted @ 2021-08-10 16:29 游走人间的蒲公英 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 时间毫秒值转换为时间字符串 /** * 时间毫秒值转换为时间字符串 * @param format 时间格式 * @param timestamp 时间毫秒值 * @return */public static String stampToTime(String format, long times 阅读全文
posted @ 2021-08-10 16:25 游走人间的蒲公英 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 字符串时间转换成毫秒值 /** * 时间转换毫秒值 * @param format 时间格式 * @param time 时间 * @return */public static long timeToStamp(String format, String time) { SimpleDateFor 阅读全文
posted @ 2021-08-10 16:23 游走人间的蒲公英 阅读(758) 评论(0) 推荐(0) 编辑
摘要: /** * 时间加减月数 * @param startDate 要处理的时间,Null则为当前时间 * @param months 加减的月数 * @return Date */public static Date dateAddMonths(Date startDate, int months) 阅读全文
posted @ 2021-08-10 16:04 游走人间的蒲公英 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 时间加减天数 public static Date dateAddDays(Date startDate, int days) { if (startDate == null) { startDate = new Date(); } Calendar c = Calendar.getInstance 阅读全文
posted @ 2021-08-10 16:02 游走人间的蒲公英 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 时间加减秒数 /** * 时间加减秒数 * @param startDate 要处理的时间,Null则为当前时间 * @param seconds 加减的秒数 * @return */public static Date dateAddSeconds(Date startDate, int seco 阅读全文
posted @ 2021-08-10 16:01 游走人间的蒲公英 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 时间加减分钟 /** * 时间加减分钟 * @param startDate 要处理的时间,Null则为当前时间 * @param minutes 加减的分钟 * @return */public static Date dateAddMinutes(Date startDate, int minu 阅读全文
posted @ 2021-08-10 13:41 游走人间的蒲公英 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 获取当前系统时间最近12月的年月(含当月) public static List getLatest12Month(){ String[] latest12Months = new String[12]; Calendar cal = Calendar.getInstance(); List lis 阅读全文
posted @ 2021-08-10 13:39 游走人间的蒲公英 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 取得当前月份的天数 public static int getMonthLastDay(int year, int month) { Calendar a = Calendar.getInstance(); a.set(Calendar.YEAR, year); a.set(Calendar.MON 阅读全文
posted @ 2021-08-10 13:37 游走人间的蒲公英 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 得到指定月的天数 public static int getMonthLastDay(int year, int month) { Calendar a = Calendar.getInstance(); a.set(Calendar.YEAR, year); a.set(Calendar.MONT 阅读全文
posted @ 2021-08-10 11:27 游走人间的蒲公英 阅读(51) 评论(0) 推荐(0) 编辑