tslib-0.1.4: Time series library

Safe HaskellNone
LanguageHaskell2010

Data.TimeSeries.Periodic

Contents

Synopsis

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.

periodicSequence Source

Arguments

:: Period

Repeation period.

-> UTCTime

Start time.

-> PeriodicSequence 

nth :: PeriodicSequence -> Int -> UTCTime Source

Accessor for the nth 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