Java Day End getEndDateByDate(Date date)

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

Description

get End Date By Date

License

Apache License

Declaration

public static Date getEndDateByDate(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 getEndDateByDate(Date date) {
        Date firstDate = null;// www .j  a  v a2  s  .  co m
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.set(Calendar.HOUR_OF_DAY, 23);
        cal.set(Calendar.MINUTE, 59);
        cal.set(Calendar.SECOND, 59);
        firstDate = cal.getTime();
        return firstDate;
    }
}

Related

  1. getEndDate(Date beginDate, int resolution)
  2. getEndDate(Date date)
  3. getEndDate(Date startDate)
  4. getEndDate(int useMonth)
  5. getEndDate(String date)
  6. getEndDateByYears(Date date, int years)
  7. getEndDateForYear()
  8. getEndDateOfCurrentSemester()
  9. getEndDateOfMonth(Date given)