timeparsers-0.3.2: Attoparsec parsers for various Date/Time formats.

Safe HaskellNone

Data.Time.Parsers

Contents

Synopsis

Utility functions

fromExtendedTimestamp :: (FromZonedTime a, ToZonedTime a) => a -> ExtendedTimestamp a -> aSource

Given a timestamp to use as the current time, purely convert an ExtendedTimestamp to a timestamp

fromExtendedTimestampIO :: (FromZonedTime a, ToZonedTime a) => ExtendedTimestamp a -> IO aSource

Use getZonedTime to get the current time, and use it to convert an ExtendedTimestamp to a timestamp

parseWithOptions :: Options -> OptionedParser a -> ByteString -> Result aSource

Use given options and parser to parse a single Timestamp. always feeds empty, so a Partial result is never returned. Ignores preceding and trailing whitespace.

parseWithDefaultOptions :: OptionedParser a -> ByteString -> Result aSource

Use default options to parse single Timestamp with a given parser, ignoring preceding and trailing whitespace

defaultOptions :: OptionsSource

Default Options to use: Try YMD, then MDY, then DMY Accept ., ' ', /, - as separators. Use flags MakeRecent, DefaultToUTC, DefaultToMidnight

Date Parsers

Time Parsers

Timestamp Parsers

Data Types