-- 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.1.1.0

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

-- | Parse a date of the form [+,-]YYYY-MM-DD.
--   
--   The year must contain at least 4 digits, to avoid the Y2K problem: a
--   two-digit year YY may mean YY, 19YY, or
--   20YY, and we make it an error to prevent the ambiguity. Years
--   from 0000 to 0999 must thus be zero-padded. The year
--   may have more than 4 digits.
day :: Parser Day

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

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

-- | Parse a time zone, and return Nothing if the offset from UTC is
--   zero. (This makes some speedups possible.)
--   
--   The accepted formats are Z, +HH, +HHMM, or
--   +HH:MM.
timeZone :: Parser (Maybe TimeZone)

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

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

-- | Parse a year YYYY, with at least 4 digits. Does not include
--   any sign.
--   
--   Note: Year is a type synonym for Integer.
year :: Parser Year

-- | Parse a month of the form [+,-]YYYY-MM.
--   
--   See also day for details about the year format.
month :: Parser Month

-- | Parse a quarter of the form [+,-]YYYY-QN.
--   
--   See also day for details about the year format.
quarter :: Parser Quarter

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

-- | Deprecated: Use MkFixed
fromPico :: Pico -> Integer

-- | Deprecated: Use MkFixed
toPico :: Integer -> Pico
diffTimeOfDay64 :: DiffTime -> TimeOfDay64
toTimeOfDay64 :: TimeOfDay -> TimeOfDay64
