Debian Codegraph @

Network/HTTP/Date/Types.hs

raw
1 module Network.HTTP.Date.Types (
2 HTTPDate
3 , hdYear
4 , hdMonth
5 , hdDay
6 , hdHour
7 , hdMinute
8 , hdSecond
9 , hdWkday
10 , defaultHTTPDate
11 ) where
12
13 {-|
14 Data structure for HTTP Date. This value should be specified
15 with 'defaultHTTPDate' and its field labels.
16 -}
17 data HTTPDate = HTTPDate {
18 hdYear :: !Int
19 , hdMonth :: !Int
20 , hdDay :: !Int
21 , hdHour :: !Int
22 , hdMinute :: !Int
23 , hdSecond :: !Int
24 , hdWkday :: !Int
25 } deriving (Eq, Show, Ord)
26
27 {-|
28 A default value for 'HTTPDate'.
29 -}
30 -- 1970/1/1 is Thu (4)
31 defaultHTTPDate :: HTTPDate
32 defaultHTTPDate = HTTPDate 1970 1 1 0 0 0 4