Java Day End getEndOfDay(Date date)

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

Description

get End Of Day

License

Open Source License

Declaration

public static Date getEndOfDay(Date date) 

Method Source Code

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

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

public class Main {

    public static Date getEndOfDay(Date date) {
        if (date == null)
            return null;
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);/*from ww w  .  ja v a2  s.c  o m*/
        cal.set(Calendar.HOUR_OF_DAY, 23);
        cal.set(Calendar.MINUTE, 59);
        cal.set(Calendar.SECOND, 59);
        cal.set(Calendar.MILLISECOND, 999);
        Date ds = new Date(cal.getTimeInMillis());
        return ds;
    }
}

Related

  1. getEndDateOfCurrentSemester()
  2. getEndDateOfMonth(Date given)
  3. getEndMonth(Date sessionEnd, int year, int excessDays)
  4. getEndOfDay(Date d)
  5. getEndOfDay(Date date)
  6. getEndOfDay(Date date)
  7. getEndOfDay(Date date)
  8. getEndOfDay(Date day)
  9. getEndOfDay(Date day)