Android Utililty Methods Calendar Add

List of utility methods to do Calendar Add

Description

The list of methods to do Calendar Add are organized into topic(s).

Method

Calendaryesterday(Calendar c)
yesterday
long offset = 1 * 24 * 60 * 60 * 1000;
Calendar calendar = null;
if (c != null) {
    calendar = c;
} else {
    calendar = Calendar.getInstance();
calendar.setTimeInMillis(calendar.getTimeInMillis() - offset);
...
longaddToCurrent(int type, int i)
add To Current
Calendar calendar = Calendar.getInstance();
calendar.add(type, i);
return calendar.getTimeInMillis();
DaterollGetDate(Calendar calendar, int days)
roll Get Date
Calendar calCopy = (Calendar) calendar.clone();
calCopy.add(DATE, days);
return calCopy.getTime();