Here you can find the source of createDate(int year, int month, int day)
Parameter | Description |
---|---|
year | the year |
month | the month |
day | the day |
public static Date createDate(int year, int month, int day)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { /** Creates the date. */*from w w w .j av a 2 s . com*/ * @param year * the year * @param month * the month * @param day * the day * @return the date */ public static Date createDate(int year, int month, int day) { Calendar cal = Calendar.getInstance(); cal.set(year, month, day, 0, 0, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTime(); } }