Here you can find the source of parseDate(String date)
public static Date parseDate(String date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final String DATE_FORMAT = "yyyy-MM-dd"; public static Date parseDate(String date) { return parseDate(date, DATE_FORMAT); }/*www . j a va 2 s . co m*/ public static Date parseDate(String dateString, String dateFormat) { try { return new SimpleDateFormat(dateFormat).parse(dateString); } catch (Exception e) { return null; } } }