List of utility methods to do Date to Minute
int | getMinuteOfHour(final Date date) Get the minute within the hour by given date. E.g.: at 10:04:15.250 PM the MINUTE is 4. return getNumberOfGranularity(Calendar.MINUTE, date);
|
int | getMinutes(Date d) get Minutes Calendar c = getCalendar();
c.setTime(d);
return (c.get(Calendar.MINUTE));
|
int | getMinutes(Date time) Returns the minutes from midnight for the specified time. Calendar calendar = Calendar.getInstance(); calendar.setTime(time); int hour = calendar.get(Calendar.HOUR_OF_DAY); int mins = calendar.get(Calendar.MINUTE); return (hour * 60) + mins; |
int | getMinutes(final Date date) The Method from the Date.getMinutes is deprecated. final Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return calendar.get(Calendar.MINUTE); |
int | getMinutesInDay(Date d) get Minutes In Day c1.setTime(d);
return c1.get(Calendar.HOUR_OF_DAY) * 60 + c1.get(Calendar.MINUTE);
|
int | getMinutesOfHour(Date dt) Get and return the minutes of the hour from the given Date dt Calendar cal = new GregorianCalendar(); cal.setTime(dt); return (cal.get(Calendar.MINUTE)); |
int | minute(Date date) minute return dateField(date, Calendar.MINUTE);
|
int | minute(final Date date) minute return fromDateToCalendar(date).get(MINUTE);
|
Date | minuteAdd(Date date, int val) minute Add Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.add(Calendar.MINUTE, val); date = calendar.getTime(); return date; |
Date | minuteDate(Date date, int num) minute Date Calendar now = Calendar.getInstance(); now.setTime(date); int year = now.get(Calendar.YEAR); int month = now.get(Calendar.MONTH); int day = now.get(Calendar.DAY_OF_MONTH); now.set(year, month, day); now.add(Calendar.MINUTE, num); return now.getTime(); ... |