Here you can find the source of getStart(Date date)
public static Date getStart(Date date)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { /** Returns the given date with the time set to the start of the day. */ public static Date getStart(Date date) { return clearTime(date); }/* www .ja va 2 s.c o m*/ /** Returns the given date with the time values cleared. */ public static Date clearTime(Date date) { if (date == null) { return null; } Calendar c = Calendar.getInstance(); c.setTime(date); c.set(Calendar.HOUR_OF_DAY, 0); c.set(Calendar.MINUTE, 0); c.set(Calendar.SECOND, 0); c.set(Calendar.MILLISECOND, 0); return c.getTime(); } }