Here you can find the source of toCalendar(final Date date, final Locale locale)
public static Calendar toCalendar(final Date date, final Locale locale)
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { public static Calendar toCalendar(final Date date, final Locale locale) { if (date == null) { return null; }//from ww w . j av a2s. c o m Calendar cal; if (locale == null) { cal = Calendar.getInstance(); } else { cal = Calendar.getInstance(locale); } cal.setTime(date); // HACK: Force all fields to update. see link for explanation of this. //http://java.sun.com/j2se/1.4/docs/api/java/util/Calendar.html cal.getTime(); return cal; } }