-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | HTTP Date parser/formatter
--   
--   Fast parser and formatter for HTTP Date
@package http-date
@version 0.0.6.1


-- | Fast parser and formatter for HTTP Date.
module Network.HTTP.Date

-- | Data structure for HTTP Date. This value should be specified with
--   <a>defaultHTTPDate</a> and its field labels.
data HTTPDate
hdYear :: HTTPDate -> Int
hdMonth :: HTTPDate -> Int
hdDay :: HTTPDate -> Int
hdHour :: HTTPDate -> Int
hdMinute :: HTTPDate -> Int
hdSecond :: HTTPDate -> Int
hdWkday :: HTTPDate -> Int

-- | A default value for <a>HTTPDate</a>.
defaultHTTPDate :: HTTPDate

-- | Parsing HTTP Date. Currently only RFC1123 style is supported.
--   
--   <pre>
--   &gt;&gt;&gt; parseHTTPDate "Tue, 15 Nov 1994 08:12:31 GMT"
--   Just (HTTPDate {hdYear = 1994, hdMonth = 11, hdDay = 15, hdHour = 8, hdMinute = 12, hdSecond = 31, hdWkday = 2})
--   </pre>
parseHTTPDate :: ByteString -> Maybe HTTPDate

-- | Generating HTTP Date in RFC1123 style.
--   
--   <pre>
--   &gt;&gt;&gt; formatHTTPDate defaultHTTPDate {hdYear = 1994, hdMonth = 11, hdDay = 15, hdHour = 8, hdMinute = 12, hdSecond = 31, hdWkday = 2}
--   "Tue, 15 Nov 1994 08:12:31 GMT"
--   </pre>
formatHTTPDate :: HTTPDate -> ByteString

-- | Translating <a>EpochTime</a> to <a>HTTPDate</a>.
epochTimeToHTTPDate :: EpochTime -> HTTPDate
