Here you can find the source of getFirstTimeOfDay(int year, int month, int day)
public static Calendar getFirstTimeOfDay(int year, int month, int day)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static Calendar getFirstTimeOfDay(int year, int month, int day) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month - 1); cal.set(Calendar.DAY_OF_MONTH, day); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); return cal; }/*from ww w . ja v a 2s . com*/ }