未完待续 ........
由于SimpleDateFormat存在线程安全问题,所以在JDK1.8中使用LocalDate和LocalDateTime来进行日期的工具类使用,下边就是原创的LocalDateUtil封装
1、localDate格式化年月日为字符串
2、localDateTime格式化年月日时分秒为字符串
3、localDate时区格式化年月日为字符串
4、localDateTime时区格式化年月日为字符串
5、localDate 转 LocalDate
6、localDateTimeString 格式化日期为日期格式
7、localDateString 格式化日期为日期格式
8、localDateTime 转 localDateTime
9、日期转化为固定格式yyyy-MM-dd HH:mm:ss
源码测试的位置在
代码源码在
git:https://github.com/liushaoye/utilLiu
JDK1.8 LocalDate 使用方式;LocalDate 封装Util,LocalDate工具类
原文:https://www.cnblogs.com/liuyangfirst/p/11129788.html