Here you can find the source of removeTime(Calendar calendar)
public static Calendar removeTime(Calendar calendar)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static Calendar removeTime(Calendar calendar) { Calendar returnCalendar = (Calendar) calendar.clone(); returnCalendar.set(Calendar.HOUR_OF_DAY, 0); returnCalendar.set(Calendar.MINUTE, 0); returnCalendar.set(Calendar.SECOND, 0); returnCalendar.set(Calendar.MILLISECOND, 0); return returnCalendar; }//w w w .j ava2s .com }