]> gitweb @ CieloNegro.org - time-w3c.git/blobdiff - Data/Time/W3C/Format.hs
Haddock comments
[time-w3c.git] / Data / Time / W3C / Format.hs
index d83d8c3897eee78aa2d7a7a1b05561dd5db10543..928032b0249893f1c0967f4f2d7ffaf7f73252bf 100644 (file)
@@ -1,3 +1,4 @@
+-- | Format W3C Date and Time strings.
 module Data.Time.W3C.Format
     ( format
     )
@@ -9,6 +10,9 @@ import Data.Time
 import Data.Time.W3C.Types
 
 
+-- | Format W3C Date and Time string from anything convertible to
+-- 'W3CDateTime' type. The most obvious acceptable type is the
+-- 'W3CDateTime' itself.
 format :: Convertible t W3CDateTime => t -> String
 format = format' . convert
     where
@@ -47,7 +51,7 @@ format = format' . convert
                    , ":"
                    , case properFraction second :: (Int, Pico) of
                        (int, 0   ) -> show2 int
-                       (int, frac) -> show2 int ++ tail (show frac)
+                       (int, frac) -> show2 int ++ tail (showFixed True frac)
                    , showTZ tz
                    ]