Here you can find the source of getCalendar()
public static Calendar getCalendar()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; public class Main { /**//from w ww . j a va 2 s . c o m * Returns a calendar instance. If a context user is given then the user's * time zone and locale will be used if given. */ public static Calendar getCalendar() { return getCalendar(null, null); } /** * Returns a calendar instance. If a context user is given then the user's * time zone and locale will be used if given. * * @param locale if given this locale will overwrite any the context user's * locale. */ public static Calendar getCalendar(final Locale locale) { return getCalendar(null, locale); } public static Calendar getCalendar(TimeZone timeZone, Locale locale) { if (locale == null) { locale = Locale.getDefault(); } if (timeZone == null) { timeZone = TimeZone.getDefault(); } return Calendar.getInstance(timeZone, locale); } }