-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Parsing of ISO 8601 dates, originally from aeson.
--   
--   Parsing of ISO 8601 dates, originally from aeson.
@package attoparsec-iso8601
@version 1.0.0.0


module Data.Attoparsec.Time.Internal

-- | Like TimeOfDay, but using a fixed-width integer for seconds.
data TimeOfDay64
TOD :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int64 -> TimeOfDay64
fromPico :: Pico -> Integer
toPico :: Integer -> Pico
diffTimeOfDay64 :: DiffTime -> TimeOfDay64
toTimeOfDay64 :: TimeOfDay -> TimeOfDay64


-- | Parsers for parsing dates and times.
module Data.Attoparsec.Time

-- | Parse a date of the form <tt>[+,-]YYYY-MM-DD</tt>.
day :: Parser Day

-- | Parse a date and time, of the form <tt>YYYY-MM-DD
--   HH:MM[:SS[.SSS]]</tt>. The space may be replaced with a <tt>T</tt>.
--   The number of seconds is optional and may be followed by a fractional
--   component.
localTime :: Parser LocalTime

-- | Parse a time of the form <tt>HH:MM[:SS[.SSS]]</tt>.
timeOfDay :: Parser TimeOfDay

-- | Parse a time zone, and return <a>Nothing</a> if the offset from UTC is
--   zero. (This makes some speedups possible.)
timeZone :: Parser (Maybe TimeZone)

-- | Behaves as <a>zonedTime</a>, but converts any time zone offset into a
--   UTC time.
utcTime :: Parser UTCTime

-- | Parse a date with time zone info. Acceptable formats:
--   
--   <tt>YYYY-MM-DD HH:MM Z</tt> <tt>YYYY-MM-DD HH:MM:SS Z</tt>
--   <tt>YYYY-MM-DD HH:MM:SS.SSS Z</tt>
--   
--   The first space may instead be a <tt>T</tt>, and the second space is
--   optional. The <tt>Z</tt> represents UTC. The <tt>Z</tt> may be
--   replaced with a time zone offset of the form <tt>+0000</tt> or
--   <tt>-08:00</tt>, where the first two digits are hours, the <tt>:</tt>
--   is optional and the second two digits (also optional) are minutes.
zonedTime :: Parser ZonedTime
