Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static void clearTimeInfo(Calendar theDate) { if (theDate == null) { return; } theDate.set(Calendar.HOUR_OF_DAY, 0); theDate.set(Calendar.MINUTE, 0); theDate.set(Calendar.SECOND, 0); } }