Here you can find the source of getCalendar()
public static Calendar getCalendar()
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { /**/* ww w . ja va 2 s. c o m*/ * get GregorianCalendar. * * @return Calendar,GregorianCalendar. */ public static Calendar getCalendar() { return new GregorianCalendar(); } /** * get GregorianCalendar with given date. * * @param date Date. * @return Calendar, GregorianCalendar. */ public static Calendar getCalendar(Date date) { Calendar calendar = getCalendar(); calendar.setTime(date); return calendar; } }