Java Date RFC Format rfc822Date(Date date)

Here you can find the source of rfc822Date(Date date)

Description

rfc Date

License

Open Source License

Declaration

public static String rfc822Date(Date date) 

Method Source Code

//package com.java2s;

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

import java.util.Locale;

import java.util.TimeZone;

public class Main {
    public static String rfc822Date(Date date) {
        // Convert the expiration date to rfc822 format.
        final String DateFormat = "EEE, dd MMM yyyy HH:mm:ss ";
        SimpleDateFormat format;/*w  w  w .  j a  v a 2s . co m*/

        format = new SimpleDateFormat(DateFormat, Locale.US);
        format.setTimeZone(TimeZone.getTimeZone("GMT"));
        return format.format(date) + "GMT";
    }
}

Related

  1. resolvedDateRFC822(String pString)
  2. rfc1123Date(Date d)
  3. rfc1123Format(Date date)
  4. rfc2822(Date date)
  5. rfc822(Date date)
  6. rfc822Date(final Date val)
  7. RFC822Section5Format_to_Date(String time)
  8. toRfc822(Calendar cal)
  9. toRFC822Date(Date date)