Safe Haskell | Safe-Inferred |
---|
IHP.Postgres.TimeParser
Synopsis
- newtype PGInterval = PGInterval ByteString
- data PGTimeInterval = PGTimeInterval {}
- unpackInterval :: PGInterval -> PGTimeInterval
- pPGInterval :: Parser PGTimeInterval
- twoDigits :: Parser Int
- toPico :: Integer -> Pico
- pClockInterval :: Parser TimeOfDay
- seconds :: Parser Pico
- nominalDiffTime :: Parser NominalDiffTime
- pClockTime :: Parser (Int, Int, Pico)
Documentation
newtype PGInterval Source #
Constructors
PGInterval ByteString |
Instances
data PGTimeInterval Source #
Constructors
PGTimeInterval | |
Instances
Show PGTimeInterval Source # | |
Defined in IHP.Postgres.TimeParser Methods showsPrec :: Int -> PGTimeInterval -> ShowS # show :: PGTimeInterval -> String showList :: [PGTimeInterval] -> ShowS # | |
Eq PGTimeInterval Source # | |
Defined in IHP.Postgres.TimeParser Methods (==) :: PGTimeInterval -> PGTimeInterval -> Bool # (/=) :: PGTimeInterval -> PGTimeInterval -> Bool # |
pPGInterval :: Parser PGTimeInterval Source #
toPico :: Integer -> Pico Source #
See https://stackoverflow.com/questions/32398878/converting-postgres-interval-to-haskell-nominaltimediff-with-postgresql-simple | Module: Database.PostgreSQL.Simple.Time.Internal.Parser Copyright: (c) 2012-2015 Leon P Smith (c) 2015 Bryan O'Sullivan License: BSD3 Maintainer: Leon P Smith leon@melding-monads.com Stability: experimental
Parsers for parsing dates and times.
pClockInterval :: Parser TimeOfDay Source #
Parse a time of the form HH:MM[:SS[.SSS]]
.
seconds :: Parser Pico Source #
Parse a count of seconds, with the integer part being two digits long.
nominalDiffTime :: Parser NominalDiffTime Source #
pClockTime :: Parser (Int, Int, Pico) Source #
Parse a limited postgres interval of the form [-]HHH:MM:SS.[SSSS] (no larger units than hours).