Here you can find the source of parseDate(String dateStr)
public static long parseDate(String dateStr) throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { private static SimpleDateFormat simpleDateFormats[]; public static long parseDate(String dateStr) throws ParseException { ParseException pe = null; for (SimpleDateFormat simpleDateFormat : simpleDateFormats) { try { return simpleDateFormat.parse(dateStr).getTime(); } catch (ParseException e) { pe = e;//from w ww . j a v a2 s . co m } } throw pe; } }