Here you can find the source of forMateDate(String dateStr)
public static Date forMateDate(String dateStr)
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static Date forMateDate(String dateStr) { Date date = null;/* www .j av a 2 s .c om*/ try { String pattern = "EEE, dd MMM yyyy HH:mm:ss z"; SimpleDateFormat format = new SimpleDateFormat(pattern, Locale.US); date = format.parse(dateStr); return date; } catch (Exception e) { e.printStackTrace(); } return date; } public static Date parse(String strDate, String format) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.parse(strDate); } }