From 8d8b9e4254231ff4dc8fc32c29608aeec47232d5 Mon Sep 17 00:00:00 2001 From: fwq <582742538@qq.com> Date: 星期一, 26 十二月 2022 17:38:39 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/java/com/hx/util/DateUtil.java | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/hx/util/DateUtil.java b/src/main/java/com/hx/util/DateUtil.java index 5f642aa..64e037f 100644 --- a/src/main/java/com/hx/util/DateUtil.java +++ b/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 */ -- Gitblit v1.8.0