IHP Api Reference
Safe HaskellSafe-Inferred

IHP.Postgres.TimeParser

Synopsis

Documentation

newtype PGInterval Source #

Constructors

PGInterval ByteString 

Instances

Instances details
FromJSON PGInterval Source # 
Instance details

Defined in IHP.Postgres.Interval

Methods

parseJSON :: Value -> Parser PGInterval #

parseJSONList :: Value -> Parser [PGInterval] #

ToJSON PGInterval Source # 
Instance details

Defined in IHP.Postgres.Interval

Show PGInterval Source # 
Instance details

Defined in IHP.Postgres.TimeParser

Methods

showsPrec :: Int -> PGInterval -> ShowS #

show :: PGInterval -> String

showList :: [PGInterval] -> ShowS #

Default PGInterval Source # 
Instance details

Defined in IHP.ModelSupport

Methods

def :: PGInterval #

Eq PGInterval Source # 
Instance details

Defined in IHP.Postgres.TimeParser

ParamReader PGInterval Source # 
Instance details

Defined in IHP.Controller.Param

InputValue PGInterval Source # 
Instance details

Defined in IHP.ModelSupport

FromField PGInterval 
Instance details

Defined in IHP.Postgres.Interval

Methods

fromField :: FieldParser PGInterval

ToField PGInterval 
Instance details

Defined in IHP.Postgres.Interval

Methods

toField :: PGInterval -> Action

data PGTimeInterval Source #

Instances

Instances details
Show PGTimeInterval Source # 
Instance details

Defined in IHP.Postgres.TimeParser

Eq PGTimeInterval Source # 
Instance details

Defined in IHP.Postgres.TimeParser

twoDigits :: Parser Int Source #

Parse a two-digit integer (e.g. day of month, hour).

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.

pClockTime :: Parser (Int, Int, Pico) Source #

Parse a limited postgres interval of the form [-]HHH:MM:SS.[SSSS] (no larger units than hours).