Here you can find the source of calendarAtStartOfToday()
public static Calendar calendarAtStartOfToday()
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; public class Main { public static Calendar calendarAtStartOfToday() { GregorianCalendar calendar = new GregorianCalendar(); calendar.setTimeZone(TimeZone.getTimeZone("UTC")); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; }// ww w . j a va2s. c o m }