Here you can find the source of getCalendar(long millis)
public static Calendar getCalendar(long millis)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**//from w ww . j a v a2 s . com * @since 2008-01-02 */ public static Calendar getCalendar(long millis) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(millis); return c; } /** * @since 2008-01-02 */ public static Calendar getCalendar(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); return c; } }