List of utility methods to do Calendar Month
void | setDate(Calendar calendar, int month, int date) Sets the given Calendar 's instance to a specific date. calendar.clear(); calendar.set(Calendar.YEAR, Calendar.getInstance().get(Calendar.YEAR)); calendar.set(Calendar.MONTH, month); calendar.set(Calendar.DATE, date); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); ... |
void | setTimeAsFirstDayOfMonth(Calendar calendar) set Time As First Day Of Month calendar.set(Calendar.DAY_OF_MONTH, FIRST_DAY_OF_MONTH); normalise(calendar); |
Calendar | subtractMonths(Calendar date, int months) Subtracts a given number of months from a date. date.add(Calendar.MONTH, (int) months * -1); return date; |