, UnicodeSyntax
#-}
-- |This module provides functions to parse and format RFC 733 date
--- and time formats.
+-- and time strings (<http://tools.ietf.org/html/rfc733#appendix-E>).
--
-- The syntax is as follows:
--
-- > | "N" ; +1
-- > | "Y" ; +12
-- > | ("+" | "-") 4DIGIT ; Local diff: HHMM
-module Data.Time.RFC733
+module Data.Time.Format.RFC733
( RFC733
, rfc733DateAndTime
)
import Data.Tagged
import Data.Time
import Data.Time.Calendar.WeekDate
-import Data.Time.RFC822.Internal
-import Data.Time.HTTP.Common
+import Data.Time.Format.HTTP.Common
+import Data.Time.Format.RFC822.Internal
import Prelude.Unicode
--- FIXME: docs
+-- |The phantom type for conversions between RFC 733 date and time
+-- strings and 'ZonedTime'.
+--
+-- >>> convertSuccess (ZonedTime (LocalTime (ModifiedJulianDay 49662) (TimeOfDay 8 49 37)) utc)
+-- Tagged "Sunday, 06-Nov-1994 08:49:37 GMT"
data RFC733
instance ConvertSuccess ZonedTime (Tagged RFC733 Ascii) where
{-# INLINE convertAttempt #-}
convertAttempt = parseAttempt' rfc733DateAndTime ∘ untag
+-- |Parse an RFC 733 date and time string.
rfc733DateAndTime ∷ Parser ZonedTime
rfc733DateAndTime = dateTime