matchers-0.18.0.0: Text matchers

Safe HaskellNone

Text.Matchers.Times

Description

Time parsers.

Text.Matchers allows you to perform matching based on times. Times are parsed using the parsers in this module.

Synopsis

Documentation

year :: Parser IntegerSource

A four-digit year.

month :: Parser IntSource

A two-digit month (exactly 2 digits.)

day :: Parser IntSource

A two-digit day (exactly 2 digits.)

pDate :: Parser DaySource

A valid Gregorian day, in YYYY-MM-DD format. Each separator may be a hyphen or a slash. Fails if the day is not valid.

dateSep :: Char -> BoolSource

Date separator (slash or hyphen).

hours :: Parser IntSource

Two digits for the hour (exactly two digits). Must be between 0 and 23.

minutes :: Parser IntSource

Two digits for the minutes (exactly two digits). Must be between 0 and 59.

seconds :: Parser PicoSource

Two digits for seconds (exactly two digits). Must be between 0 and 59; there are no leap seconds.

time :: Parser TimeOfDaySource

Hours and minutes, separated by colons, with optional seconds.

tzSign :: Parser (Int -> Int)Source

Time zone sign, plus or minus.

tzNumber :: Parser IntSource

Time zone offset, exactly 4 digits.

timeZone :: Parser TimeZoneSource

Time zone; that is, sign and offset. Both the sign and offset are required. The number of minutes may not exceed 840.

white :: Char -> BoolSource

Space or tab.

timeWithZone :: Parser (TimeOfDay, Maybe TimeZone)Source

Time of day, with optional time zone.

dateTime :: Parser UTCTimeSource

Day, followed by optional whitespace, followed by optional time with zone.