X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=time-http.git;a=blobdiff_plain;f=Data%2FTime%2FRFC1123.hs;fp=Data%2FTime%2FRFC1123.hs;h=0000000000000000000000000000000000000000;hp=fb7839d034bbc9dc7aaae2369170f00e59a568f8;hb=2064aacf48e193924b6ffe18a50853d233c16b98;hpb=901a3635d37e25a2d4c2e1562c32c68c410fbdd3 diff --git a/Data/Time/RFC1123.hs b/Data/Time/RFC1123.hs deleted file mode 100644 index fb7839d..0000000 --- a/Data/Time/RFC1123.hs +++ /dev/null @@ -1,43 +0,0 @@ -{-# LANGUAGE - UnicodeSyntax - #-} --- |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 -module Data.Time.RFC1123 - ( -- * Formatting - toAscii - , toAsciiBuilder - - -- * Parsing - , fromAscii - , rfc1123DateAndTime - ) - where -import Data.Ascii (Ascii) -import qualified Data.Ascii as A -import qualified Data.Attoparsec.Char8 as P -import Data.Time -import Data.Time.RFC1123.Internal -import Prelude.Unicode - --- |Convert a 'ZonedTime' to RFC 1123 date and time string. -toAscii ∷ ZonedTime → Ascii -toAscii = A.fromAsciiBuilder ∘ toAsciiBuilder - --- |Parse an RFC 1123 date and time string. When the string can't be --- parsed, it returns @'Left' err@. -fromAscii ∷ Ascii → Either String ZonedTime -fromAscii = P.parseOnly p ∘ A.toByteString - where - p = do zt ← rfc1123DateAndTime - P.endOfInput - return zt