Here you can find the source of setDate(Calendar cal, int month, int date)
static void setDate(Calendar cal, int month, int date)
//package com.java2s; //License from project: LGPL import java.util.Calendar; public class Main { static void setDate(Calendar cal, int month, int date) { cal.clear();/*from w w w .j ava2 s . c om*/ cal.set(Calendar.YEAR, Calendar.getInstance().get(Calendar.YEAR)); cal.set(Calendar.MONTH, month); cal.set(Calendar.DATE, date); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); } }