Here you can find the source of getHttpDateString(Date date)
Parameter | Description |
---|---|
date | the Date to format. |
public static String getHttpDateString(Date date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final SimpleDateFormat HTTP_DATE_FORMAT = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss"); /**/* www. j a va2 s.com*/ * Formats a Date according to the HTTP specification standard date format. * * @param date the Date to format. * @return a formatted string. */ public static String getHttpDateString(Date date) { return HTTP_DATE_FORMAT.format(date) + " GMT"; } }