Java Date to Day getDayStart(Date date)

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

Description

get Day Start

License

Open Source License

Declaration

public static Date getDayStart(Date date) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date getDayStart(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);/*from  w w  w  .j a v a  2 s  .  c  o  m*/
        cal.set(Calendar.HOUR_OF_DAY, 00);
        cal.set(Calendar.MINUTE, 00);
        cal.set(Calendar.SECOND, 00);

        return cal.getTime();
    }
}

Related

  1. getDays(Date t, Date baseDate)
  2. getDaysEarlierDate(int days)
  3. getDayShort(Date date)
  4. getDaysMin(Date d)
  5. getDaysPassedSince(Date dateLastModified)
  6. getDayStart(final Date date)
  7. getDaysToLong(Date date1, Date date2)
  8. getDayTime(Date date, int hour, int minute, int second)