Java Utililty Methods Calendar Minute

List of utility methods to do Calendar Minute

Description

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

Method

voidminuteFloor(Calendar calendar)
minute Floor
secondFloor(calendar);
calendar.set(Calendar.SECOND, 0);
CalendarroundByMinutes(Calendar cal, int interval)
round By Minutes
int minutes = cal.get(Calendar.MINUTE);
int delta = 0;
if (minutes < interval) {
    delta = interval - minutes;
} else {
    delta = interval - (minutes % interval);
if (delta == interval) {
...
CalendarsetCalendarHourMinSec(final Calendar originalCalendar, final int hourOfDay, final int minute, final int second)
Set the calendar hour, minute and second value.
Calendar calendar = Calendar.getInstance();
calendar.set(originalCalendar.get(Calendar.YEAR), originalCalendar.get(Calendar.MONTH),
        originalCalendar.get(Calendar.DAY_OF_MONTH), hourOfDay, minute, second);
return calendar;
CalendarsetCalendarTime(Calendar calendar, int hour, int minute, int second, int millis)
set Calendar Time
calendar.set(Calendar.HOUR_OF_DAY, hour);
calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, second);
calendar.set(Calendar.MILLISECOND, millis);
return calendar;
voidsetMinutes(int i, Calendar calendar)
set Minutes
calendar.set(Calendar.MINUTE, i);
voidsetTime(Calendar calendar, int hourOfDay, int minute, int second, int millisecond)
Sets hour, minutes, seconds and milliseconds to the given values.
calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, second);
calendar.set(Calendar.MILLISECOND, millisecond);
voidsetToTime(Calendar calendar, int hours, int minutes)
set To Time
calendar.set(Calendar.HOUR_OF_DAY, hours);
calendar.set(Calendar.MINUTE, minutes);