Here you can find the source of calculatorStartTimeOnDay(Date date)
public static long calculatorStartTimeOnDay(Date date)
//package com.java2s; import java.util.*; public class Main { public static long calculatorStartTimeOnDay(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date);/*from w w w. j av a 2s .com*/ cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTimeInMillis(); } }