List of utility methods to do Day Add
Date | addDayOfMonth(Date date) add Day Of Month Calendar calendar = calendarDate(date);
calendar.add(Calendar.DAY_OF_MONTH, 1);
return calendar.getTime();
|
Date | addDayOfMonth(Date date, int difference) add Day Of Month Calendar calendar = calendarDate(date);
calendar.add(Calendar.DAY_OF_MONTH, difference);
return calendar.getTime();
|
long | addDay(long dateTimeMillis) add Day Calendar calendar = new GregorianCalendar(); calendar.setTimeInMillis(dateTimeMillis); calendar.add(Calendar.DATE, 1); return calendar.getTimeInMillis(); |
long | addDay(long dateTimeMillis) add Day Calendar calendar = new GregorianCalendar(); calendar.setTimeInMillis(dateTimeMillis); calendar.add(Calendar.DATE, 1); return calendar.getTimeInMillis(); |
void | decrementOneDay(Time t) decrement One Day if (t.monthDay > 1) { t.monthDay--; return; if (t.month > 0) { t.month--; } else { t.year--; ... |
Calendar | beforeNDays(Calendar c, int n) before N Days long offset = n * 24 * 60 * 60 * 1000; Calendar calendar = null; if (c != null) { calendar = c; } else { calendar = Calendar.getInstance(); calendar.setTimeInMillis(calendar.getTimeInMillis() - offset); ... |
Date | addDays(Date date, int days) Add days to an existent date Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.DATE, days);
return cal.getTime();
|