Java Utililty Methods Date to Minute

List of utility methods to do Date to Minute

Description

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

Method

DategetMinDateOfDay(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));
...
DategetMinHour(Date date)
get Min Hour
GregorianCalendar gc = new GregorianCalendar();
gc.setTime(date);
setMinHour(gc);
return gc.getTime();
intgetMins(Date date)
get Mins
Calendar c = Calendar.getInstance();
c.setTime(date);
return c.get(Calendar.MINUTE);
DategetMinTime(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();
DategetMinus1Day(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();
intgetMinute(Date d)
get Minute
return get(d, Calendar.MINUTE);
intgetMinute(Date d)
get Minute
if (d == null)
    return 0;
final Calendar c = new GregorianCalendar();
c.setTime(d);
return c.get(Calendar.MINUTE);
intgetMinute(Date date)
get Minute
return newCalendar(date).get(Calendar.MINUTE);
intgetMinute(Date date)
get Minute
GregorianCalendar cal = getCalender(date, false);
return cal.get(Calendar.MINUTE);
intgetMinute(java.util.Date date)
get Minute
java.util.Calendar c = java.util.Calendar.getInstance();
c.setTime(date);
return c.get(java.util.Calendar.MINUTE);