Here you can find the source of parseDate(String date)
public static Date parseDate(String date)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public final static String DEFAULT_DATE_FORMAT = "yyyy-MM-dd"; public static Date parseDate(String date, String format) { if (date == null) { return null; }/* www .j a va 2 s.co m*/ try { return new SimpleDateFormat(format).parse(date); } catch (ParseException e) { throw new RuntimeException(e); } } public static Date parseDate(String date) { return parseDate(date, DEFAULT_DATE_FORMAT); } }