List of utility methods to do Date Previous
Date | previousDay(Date date) previous Day Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.DAY_OF_MONTH, -1);
return cal.getTime();
|
long | previousDay(long date) Returns the day before date .
return addDays(date, -1);
|
long | previousDay(long date) Returns the day before date .
return addDays(date, -1);
|
Date | previousDayLastHour(final Date pDate) Return last time of previous day for between comparison. final Calendar c = Calendar.getInstance(); c.setTime(pDate); c.set(Calendar.HOUR_OF_DAY, c.getMaximum(Calendar.HOUR_OF_DAY)); c.set(Calendar.MINUTE, c.getMaximum(Calendar.MINUTE)); c.set(Calendar.SECOND, c.getMaximum(Calendar.SECOND)); c.set(Calendar.MILLISECOND, c.getMaximum(Calendar.MILLISECOND)); c.add(Calendar.DATE, -1); return c.getTime(); ... |