Here you can find the source of createDate(int year, int month, int date)
public static Date createDate(int year, int month, int date)
//package com.java2s; /*//w w w . j a va 2 s.c o m * Distributable under LGPL v3 license. * See terms of license at https://github.com/Yunfeng/schotel/blob/master/LICENSE */ import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Date createDate(int year, int month, int date) { GregorianCalendar calendar = new GregorianCalendar(); calendar.clear(); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.MONTH, month - 1); calendar.set(Calendar.DAY_OF_MONTH, date); return calendar.getTime(); } }