Here you can find the source of formatHttpDate(Date date)
Parameter | Description |
---|---|
date | date to format |
public static String formatHttpDate(Date date)
//package com.java2s; //License from project: Artistic License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { /** RFC1123 date format */ private static final DateFormat httpDateFormat = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss z", Locale.ENGLISH);/*from ww w. j a v a2s . c o m*/ /** * Formats given {@link Date} as RFC1123 date. * * @param date date to format */ public static String formatHttpDate(Date date) { return httpDateFormat.format(date); } }