List of utility methods to do Date to Minute
Date | getMinDateOfDay(Date date) get Min Date Of Day if (date == null) { return null; } else { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(11, calendar.getActualMinimum(11)); calendar.set(12, calendar.getActualMinimum(12)); calendar.set(13, calendar.getActualMinimum(13)); ... |
Date | getMinHour(Date date) get Min Hour GregorianCalendar gc = new GregorianCalendar(); gc.setTime(date); setMinHour(gc); return gc.getTime(); |
int | getMins(Date date) get Mins Calendar c = Calendar.getInstance();
c.setTime(date);
return c.get(Calendar.MINUTE);
|
Date | getMinTime(Date date) get Min Time Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
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();
|
Date | getMinus1Day(Date date) get Minus Day if (date == null) { return null; Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.DATE, -1); return cal.getTime(); |
int | getMinute(Date d) get Minute return get(d, Calendar.MINUTE);
|
int | getMinute(Date d) get Minute if (d == null) return 0; final Calendar c = new GregorianCalendar(); c.setTime(d); return c.get(Calendar.MINUTE); |
int | getMinute(Date date) get Minute return newCalendar(date).get(Calendar.MINUTE);
|
int | getMinute(Date date) get Minute GregorianCalendar cal = getCalender(date, false);
return cal.get(Calendar.MINUTE);
|
int | getMinute(java.util.Date date) get Minute java.util.Calendar c = java.util.Calendar.getInstance();
c.setTime(date);
return c.get(java.util.Calendar.MINUTE);
|