Here you can find the source of todayStart()
public static Date todayStart()
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date todayStart() { return getDateWithoutTimePart(new Date()); }//from www. j a v a2s . c o m public static Date todayStart(Date date) { return getDateWithoutTimePart(date); } public static Date getDateWithoutTimePart(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTime(); } }