Here you can find the source of convert(Date date)
private static Calendar convert(Date date)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { private static Calendar convert(Date date) { Calendar calendar = new GregorianCalendar(); calendar.setTime(date);//from w w w . ja v a2s . c o m return calendar; } }