Here you can find the source of getDateAsRFC822String(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static String getDateAsRFC822String(Date date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static SimpleDateFormat RFC822DATEFORMAT = new SimpleDateFormat("EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'Z", Locale.US);//w w w . ja va 2 s . co m /** * RFC822 has strict rules how to format a date. This meets that standard * * @param date * @return */ public static String getDateAsRFC822String(Date date) { return RFC822DATEFORMAT.format(date); } }