Here you can find the source of createCalendar(final int year, final int month, final int dayOfMonth, final TimeZone timeZone)
public static Calendar createCalendar(final int year, final int month, final int dayOfMonth, final TimeZone timeZone)
//package com.java2s; // ProjectForge is dual-licensed. import java.util.Calendar; import java.util.TimeZone; public class Main { public static Calendar createCalendar(final int year, final int month, final int dayOfMonth, final TimeZone timeZone) { return createCalendar(year, month, dayOfMonth, 0, 0, timeZone); }//from ww w .java 2 s . c o m public static Calendar createCalendar(final int year, final int month, final int dayOfMonth, final int hourOfDay, final int minute, final TimeZone timeZone) { return createCalendar(year, month, dayOfMonth, hourOfDay, minute, 0, timeZone); } public static Calendar createCalendar(final int year, final int month, final int dayOfMonth, final int hourOfDay, final int minute, final int second, final TimeZone timeZone) { return createCalendar(year, month, dayOfMonth, hourOfDay, minute, second, 0, timeZone); } public static Calendar createCalendar(final int year, final int month, final int dayOfMonth, final int hourOfDay, final int minute, final int second, final int millisecond, final TimeZone timeZone) { final Calendar cal = Calendar.getInstance(timeZone); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month); cal.set(Calendar.DAY_OF_MONTH, dayOfMonth); cal.set(Calendar.HOUR_OF_DAY, hourOfDay); cal.set(Calendar.MINUTE, minute); cal.set(Calendar.SECOND, second); cal.set(Calendar.MILLISECOND, millisecond); return cal; } }