Here you can find the source of getMinDateOfDay(Date date)
public static Date getMinDateOfDay(Date date)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getMinDateOfDay(Date date) { if (date == null) { return null; } else {/*from w w w .j av a2 s .c o m*/ Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(11, calendar.getActualMinimum(11)); calendar.set(12, calendar.getActualMinimum(12)); calendar.set(13, calendar.getActualMinimum(13)); calendar.set(14, calendar.getActualMinimum(14)); return calendar.getTime(); } } }