Safe Haskell | None |
---|---|
Language | Haskell98 |
This module allows to parse arbitrary date formats. Date formats are specified as strings:
- DD.MM.YYY
- "YYYY/MM/DD"
- "DD/MM/YYYY, HH:mm:SS"
- "YY.MM.DD[, HH:mm:SS]"
- and so on.
- data FormatElement
- type Format = [FormatElement]
- type FormatParser a = Parsec String Bool a
- parseFormat :: String -> Either ParseError Format
- pFormat :: FormatParser Format
- formatParser :: Stream s m Char => Format -> ParsecT s st m DateTime
- parseDateFormat :: String -> String -> Either ParseError DateTime
Documentation
data FormatElement Source
Date/time format element
type Format = [FormatElement] Source
Date/time format
type FormatParser a = Parsec String Bool a Source
formatParser :: Stream s m Char => Format -> ParsecT s st m DateTime Source
Make Parser for specified date format.
Parse date/time in specified format.