Here you can find the source of setHourMinuteSecondToZeroPlus24Hours(Date datetime)
Parameter | Description |
---|---|
datetime | the datetime |
public static Date setHourMinuteSecondToZeroPlus24Hours(Date datetime)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { /**/* ww w .ja v a2s . com*/ * Sets the hour minute second to zero plus24 hours. * * @param datetime * the datetime * * @return the date */ public static Date setHourMinuteSecondToZeroPlus24Hours(Date datetime) { final Calendar calendar = Calendar.getInstance(); calendar.setTime(datetime); calendar.set(Calendar.HOUR, 23); calendar.set(Calendar.MINUTE, 59); calendar.set(Calendar.SECOND, 59); calendar.set(Calendar.MILLISECOND, 0); calendar.set(Calendar.AM_PM, 0); return calendar.getTime(); } }