X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=time-w3c.git;a=blobdiff_plain;f=Data%2FTime%2FW3C%2FParser%2FParsec.hs;h=862430c3c44535e1f45a55da224823b99eb8d32e;hp=f73d68c24a98f93ebf419b721867bf1f1b22b04e;hb=376869bc3a4e7c2e22fb47152ba2d459b82efdd0;hpb=3d738487d6fb1077d139fd689279a1ebd27a9fdc diff --git a/Data/Time/W3C/Parser/Parsec.hs b/Data/Time/W3C/Parser/Parsec.hs index f73d68c..862430c 100644 --- a/Data/Time/W3C/Parser/Parsec.hs +++ b/Data/Time/W3C/Parser/Parsec.hs @@ -1,3 +1,4 @@ +-- | W3C Date and Time parser combinator for "Text.Parsec". module Data.Time.W3C.Parser.Parsec ( w3cDateTime ) @@ -8,7 +9,7 @@ import Data.Time import Data.Time.W3C.Types import Text.Parsec - +-- | This is a parser combinator for "Text.Parsec". w3cDateTime :: Stream s m Char => ParsecT s u m W3CDateTime w3cDateTime = read4 >>= mdhmst where @@ -117,7 +118,7 @@ read4 = do n1 <- digit' read2 :: (Stream s m Char, Num n) => ParsecT s u m n read2 = do n1 <- digit' n2 <- digit' - return (n1 + 10 + n2) + return (n1 * 10 + n2) digit' :: (Stream s m Char, Num n) => ParsecT s u m n digit' = liftM fromC digit