mirror of
https://github.com/circuithub/rel8.git
synced 2024-09-17 19:59:38 +03:00
Add week and weeks to Rel8.Expr.Time
This commit is contained in:
parent
98fd6f4934
commit
16299c5b96
@ -19,6 +19,7 @@ module Rel8.Expr.Time
|
||||
, minute, minutes
|
||||
, hour, hours
|
||||
, day, days
|
||||
, week, weeks
|
||||
, month, months
|
||||
, year, years
|
||||
) where
|
||||
@ -131,6 +132,16 @@ days :: Expr Double -> Expr DiffTime
|
||||
days = (`scaleInterval` day)
|
||||
|
||||
|
||||
-- | An interval of one week.
|
||||
week :: Expr DiffTime
|
||||
week = singleton "week"
|
||||
|
||||
|
||||
-- | Create a literal interval from a number of weeks.
|
||||
weeks :: Expr Double -> Expr DiffTime
|
||||
weeks = (`scaleInterval` week)
|
||||
|
||||
|
||||
-- | An interval of one month.
|
||||
month :: Expr DiffTime
|
||||
month = singleton "month"
|
||||
|
Loading…
Reference in New Issue
Block a user