| Safe Haskell | Safe-Inferred |
|---|
Options.Time
Description
The options-time package provides OptionType implementations and
associated SimpleOption instances for types related to dates and times.
- optionType_duration :: OptionType DiffTime
- optionType_date :: OptionType Day
- optionType_time :: OptionType TimeOfDay
- optionType_localTime :: OptionType LocalTime
- optionType_utcTime :: OptionType UTCTime
- optionType_zonedTime :: OptionType ZonedTime
Documentation
optionType_duration :: OptionType DiffTimeSource
Store an option as a DiffTime. The duration is specified in a format
such as "2h30m" for two hours and thirty minutes.
Available units are:
- "h" for hours. * "m" for minutes. * "s" for seconds. * "ms" for milliseconds. * "us" or "µs" for microseconds. * "ns" for nanoseconds. * "ps" for picoseconds.
Larger units are not available to avoid ambiguity when dealing with daylight savings time.
optionType_date :: OptionType DaySource
Store an option as a Day. Supported formats are:
- "YYYY-MM-DD" * "YYYYMMDD" * "YYYY-DDD"
optionType_time :: OptionType TimeOfDaySource
Store an option as a TimeOfDay. Supported formats are:
- "HH:MM" * "HH:MM:SS" * "HH:MM:SS.FFFF"
For example, the value "10:11:12.5" is half a second past
10:11:12 AM.
optionType_localTime :: OptionType LocalTimeSource
Store an option as a LocalTime. Supported formats are a combination
of those for optionType_date and optionType_time.
optionType_utcTime :: OptionType UTCTimeSource
Store an option as a UTCTime. Supported formats are a combination
of those for optionType_date and optionType_time.
optionType_zonedTime :: OptionType ZonedTimeSource
Store an option as a ZonedTime. Supported formats are a combination
of those for optionType_date and optionType_time.