X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=time-http.git;a=blobdiff_plain;f=Data%2FTime%2FRFC733%2FParsec.hs;h=f266193a66a01fe63f470c51c2311a33bc00de35;hp=996c94e51ee803fcbafaa56258b5192a6e140b9f;hb=42ffc2dd3bba56145796d381e2570739c32d7d74;hpb=269a28dfe8b08af854f7217bbe9c141c9c18f1ec diff --git a/Data/Time/RFC733/Parsec.hs b/Data/Time/RFC733/Parsec.hs index 996c94e..f266193 100644 --- a/Data/Time/RFC733/Parsec.hs +++ b/Data/Time/RFC733/Parsec.hs @@ -11,7 +11,7 @@ import Data.Time.Calendar.WeekDate import Data.Time.HTTP.Common import Text.Parsec - +-- |This is a parsec parser for RFC 733 date and time strings. rfc733DateAndTime :: Stream s m Char => ParsecT s u m ZonedTime rfc733DateAndTime = dateTime @@ -44,11 +44,11 @@ date = do day <- read2 <|> liftM (+ 1900) read2 _ <- char ' ' - assertGregorianDateIsGood (toInteger year) month day + assertGregorianDateIsGood year month day time :: Stream s m Char => ParsecT s u m (TimeOfDay, TimeZone) time = do tod <- hour - _ <- char ' ' + _ <- char '-' <|> char ' ' tz <- zone return (tod, tz)