Here you can find the source of parseDate(String s)
public static Date parseDate(String s)
//package com.java2s; // modify it under the terms of the GNU General Public License import java.text.DateFormat; import java.text.ParseException; import java.util.Date; public class Main { private static DateFormat DATE_FORMAT = DateFormat.getDateInstance(); public static Date parseDate(String s) { try {/*from w w w . j a v a2 s . c o m*/ return DATE_FORMAT.parse(s); } catch (ParseException e) { } try { if (s != null && s.startsWith("@")) return new Date(Long.parseLong(s.substring(1))); } catch (IllegalArgumentException iae) { } return null; } }