Here you can find the source of getTodayStart()
public static long getTodayStart()
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static long getTodayStart() { Calendar c = new GregorianCalendar(); 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().getTime(); }/*from w w w .j av a 2 s . c o m*/ }