Java Date Clear clearTime(GregorianCalendar date)

Here you can find the source of clearTime(GregorianCalendar date)

Description

Clears the time in a Gregorian calendar date.

License

Open Source License

Parameter

Parameter Description
date The date.

Declaration


public static void clearTime(GregorianCalendar date) 

Method Source Code


//package com.java2s;
/*   Please see the license information at the end of this file. */

import java.util.*;

public class Main {
    /**   Clears the time in a Gregorian calendar date.
     */*from w w  w .  j a  v a 2  s .c o  m*/
     *   @param      date   The date.
     */

    public static void clearTime(GregorianCalendar date) {
        date.set(Calendar.HOUR_OF_DAY, 0);
        date.set(Calendar.MINUTE, 0);
        date.set(Calendar.SECOND, 0);
        date.set(Calendar.MILLISECOND, 0);
    }
}

Related

  1. clearDate(final Date date)
  2. clearDisplayFileCreationDateCache(final String absolutePath)
  3. clearHourMinute(Date date)
  4. clearTime(Date date)
  5. clearTime(Date date)
  6. clearTimeComponent(Date date)