Java Date RFC Format makeDateRFC2822(Date date)

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

Description

make Date RFC

License

Apache License

Declaration

public static String makeDateRFC2822(Date date) 

Method Source Code

//package com.java2s;
/**/*  www. ja v  a2s. co  m*/
 * $Id$
 * $URL$
 * DateUtils.java - genericdao - Sep 16, 2008 11:03:28 PM - azeckoski
 **************************************************************************
 * Copyright (c) 2008 Aaron Zeckoski
 * Licensed under the Apache License, Version 2.0
 * 
 * A copy of the Apache License has been included in this 
 * distribution and is available at: http://www.apache.org/licenses/LICENSE-2.0.txt
 *
 * Aaron Zeckoski (azeckoski @ gmail.com) (aaronz @ vt.edu) (aaron @ caret.cam.ac.uk)
 */

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

public class Main {
    public static String makeDateRFC2822(Date date) {
        SimpleDateFormat df = new SimpleDateFormat("EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'Z", Locale.US);
        return df.format(date);
    }
}

Related

  1. getRFC822Date()
  2. getRfc822DateFormat()
  3. getRfc822DateFormat()
  4. getRfc822DateStringGMT(Date date)
  5. getRFC822String(Date date)
  6. renderDateAsRFC822String(Date date)
  7. resolvedDateRFC822(String pString)
  8. rfc1123Date(Date d)
  9. rfc1123Format(Date date)