Java Utililty Methods Calendar Hour

List of utility methods to do Calendar Hour

Description

The list of methods to do Calendar Hour are organized into topic(s).

Method

voidmoveToCalendarHourJust(Calendar cal)
move To Calendar Hour Just
clearCalendarMinuteWithRear(cal);
voidmoveToCalendarHourTerminal(Calendar cal)
move To Calendar Hour Terminal
moveToCalendarMinute(cal, cal.getActualMaximum(Calendar.MINUTE));
moveToCalendarMinuteTerminal(cal);
booleansameHour(Calendar one, Calendar two)
Returns true if the two given calendars are dated on the same year, month, day and hour.
return one.get(Calendar.HOUR_OF_DAY) == two.get(Calendar.HOUR_OF_DAY) && sameDay(one, two);
CalendarsetCalendar(int hour, int mins)
set Calendar
return setCalendar(hour, mins, 0);
voidsetDateToZeroHour(Calendar calendar)
set Date To Zero Hour
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
voidsetHourMinSecAsNull(Calendar calendar)
set Hour Min Sec As Null
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
voidsetHours(int i, Calendar calendar)
When rectify deprecation error we will need to test that making changes to Calendar actually affects the underlying date.
calendar.set(Calendar.HOUR_OF_DAY, i);
voidsetMinHour(Calendar gc)
set Min Hour
gc.set(Calendar.HOUR_OF_DAY, 0);
gc.set(Calendar.MINUTE, 0);
gc.set(Calendar.SECOND, 0);
gc.set(Calendar.MILLISECOND, 0);
voidtoMinHours(Calendar calendar)
This method sets the calendar argument to the the zero hours of the day
if (calendar != null) {
    calendar.set(Calendar.HOUR_OF_DAY, 0);
    calendar.set(Calendar.MINUTE, 0);
    calendar.set(Calendar.SECOND, 0);
    calendar.set(Calendar.MILLISECOND, 0);
CalendartruncateHour(Calendar c)
truncate Hour
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
return c;