Here you can find the source of getCalendar(Date date)
public static Calendar getCalendar(Date date)
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Calendar getCalendar(Date date) { if (date == null) return null; Calendar c = new GregorianCalendar(); c.setTime(date);/*from w w w . j a v a2s .c om*/ return c; } }