Here you can find the source of getFirstTimeOfDay(int year, int month, int day)
public static java.util.Calendar getFirstTimeOfDay(int year, int month, int day)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static java.util.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; }/* w w w .j ava2 s.c o m*/ }