Java Utililty Methods Day Time

List of utility methods to do Day Time

Description

The list of methods to do Day Time are organized into topic(s).

Method

DatesetToDayStartTime(Date date)
set To Day Start Time
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(date.getTime());
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
DatebeginOfTheDay(Date date)
begin Of The Day
Calendar c = new GregorianCalendar();
c.setTime(date);
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
return c.getTime();