-- > year ::= 4DIGIT
module Data.Time.Format.RFC1123
( RFC1123
+ , rfc1123
, rfc1123DateAndTime
)
where
import Data.Attoparsec.Char8
import Data.Convertible.Base
import Data.Monoid.Unicode
+import Data.Proxy
import Data.Tagged
import Data.Time
import Data.Time.Calendar.WeekDate
-- Tagged "Sun, 06 Nov 1994 08:49:37 GMT"
data RFC1123
+-- |The proxy for conversions between RFC 1123 date and time strings
+-- and 'ZonedTime'.
+rfc1123 ∷ Proxy RFC1123
+{-# INLINE CONLIKE rfc1123 #-}
+rfc1123 = Proxy
+
instance ConvertSuccess ZonedTime (Tagged RFC1123 Ascii) where
{-# INLINE convertSuccess #-}
convertSuccess = (A.fromAsciiBuilder <$>) ∘ cs