Here you can find the source of setEndDay(Date date)
public static Date setEndDay(Date date)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { public static Date setEndDay(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date);//from w w w.j av a 2 s .c om calendar.set(Calendar.HOUR_OF_DAY, 23); calendar.set(Calendar.MINUTE, 59); calendar.set(Calendar.SECOND, 59); return calendar.getTime(); } }