Java Date Start getStartOfDay(Date date)

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

Description

get Start Of Day

License

Open Source License

Declaration

public static Date getStartOfDay(Date date) 

Method Source Code

//package com.java2s;

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

public class Main {

    public static Date getStartOfDay(Date date) {
        Calendar cal = new GregorianCalendar();
        cal.setTime(date);//from w  ww  .j  a va2  s.c  o m
        cal.set(Calendar.HOUR, -12);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        date = cal.getTime();
        return date;
    }
}

Related

  1. getStartDateOfCurrentSemester()
  2. getStartDateOfCurrMonth()
  3. getStartDay(Date date)
  4. getStartDayOfNextMonth(Date date)
  5. getStartOfDate(final Date date)
  6. getStartOfDay(Date date)
  7. getStartOfDay(Date day)
  8. getStartOfDay(Date day)
  9. getStartOfMonth(Date date)