Java Hour Format formatRFC822(Date date)

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

Description

format RFC

License

Apache License

Declaration

public static synchronized String formatRFC822(Date date) 

Method Source Code


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

import java.text.DateFormat;

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 String formatRFC822(Date date) {
        return rfc822DateFormat.format(date);
    }/*  w w  w. j  a  v a2 s . co  m*/

    public static synchronized String format(Date date) {
        return dateFormat.format(date);
    }
}

Related

  1. formatPrice(double price, String style)
  2. formatRawDateTime(int unixtime)
  3. formatRecyclingDate(String strDate)
  4. formatRFC1123(Date date)
  5. formatRfc3339Date(Date date)
  6. formatRFC822(Date date, Locale locale)
  7. formatRFC822(Date date, String timezone)
  8. formatRfc822Date(Date date)
  9. formatRuntime(long runtime)