Java Day From getDay0(Date date)

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

Description

get Day

License

Apache License

Declaration

public static Date getDay0(Date date) 

Method Source Code

//package com.java2s;
/**/*from  w ww .j a v  a 2 s.  c o m*/
  *  Copyright (c) 2014 http://www.lushapp.wang
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  */

import java.util.*;

public class Main {
    public static Date getDay0(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        return calendar.getTime();
    }
}

Related

  1. getDateUpDay(Date d)
  2. getDay(Date date)
  3. getDay(Date date)
  4. getDay(Date date, int day)
  5. getDay(String date)
  6. getDayOfDate(Date date)
  7. getDays(Date date1, Date date2)
  8. getDays(Date sd, Date ed)
  9. getDaysBetween(int dateInt1, int dateInt2)