Java Utililty Methods Parse RFC Date

List of utility methods to do Parse RFC Date

Description

The list of methods to do Parse RFC Date are organized into topic(s).

Method

DateparseRFC822(String str)
parse RFC
for (SimpleDateFormat rfc822DateFormat : rfc822DateFormats) {
    try {
        Date theDate = rfc822DateFormat.parse(str);
        if (theDate instanceof Date)
            return theDate;
    } catch (ParseException e) {
return null;
DateparseRfc822Date(String dateString)
parse Rfc Date
return getRfc822DateFormat().parse(dateString);
DateparseRfc822Date(String dt)
parse a string formatted in RFC822 style into a date
Date rval = rfc822format.parse(dt);
return rval;
DateparseRFC822Date(String value)
parse RFC Date
for (SimpleDateFormat formatter : rfc822DateFormats) {
    try {
        Date date = formatter.parse(value);
        return date;
    } catch (ParseException e) {
        continue;
int i = value.lastIndexOf(" ");
if (i > 6) {
    value = value.substring(0, i);
    return parseRFC822Date(value);
return null;
DateparseRfc822DateTime(String datestr)
parse Rfc Date Time
return new SimpleDateFormat(RFC822_DATETIME_PATTERN).parse(datestr);