Here you can find the source of resetTime(GregorianCalendar cal)
public static void resetTime(GregorianCalendar cal)
//package com.java2s; /******************************************************************************* * Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/* w ww . j a va2s.c o m*/ * s IT Solutions AT Spardat GmbH - initial API and implementation *******************************************************************************/ import java.util.GregorianCalendar; import java.util.Calendar; public class Main { /** * Sets the time in the given <tt>cal</tt> to 00:00:00.000 */ public static void resetTime(GregorianCalendar cal) { cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); } }