time-http-0.2: Parse and format HTTP/1.1 Date and Time strings

Data.Time.RFC1123

Contents

Description

This module provides functions to parse and format RFC 1123 date and time formats.

The format is basically same as RFC 822, but the syntax for date is changed from:

 year ::= 2DIGIT

to:

 year ::= 4DIGIT

Synopsis

Formatting

toAscii :: ZonedTime -> AsciiSource

Convert a ZonedTime to RFC 1123 date and time string.

toAsciiBuilder :: ZonedTime -> AsciiBuilderSource

Convert a ZonedTime to RFC 1123 date and time string.

Parsing

fromAscii :: Ascii -> Either String ZonedTimeSource

Parse an RFC 1123 date and time string. When the string can't be parsed, it returns Left err.

rfc1123DateAndTime :: Parser ZonedTimeSource

Parse an RFC 1123 date and time string.