JDK1.8 LocalDate 使用方式;LocalDate 封装Util,LocalDate工具类(二)

未完待续 ........ 

java.time.*代替方案

1、Instant 代替 Date
2、LocalDateTime 代替 Calendar
3、DateTimeFormatter 代替 SimpleDateFormat

 一、获取当前日期是星期几/获取任意时间是星期几/获取当前日期是星期几/获取任意时间是星期几

二、获取星期几对应的数字

 

三、获取今天的最早时间

四、获取本月的最早时间 

五、获取今年的最早时间 

六、获取今天的最晚时间 

七、获取本月的最晚时间 

八、获取今年的最晚时间 

九、获取今天中午的时间 

代码源码在

git:https://github.com/liushaoye/utilLiu

猜你喜欢

转载自www.cnblogs.com/liuyangfirst/p/11257602.html
今日推荐