Here you can find the source of trimCalendar(Calendar cal)
public static void trimCalendar(Calendar cal)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static void trimCalendar(Calendar cal) { cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); }//www. ja v a 2 s . co m }