Here you can find the source of parseDate(String date)
public static long parseDate(String date)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { public static final String DATE_FORMAT = "yyyy-MM-dd"; public static long parseDate(String date) { return parse(DATE_FORMAT, date); }/*from w w w . j ava 2 s.c o m*/ public static long parse(String pattern, String date) { final SimpleDateFormat sdf = new SimpleDateFormat(pattern); try { return sdf.parse(date).getTime(); } catch (ParseException e) { e.printStackTrace(); } return 0; } }