Here you can find the source of date(int day, int month, int year)
public static Calendar date(int day, int month, int year)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static Calendar date(int day, int month, int year) { return new GregorianCalendar(year, month - 1, day); }//from ww w . j ava 2 s . c o m public static Calendar date(Calendar dateTime) { Calendar date = (Calendar) dateTime.clone(); date.set(Calendar.HOUR_OF_DAY, 0); date.set(Calendar.MINUTE, 0); date.set(Calendar.SECOND, 0); date.set(Calendar.MILLISECOND, 0); return date; } }