Here you can find the source of getTimeByYMD(int year, int month, int day)
public static Date getTimeByYMD(int year, int month, int day)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getTimeByYMD(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day); return calendar.getTime(); }/* w w w . j a v a2 s .co m*/ }