I'd like set a java.util.Date-Objekt to its minimum or maximum time values for a Date (one day). The way I do it currently (for minimum):
Calendar cal = Calendar.getInstance(); cal.setTime(aDate); cal.set(Calendar.HOUR, 0); //... same for minutes, seconds, milliseconds But this seems a little bit cumbersome. And how do I set the maximum?