]> gitweb @ CieloNegro.org - time-w3c.git/blobdiff - Data/Time/W3C/Types.hs
Haddock comments
[time-w3c.git] / Data / Time / W3C / Types.hs
index 3a996cba2fe60574e7cf622848dfeb065b0fd746..c270e3659035b7b823038898b2a26e6b3708e416 100644 (file)
@@ -1,3 +1,4 @@
+-- | Data types defined by this package.
 module Data.Time.W3C.Types
     ( W3CDateTime(..)
     )
@@ -9,8 +10,26 @@ import Data.Time
 import Data.Typeable
 
 
+-- |'W3CDateTime' represents a W3C Date and Time format.
+--
+-- The field 'w3cYear' is mandatory while other fields are
+-- optional. But you should be careful about combinations of such
+-- optional fields. No combinations are allowed except for the
+-- following list:
+--
+--   * YYYY
+--
+--   * YYYY-MM
+--
+--   * YYYY-MM-DD
+--
+--   * YYYY-MM-DDThh:mmTZD
+--
+--   * YYYY-MM-DDThh:mm:ss.sTZD
+--
 -- This data type is /partially ordered/ so we can't make it an
--- instance of Ord (e.g. "2010" and "2010-01" can't be compared).
+-- instance of Ord (e.g. @\"2010\"@ and @\"2010-01\"@ can't be
+-- compared).
 data W3CDateTime
     = W3CDateTime {
         w3cYear     :: !Integer