Here you can find the source of getStartTimeOfDate(Date date)
public static Date getStartTimeOfDate(Date date)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getStartTimeOfDate(Date date) { Calendar calendar = getCalendarByDate(date); calendar.set(11, 0);// w w w. ja v a2 s. co m calendar.set(12, 0); calendar.set(13, 0); calendar.set(14, 0); return calendar.getTime(); } private static Calendar getCalendarByDate(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); return c; } }