Here you can find the source of Date2Long(int year, int month, int date)
public static long Date2Long(int year, int month, int date)
//package com.java2s; /**// w w w . java 2s .c om * Converts a line of text into an array of lower case words using a * BreakIterator.wordInstance(). * <p> * * This method is under the Jive Open Source Software License and was * written by Mark Imbriaco. * * @param text * a String of text to convert into an array of words * @return text broken up into an array of words. */ import java.util.*; public class Main { public static long Date2Long(int year, int month, int date) { Calendar cld = Calendar.getInstance(); month = month - 1; cld.set(year, month, date); return cld.getTime().getTime(); } }