DateUtil

 1 public abstract class DateUtil {
 2 
 3     public static Date getEndDate(Date endDate) {
 4         if (endDate == null){
 5             return null;
 6         }
 7         Calendar c = Calendar.getInstance();
 8         c.setTime(endDate);
 9         c.set(Calendar.HOUR,23);
10         c.set(Calendar.MINUTE,59);
11         c.set(Calendar.SECOND,59);
12         return c.getTime();
13     }
14 }

 

posted @ 2020-12-05 15:07  y海涛  阅读(78)  评论(0编辑  收藏  举报