Android examples for java.util:Calendar
Create calendar From Date
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Main{ public static Calendar calendarFromDate(Date d) { Calendar c = Calendar.getInstance(); c.setTime(d);/*from ww w . j a va 2 s. c om*/ return c; } }