List of utility methods to do Calendar Minute
void | minuteFloor(Calendar calendar) minute Floor secondFloor(calendar); calendar.set(Calendar.SECOND, 0); |
Calendar | roundByMinutes(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) { ... |
Calendar | setCalendarHourMinSec(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;
|
Calendar | setCalendarTime(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;
|
void | setMinutes(int i, Calendar calendar) set Minutes calendar.set(Calendar.MINUTE, i); |
void | setTime(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); |
void | setToTime(Calendar calendar, int hours, int minutes) set To Time calendar.set(Calendar.HOUR_OF_DAY, hours); calendar.set(Calendar.MINUTE, minutes); |