Here you can find the source of parseDate(String str)
static Long parseDate(String str)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; public class Main { private static final DateFormat dateDirNameFormatter__ = new SimpleDateFormat("yyyyMMdd"); static Long parseDate(String str) { try {/*from www. j ava2 s . com*/ synchronized (dateDirNameFormatter__) { return new Long(dateDirNameFormatter__.parse(str).getTime()); } } catch (ParseException pe) { return null; } } }