rel8-1.3.1.0: Hey! Hey! Can u rel8?
Safe HaskellNone
LanguageHaskell2010

Rel8.Expr.Time

Synopsis

Working with Day

today :: Expr Day Source #

Corresponds to date(now()).

toDay :: Expr UTCTime -> Expr Day Source #

Corresponds to calling the date function with a given time.

fromDay :: Expr Day -> Expr UTCTime Source #

Corresponds to x::timestamptz.

addDays :: Expr Int32 -> Expr Day -> Expr Day Source #

Move forward a given number of days from a particular day.

diffDays :: Expr Day -> Expr Day -> Expr Int32 Source #

Find the number of days between two days. Corresponds to the - operator.

subtractDays :: Expr Int32 -> Expr Day -> Expr Day Source #

Subtract a given number of days from a particular Day.

Working with UTCTime

now :: Expr UTCTime Source #

Corresponds to now().

addTime :: Expr CalendarDiffTime -> Expr UTCTime -> Expr UTCTime Source #

Add a time interval to a point in time, yielding a new point in time.

diffTime :: Expr UTCTime -> Expr UTCTime -> Expr CalendarDiffTime Source #

Find the duration between two times.

subtractTime :: Expr CalendarDiffTime -> Expr UTCTime -> Expr UTCTime Source #

Subtract a time interval from a point in time, yielding a new point in time.

Working with CalendarDiffTime

second :: Expr CalendarDiffTime Source #

An interval of one second.

seconds :: Expr Double -> Expr CalendarDiffTime Source #

Create a literal interval from a number of seconds.

minute :: Expr CalendarDiffTime Source #

An interval of one minute.

minutes :: Expr Double -> Expr CalendarDiffTime Source #

Create a literal interval from a number of minutes.

hour :: Expr CalendarDiffTime Source #

An interval of one hour.

hours :: Expr Double -> Expr CalendarDiffTime Source #

Create a literal interval from a number of hours.

day :: Expr CalendarDiffTime Source #

An interval of one day.

days :: Expr Double -> Expr CalendarDiffTime Source #

Create a literal interval from a number of days.

week :: Expr CalendarDiffTime Source #

An interval of one week.

weeks :: Expr Double -> Expr CalendarDiffTime Source #

Create a literal interval from a number of weeks.

month :: Expr CalendarDiffTime Source #

An interval of one month.

months :: Expr Double -> Expr CalendarDiffTime Source #

Create a literal interval from a number of months.

year :: Expr CalendarDiffTime Source #

An interval of one year.

years :: Expr Double -> Expr CalendarDiffTime Source #

Create a literal interval from a number of years.