@Test public void testGetDayBegin() { Assert.assertNull(DateUtil.getDayBegin(null)); Assert.assertEquals(new Date(1_515_542_400_000L), DateUtil.getDayBegin(new Date(1_515_585_600_000L))); }
public static Date getDayBegin(Date date) { if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); setCalender(calendar, 0, 0, 0, 0); return calendar.getTime(); }
DateUtil { public static Date getDayBegin(Date date) { if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); setCalender(calendar, 0, 0, 0, 0); return calendar.getTime(); } }
DateUtil { public static Date getDayBegin(Date date) { if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); setCalender(calendar, 0, 0, 0, 0); return calendar.getTime(); }  }
DateUtil { public static Date getDayBegin(Date date) { if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); setCalender(calendar, 0, 0, 0, 0); return calendar.getTime(); }  static Date addDate(int field, int amount); static Date addDate(Date date, int field, int amount); static String format(Date date, String pattern); static Date getDayBegin(Date date); static Date getDayBegin(); static Date getDayEnd(Date date); static Date getDayEnd(); static void setCalender(Calendar calendar, int hour, int minute, int second, int milliSecond); static boolean isBetween(Date beginTime, Date endTime); }
DateUtil { public static Date getDayBegin(Date date) { if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); setCalender(calendar, 0, 0, 0, 0); return calendar.getTime(); }  static Date addDate(int field, int amount); static Date addDate(Date date, int field, int amount); static String format(Date date, String pattern); static Date getDayBegin(Date date); static Date getDayBegin(); static Date getDayEnd(Date date); static Date getDayEnd(); static void setCalender(Calendar calendar, int hour, int minute, int second, int milliSecond); static boolean isBetween(Date beginTime, Date endTime);  }