随笔分类 -  时间

摘要:1 date 时间 00:00:00 转成 59:59:99 落数据发现,同事时间格式是 导致结束时间全都是 00:00:00,这不是结束的最大时间格式。 于是重写了 set 方法,把时间换算为最大时间格式 public void setValidEndDate(Date validEndDate) 阅读全文
posted @ 2022-11-22 15:29 未确定 阅读(790) 评论(0) 推荐(0)
摘要:1 localDate 格式为年月日 yyyy-MM-dd 1.1 获取当前时间 //获取当前时间 LocalDate now = LocalDate.now(); 1.2 string 转 LocalDate //string 转 localDate LocalDate time = LocalD 阅读全文
posted @ 2021-12-31 12:12 未确定 阅读(2079) 评论(0) 推荐(0)
摘要:/** * 获取一段时间的每一天日期或者月份 * 开始时间要小于结束时间 * @param start * @param end * @return * @throws Exception */ public static List<String> getBetweenDate(String sta 阅读全文
posted @ 2021-06-24 12:07 未确定 阅读(190) 评论(0) 推荐(0)
摘要:1 public static String asd(int past, String time, Integer type) { //time yyyy-MM-dd LocalDate now = LocalDate.now(); Integer year = Integer.valueOf(ti 阅读全文
posted @ 2021-06-22 16:57 未确定 阅读(148) 评论(0) 推荐(0)
摘要:1 cst 转 时间格式 public class 时间转换 { /** * CSt 转换日期格式 * @param cstTime * @return */ public static void main(String[] args) { String time="Wed Jun 02 17:53 阅读全文
posted @ 2021-06-03 18:11 未确定 阅读(62) 评论(0) 推荐(0)
摘要:public class 时间转换天时分秒 { public static void main(String[] args) { //时间差 long timeDifference=12313213; System.out.println(conversion(timeDifference)); } 阅读全文
posted @ 2021-05-19 17:43 未确定 阅读(381) 评论(0) 推荐(0)
摘要:\ 标记向后引用 \s 空格 - 横杠 :punct: 任何标点符号 String localDate= LocalDate.now().toString().replaceAll("[[\\s-:punct:]]",""); System.out.println(localDate); 阅读全文
posted @ 2021-03-26 15:48 未确定 阅读(413) 评论(0) 推荐(0)