Here you can find the source of parseDT(String fmt, String timeline)
public static Date parseDT(String fmt, String timeline) throws ParseException
//package com.java2s; //License from project: LGPL import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Map; public class Main { public static final String FMT_DEFAULT = "yyyy-MM-dd HH:mm:ss"; private static final Map<String, SimpleDateFormat> MAP = new HashMap<String, SimpleDateFormat>(6); public static Date parseDT(String timeline) throws ParseException { return getFmt(FMT_DEFAULT).parse(timeline); }/* ww w.j a va 2 s .c om*/ public static Date parseDT(String fmt, String timeline) throws ParseException { return getFmt(fmt).parse(timeline); } public static DateFormat getFmt(String fmt) { return MAP.get(fmt); } }