X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=time-w3c.git;a=blobdiff_plain;f=Data%2FTime%2FW3C%2FFormat.hs;h=928032b0249893f1c0967f4f2d7ffaf7f73252bf;hp=d83d8c3897eee78aa2d7a7a1b05561dd5db10543;hb=376869bc3a4e7c2e22fb47152ba2d459b82efdd0;hpb=fb743c0b822f29bac00c39e762ddd57dc65ee28f diff --git a/Data/Time/W3C/Format.hs b/Data/Time/W3C/Format.hs index d83d8c3..928032b 100644 --- a/Data/Time/W3C/Format.hs +++ b/Data/Time/W3C/Format.hs @@ -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 ]