Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Parser.Lathe.Time
Description
Functions for parsing common time formats.
Synopsis
- year :: e -> e -> Parser e Year
- quarter :: e -> e -> e -> Parser e Quarter
- month :: e -> e -> e -> Parser e Month
- monthDate :: e -> e -> e -> Parser e Day
- weekDate :: e -> e -> e -> Parser e Day
- ordinalDate :: e -> e -> e -> Parser e Day
- timeOfDay :: e -> e -> e -> Parser e TimeOfDay
- localTime :: e -> e -> e -> Parser e LocalTime
- timeZone :: e -> e -> e -> Parser e TimeZone
- zonedTime :: e -> e -> e -> Parser e ZonedTime
Calendar
Consume four decimal digits that represent an RFC 3339 full year.
Consume 7 bytes that represent a year quarter, in the yyyy-Qq
format.
Note that year quarters are not defined by ISO 8601, this is an informal convention.
Month
Consume 7 bytes that represent an RFC 3339 month, in the yyyy-mm
format.
Consume 10 bytes that represent an RFC 3339 month date, in the yyyy-mm-dd
format.
Week
Consume 10 bytes that represent an ISO 8601 week date,
in the extended yyyy-Www-d
format.
Ordinal
Consume 8 bytes that represent an ISO 8601 ordinal date, in the yyyy-ddd
format.
Time of day
Consume at least 8 bytes that represent an RFC 3339 time of day,
in the hh:mm:ss[.s…]
format.
Local
Consume at least 19 bytes that represent an RFC 3339 full time without time zone,
in the yyyy-mm-ddThh:mm:ss[.s…]
format.
Either t
or space is accepted instead of T
.
Zoned
Consume 1 or 6 bytes that represent an RFC 3339 time zone,
in the Z
and ±hh:mm
formats respectively.
z
is accepted instead of Z
.