]> gitweb @ CieloNegro.org - time-http.git/blobdiff - Data/Time/Asctime/Internal.hs
Tests for Data.Time.Asctime
[time-http.git] / Data / Time / Asctime / Internal.hs
index 910fd5d6019f2520c840e1e437954d0b53a93900..1681fc0d281752af5a66775c159fa6923230baa5 100644 (file)
@@ -2,6 +2,7 @@
     OverloadedStrings
   , UnicodeSyntax
   #-}
+-- |Internal functions for "Data.Time.Asctime".
 module Data.Time.Asctime.Internal
     ( asctime
     , toAsciiBuilder
@@ -18,10 +19,10 @@ import Data.Time.HTTP.Common
 -- |Parse an ANSI C's @asctime()@ string.
 asctime ∷ Parser LocalTime
 asctime = do weekDay ← shortWeekDayNameP
-             _       ← string ", "
+             _       ← char ' '
              month   ← shortMonthNameP
              _       ← char ' '
-             day     ← read2
+             day     ← read2'
              _       ← char ' '
              hour    ← read2
              _       ← char ':'
@@ -45,10 +46,10 @@ toAsciiBuilder localTime
           timeOfDay          = localTimeOfDay localTime
       in
         shortWeekDayName week
-        ⊕ A.toAsciiBuilder " "
+        ⊕ A.toAsciiBuilder " "
         ⊕ shortMonthName month
         ⊕ A.toAsciiBuilder " "
-        ⊕ show2 day
+        ⊕ show2' day
         ⊕ A.toAsciiBuilder " "
         ⊕ show2 (todHour timeOfDay)
         ⊕ A.toAsciiBuilder ":"