Here you can find the source of dateToCalendar(int year, int month, int day)
public static Calendar dateToCalendar(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 dateToCalendar(int year, int month, int day) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.MONTH, month - 1); cal.set(Calendar.DATE, day); cal.set(Calendar.YEAR, year); return cal; }/*from w ww . j a v a 2 s. c o m*/ }