Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Provides data types and functions pertaining to time, duration and dates in accordance with the ICAO 4444 edition 2016 standard.
- data Hhmm
- data DayTime
- data Date
- hhmmParser :: Parser Hhmm
- dateParser :: Parser Date
- dayTimeParser :: Parser DayTime
- parseHhmm :: String -> Either Error Hhmm
- parseDate :: String -> Either Error Date
- parseDayTime :: String -> Either Error DayTime
- mkHhmm :: MonadFail m => Int -> Int -> m Hhmm
- mkDate :: MonadFail m => Int -> Int -> Int -> m Date
- mkDayTime :: MonadFail m => Int -> Int -> Int -> m DayTime
Data
Hhmm
represents a time or duration expressed with hours and minutes only
in the range 0000 .. 2359.
Date
represents a date expressed zith year, month and day.
Parsers
Smart constructors
mkHhmm :: MonadFail m => Int -> Int -> m Hhmm Source #
Hhmm
smart constructor. Fails if given hour and/or minute are not valid.