Java Parse RFC Date parseRFC822(String dateString)

Here you can find the source of parseRFC822(String dateString)

Description

parse RFC

License

Apache License

Declaration

public static synchronized Date parseRFC822(String dateString) throws ParseException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    protected static DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
    protected static DateFormat rfc822DateFormat = new SimpleDateFormat("EEE, dd MMM yyyy kk:mm:ss zzz");

    public static synchronized Date parseRFC822(String dateString) throws ParseException {
        return rfc822DateFormat.parse(dateString);
    }//from w w w  .  j ava2  s  . c o  m

    public static synchronized Date parse(String dateString) throws ParseException {
        return dateFormat.parse(dateString);
    }
}

Related

  1. parseRfc2822DateToString(final Date rfcDate)
  2. parseRfc3339Calendar(String value)
  3. parseRfc3339Date(String date)
  4. parseRFC3339Date(String datestring)
  5. parseRFC3339Date(String datestring)
  6. parseRFC822(String sDate, Locale locale)
  7. parseRFC822(String str)
  8. parseRfc822Date(String dateString)
  9. parseRfc822Date(String dt)