Java Date Start getStartTimeOfDate(Date date)

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

Description

get Start Time Of Date

License

Apache License

Declaration

public static Date getStartTimeOfDate(Date date) 

Method Source Code

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

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

public class Main {
    public static Date getStartTimeOfDate(Date date) {
        Calendar calendar = getCalendarByDate(date);
        calendar.set(11, 0);//  w  w  w.  ja v a2  s.  co m
        calendar.set(12, 0);
        calendar.set(13, 0);
        calendar.set(14, 0);

        return calendar.getTime();
    }

    private static Calendar getCalendarByDate(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);
        return c;
    }
}

Related

  1. getStartOfMonth(Date date)
  2. getStartOfMonth(Date dt)
  3. getStartOfMonth(Date dt)
  4. getStartOfQuarter(Date dt)
  5. getStartTimeByManDay(Date serviceStartTime)
  6. getStartTimeOfDay(Date date)
  7. getStartTimeOfDay(Date date)
  8. getStrDateToDate(String dateStr)
  9. getStringDate()