Here you can find the source of getStartOfToday()
public static Date getStartOfToday()
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static Date getStartOfToday() { Calendar today = Calendar.getInstance(); int year = today.get(Calendar.YEAR); int month = today.get(Calendar.MONTH); int day = today.get(Calendar.DAY_OF_MONTH); return new GregorianCalendar(year, month, day, 0, 0, 0).getTime(); }//w ww . java 2 s . c om }