Here you can find the source of date(int year, int month, int day)
public static Calendar date(int year, int month, int day)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static Calendar date(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.MONTH, month); calendar.set(Calendar.DAY_OF_MONTH, day); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; }/* w w w. java 2 s. c o m*/ }