Here you can find the source of createDate(int year, int month, int day)
public static long createDate(int year, int month, int day)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static long createDate(int year, int month, int day) { return createDate(year, month, day, 0, 0, 0); }//from w ww. j a v a 2 s .com public static long createDate(int year, int month, int day, int hour, int minute, int second) { Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(year, Calendar.JANUARY + month - 1, day, hour, minute, second); return cal.getTimeInMillis(); } }