Class Http.DateTime

  • Enclosing class:
    Http

    public static final class Http.DateTime
    extends Object
    Support for HTTP date formats based on RFC2616.
    • Field Detail

      • RFC_850_DATE_TIME

        public static final DateTimeFormatter RFC_850_DATE_TIME
        The RFC850 date-time formatter, such as 'Sunday, 06-Nov-94 08:49:37 GMT'.

        This is obsolete standard (obsoleted by RFC1036). Headers MUST NOT be generated in this format. However it should be used as a fallback for parsing to achieve compatibility with older HTTP standards.

        Since the format accepts 2 digits year representation formatter works well for dates between (now - 50 Years) and (now + 49 Years).

      • RFC_1123_DATE_TIME

        public static final DateTimeFormatter RFC_1123_DATE_TIME
        The RFC1123 date-time formatter, such as 'Tue, 3 Jun 2008 11:05:30 GMT'.

        This is standard for RFC2616 and all created headers MUST be in this format! However implementation must accept headers also in RFC850 and ANSI C asctime() format.

        This is just copy of convenient copy of DateTimeFormatter.RFC_1123_DATE_TIME.

      • ASCTIME_DATE_TIME

        public static final DateTimeFormatter ASCTIME_DATE_TIME
        The ANSI C's asctime() format, such as 'Sun Nov 6 08:49:37 1994'.

        Headers MUST NOT be generated in this format. However it should be used as a fallback for parsing to achieve compatibility with older HTTP standards.