Java Day End endOfDayDate(Date date)

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

Description

end Of Day Date

License

Open Source License

Declaration

static public Date endOfDayDate(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    static public Date endOfDayDate(Date date) {
        Calendar now = Calendar.getInstance();
        now.setTime(date);//from  w  ww  . j  a  v  a2s  .  com
        now.set(Calendar.HOUR_OF_DAY, 23);
        now.set(Calendar.MINUTE, 59);
        now.set(Calendar.SECOND, 59);
        now.set(Calendar.MILLISECOND, 999);
        return now.getTime();
    }
}

Related

  1. endOfDay(Date dt)
  2. endOfDay(Date inDate, TimeZone timeZone)
  3. endOfDay(Date value)
  4. endOfDay(final Date date)
  5. endOfDay(final Date date)
  6. endOfDayInMillis(long date)
  7. endOfTheMonth(java.util.Date date, Locale locale)
  8. endOfYear(Date referenceDate, TimeZone timeZone)
  9. fillBetweenDays(Date from, Date to)