JDK18-LocalDate-使用方式LocalDate-封装UtilLocalDate工具类一

未完待续 ……..

由于SimpleDateFormat存在线程安全问题,所以在JDK1.8中使用LocalDate和LocalDateTime来进行日期的工具类使用,下边就是原创的LocalDateUtil封装

   《阿里巴巴开发手册1.4》

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/…

博客园详情
https://www.cnblogs.com/liuya…
https://www.cnblogs.com/liuya…

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理