List of utility methods to do Calendar from Date
Calendar | getCalendar(Date date) get Calendar Calendar cal = Calendar.getInstance();
cal.setTime(date);
return cal;
|
Calendar | getCalendar(Date date) get Calendar Calendar result = Calendar.getInstance();
result.setTime(date);
return result;
|
Calendar | getCalendar(Date date, int firstDayOfWeek) get Calendar Calendar cal = GregorianCalendar.getInstance();
cal.setFirstDayOfWeek(firstDayOfWeek);
cal.setTime(date);
return cal;
|
Calendar | getCalendar(Date date, int step) get Calendar Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_MONTH, step);
return calendar;
|
Calendar | getCalendar(Date dt) get Calendar Calendar cal = new GregorianCalendar(); cal.setTime(dt); return cal; |
Calendar | getCalendar(Date dt, TimeZone to) Get the timezone specific calendar. Calendar cal = Calendar.getInstance(to);
cal.setTime(dt);
return cal;
|
Calendar | getCalendar(Date inputDate) get Calendar if (inputDate == null) return null; Calendar calendar = Calendar.getInstance(); calendar.setTime(inputDate); return calendar; |