Here you can find the source of toCalender(final Date aDate)
public static Calendar toCalender(final Date aDate)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.util.Calendar; import java.util.Date; public class Main { public static Calendar toCalender(final Date aDate) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(aDate.getTime()); return c; }//from w w w . j av a 2s . co m public static Calendar toCalender(final java.sql.Date aDate) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(aDate.getTime()); return c; } public static Calendar toCalender(final Timestamp aTimestamp) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(aTimestamp.getTime()); return c; } }