]> gitweb @ CieloNegro.org - time-w3c.git/blobdiff - Data/Time/W3C/Parser/Parsec.hs
Haddock comments
[time-w3c.git] / Data / Time / W3C / Parser / Parsec.hs
index f73d68c24a98f93ebf419b721867bf1f1b22b04e..862430c3c44535e1f45a55da224823b99eb8d32e 100644 (file)
@@ -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