Java Utililty Methods Calendar from Date

List of utility methods to do Calendar from Date

Description

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

Method

CalendargetCalendar(Date date)
get Calendar
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return cal;
CalendargetCalendar(Date date)
get Calendar
Calendar result = Calendar.getInstance();
result.setTime(date);
return result;
CalendargetCalendar(Date date, int firstDayOfWeek)
get Calendar
Calendar cal = GregorianCalendar.getInstance();
cal.setFirstDayOfWeek(firstDayOfWeek);
cal.setTime(date);
return cal;
CalendargetCalendar(Date date, int step)
get Calendar
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_MONTH, step);
return calendar;
CalendargetCalendar(Date dt)
get Calendar
Calendar cal = new GregorianCalendar();
cal.setTime(dt);
return cal;
CalendargetCalendar(Date dt, TimeZone to)
Get the timezone specific calendar.
Calendar cal = Calendar.getInstance(to);
cal.setTime(dt);
return cal;
CalendargetCalendar(Date inputDate)
get Calendar
if (inputDate == null)
    return null;
Calendar calendar = Calendar.getInstance();
calendar.setTime(inputDate);
return calendar;