Java Date Clear clearDate(Date date)

Here you can find the source of clearDate(Date date)

Description

clear Date

License

Apache License

Declaration

public static Date clearDate(Date date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {

    public static Date clearDate(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);/*ww w  .jav a 2  s .co m*/
        c.set(Calendar.YEAR, 0);
        c.set(Calendar.MONTH, 0);
        c.set(Calendar.DATE, 0);
        return c.getTime();
    }
}

Related

  1. clearDate(Date dateTime)
  2. clearDate(final Date date)
  3. clearDisplayFileCreationDateCache(final String absolutePath)
  4. clearHourMinute(Date date)