-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | XML Schema data structures -- -- XML Schema data structures (XSD) @package xsd @version 0.4.0 -- | XSD dateTime data structure -- http://www.w3.org/TR/xmlschema-2/#dateTime module Text.XML.XSD.DateTime -- | XSD dateTime data structure -- http://www.w3.org/TR/xmlschema-2/#dateTime. Briefly, a -- dateTime uses the Gregorian calendar and may or may not have -- an associated timezone. If it has a timezone, then the canonical -- representation of that date time is in UTC. -- -- Note, it is not possible to establish a total order on -- dateTime since non-timezoned are considered to belong to some -- unspecified timezone. data DateTime DtZoned :: UTCTime -> DateTime DtUnzoned :: LocalTime -> DateTime -- | Whether the given dateTime is timezoned. isZoned :: DateTime -> Bool -- | Whether the given dateTime is non-timezoned. isUnzoned :: DateTime -> Bool -- | Parses the string into a dateTime or may fail with a parse -- error. dateTime' :: Text -> Either String DateTime -- | Parses the string into a dateTime or may fail. dateTime :: Text -> Maybe DateTime toText :: DateTime -> Text -- | Converts a zoned time to a dateTime. fromZonedTime :: ZonedTime -> DateTime -- | Attempts to convert a dateTime to a UTC time. The attempt -- fails if the given dateTime is non-timezoned. toUTCTime :: DateTime -> Maybe UTCTime -- | Converts a UTC time to a timezoned dateTime. fromUTCTime :: UTCTime -> DateTime -- | Attempts to convert a dateTime to a local time. The attempt -- fails if the given dateTime is timezoned. toLocalTime :: DateTime -> Maybe LocalTime -- | Converts a local time to an non-timezoned dateTime. fromLocalTime :: LocalTime -> DateTime -- | Parses the string in a dateTime then converts to a UTC time -- and may fail with a parse error. utcTime' :: Text -> Either String UTCTime -- | Parses the string in a dateTime then converts to a UTC time -- and may fail. utcTime :: Text -> Maybe UTCTime -- | Parses the string in a dateTime then converts to a local time -- and may fail with a parse error. localTime' :: Text -> Either String LocalTime -- | Parses the string in a dateTime then converts to a local time -- time and may fail. localTime :: Text -> Maybe LocalTime instance Eq DateTime instance Read DateTime instance Show DateTime module Text.XML.XSD data E18 type Atto = Fixed E18 boolean :: Text -> Either String Bool toBoolean :: Bool -> Text decimal :: Text -> Either String Atto integer :: Integral a => Text -> Either String a toSigned :: Integral a => a -> Text long :: Text -> Either String Int64 int :: Text -> Either String Int32 short :: Text -> Either String Int16 byte :: Text -> Either String Int8 -- | What XSD calls nonNegativeInteger. unsignedInteger :: Integral a => Text -> Either String a unsignedLong :: Text -> Either String Word64 unsignedInt :: Text -> Either String Word32 unsignedShort :: Text -> Either String Word16 unsignedByte :: Text -> Either String Word8 float :: Text -> Either String Float double :: Text -> Either String Double fastDouble :: Text -> Either String Double instance HasResolution E18