Here you can find the source of resolvedDateRFC822(String pString)
public static Date resolvedDateRFC822(String pString) throws ParseException
//package com.java2s; //License from project: LGPL import java.text.*; import java.util.Date; public class Main { static DateFormat formatter; public static Date resolvedDateRFC822(String pString) throws ParseException { Date lDate = null;/*from w ww .j av a 2 s .c om*/ String[] lDateFormats = { "EEE, dd MMM yyyy kk:mm:ss z", "EEE, MMM dd yyyy kk:mm:ss z" }; if (pString != null && !"".equals(pString)) { SimpleDateFormat simpleFormatter = (SimpleDateFormat) formatter; for (int i = 0; i < lDateFormats.length; i++) { String lFormat = lDateFormats[i]; simpleFormatter.applyPattern(lFormat); try { lDate = simpleFormatter.parse(pString); break; } catch (ParseException pe) { // keep trying. } } if (lDate == null) { throw new ParseException("Not RFC 822 parsebale date format", 0); } } else { throw new IllegalArgumentException(); } return lDate; } }