httpDateTime :: Parser UTCTime
-httpDateTime = do foldl (<|>) failP (map string weekStr)
- char ','
- char ' '
+httpDateTime = do _ <- foldl (<|>) failP (map string weekStr)
+ _ <- char ','
+ _ <- char ' '
day <- liftM read (count 2 digit)
- char ' '
+ _ <- char ' '
mon <- foldl (<|>) failP (map tryEqToFst (zip monthStr [1..]))
- char ' '
+ _ <- char ' '
year <- liftM read (count 4 digit)
- char ' '
+ _ <- char ' '
hour <- liftM read (count 2 digit)
- char ':'
+ _ <- char ':'
min <- liftM read (count 2 digit)
- char ':'
+ _ <- char ':'
sec <- liftM read (count 2 digit) :: Parser Int
- char ' '
- string "GMT"
+ _ <- char ' '
+ _ <- string "GMT"
eof
let julianDay = fromGregorian year mon day
timeOfDay = TimeOfDay hour min (fromIntegral sec)