Java Day End dayEnd(final Date date)

Here you can find the source of dayEnd(final Date date)

Description

day End

License

Open Source License

Declaration

public static Date dayEnd(final Date date) 

Method Source Code

//package com.java2s;

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

public class Main {

    public static Date dayEnd(final Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);/* ww w.ja  va  2  s .  co  m*/
        c.set(Calendar.HOUR_OF_DAY, 23);
        c.set(Calendar.MINUTE, 59);
        c.set(Calendar.SECOND, 59);
        c.set(Calendar.MILLISECOND, 999);
        return c.getTime();
    }
}

Related

  1. countMonths(java.util.Date startDate, java.util.Date endDate)
  2. dateBetweens(Date start, Date end)
  3. dateSpan(Date beginDate, Date endDate)
  4. dayBetweenTwoDates(Date beginDate, Date endDate)
  5. dayEnd(Date dt)
  6. daysOfTwoDate(Date beginDate, Date endDate)
  7. dayValue(Date date, boolean startEnd)
  8. deltaInDays(Date start, Date end)
  9. deltaMonths(Date start, Date end)