src/main/java/com/hx/util/DateUtil.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/hx/util/DateUtil.java
@@ -660,6 +660,18 @@ return sdf.format(calendar.getTime()); } /**这天的开始时间 * 日期2000-01-01变2000-01-01 00:00:00 */ public static Date dayToStartDate(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); return calendar.getTime(); } /**这天的最后时间 * 日期2000-01-01变2000-01-01 23:59:59 */