]> gitweb @ CieloNegro.org - time-http.git/blobdiff - Data/Time/RFC822.hs
RFC822.Internal
[time-http.git] / Data / Time / RFC822.hs
index 152d99290f57e89915e72eaf80efd36e72c22e1e..b246e696cbc7589a7e524517664690a548b1fa2f 100644 (file)
@@ -1,6 +1,3 @@
-{-# LANGUAGE
-    UnicodeSyntax
-  #-}
 -- |This module provides functions to parse and format RFC 822 date
 -- and time formats.
 --
 -- >               | "Y"                ; +12
 -- >               | ("+" | "-") 4DIGIT ; Local diff: HHMM
 module Data.Time.RFC822
-    ( -- * Formatting
-      toAscii
-    , toAsciiBuilder
-
-      -- * Parsing
-    , fromAscii
+    ( RFC822
     , rfc822DateAndTime
     )
     where
-import Data.Ascii (Ascii)
-import qualified Data.Ascii as A
-import qualified Data.Attoparsec.Char8 as P
-import Data.Time
 import Data.Time.RFC822.Internal
-import Prelude.Unicode
-
--- |Convert a 'ZonedTime' to RFC 822 date and time string.
-toAscii ∷ ZonedTime → Ascii
-toAscii = A.fromAsciiBuilder ∘ toAsciiBuilder
-
--- |Parse an RFC 822 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 ← rfc822DateAndTime
-             P.endOfInput
-             return zt