View Javadoc
1   package org.esigate.http;
2   
3   import java.util.Date;
4   
5   public final class DateUtils {
6   
7       private DateUtils() {
8       }
9   
10      /**
11       * Formats the given date according to the RFC 1123 pattern.
12       * 
13       * @param date
14       *            The date to format.
15       * @return An RFC 1123 formatted date string.
16       * 
17       */
18      public static String formatDate(Date date) {
19          return org.apache.http.client.utils.DateUtils.formatDate(date);
20      }
21  
22      /**
23       * Formats the given date according to the RFC 1123 pattern.
24       * 
25       * @param date
26       *            The date to format.
27       * @return An RFC 1123 formatted date string.
28       * 
29       */
30      public static String formatDate(long date) {
31          return org.apache.http.client.utils.DateUtils.formatDate(new Date(date));
32      }
33  
34  }