Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Period
- data Weekdays
- periodStep :: Period -> UTCTime -> UTCTime
- periodStepBack :: Period -> UTCTime -> UTCTime
- data PeriodicSequence
- periodicSequence :: Period -> UTCTime -> PeriodicSequence
- nth :: PeriodicSequence -> Int -> UTCTime
- psToList :: PeriodicSequence -> [UTCTime]
- psOver :: Period -> (UTCTime, UTCTime) -> [UTCTime]
- psToUTimeList :: PeriodicSequence -> [UTime]
- periodStepUTime :: Period -> UTime -> UTime
- periodStepBackUTime :: Period -> UTime -> UTime
- psOverUTime :: Period -> (UTime, UTime) -> [UTime]
Documentation
periodStep :: Period -> UTCTime -> UTCTime Source
Returns the time value which is one period
after the given time.
periodStepBack :: Period -> UTCTime -> UTCTime Source
Returns the time value which is one period
before the given time.
data PeriodicSequence Source
Represents a sequence of time stamps repeating periodically from
a given start time. The repeating period can be quite flexible,
see Period
. To create values of this data type use the
periodicSequence
function.
:: Period | Repeation period. |
-> UTCTime | Start time. |
-> PeriodicSequence |
nth :: PeriodicSequence -> Int -> UTCTime Source
Accessor for the n
th element of a PeriodicSequence
.
psToList :: PeriodicSequence -> [UTCTime] Source
Returns an infine list of times in the periodic sequence.
The first element of the result is guaranteed to be not earlier than the start time with which the sequence was created. (But, in the case of Workdays and Weekdays it might be a later time.)
psOver :: Period -> (UTCTime, UTCTime) -> [UTCTime] Source
Returns the elements of the periodic sequence starting at the beginning and contained in the given time range.
UTime API
psToUTimeList :: PeriodicSequence -> [UTime] Source
periodStepUTime :: Period -> UTime -> UTime Source
periodStepBackUTime :: Period -> UTime -> UTime Source