Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data TimeObject = TimeObject {}
- data Form
- data IntervalDirection
- data TimeData = TimeData {}
- timedata' :: TimeData
- data TimeContext = TimeContext {}
- data InstantValue = InstantValue {}
- data SingleTimeValue
- data TimeValue = TimeValue SingleTimeValue [SingleTimeValue]
- type SeriesPredicate = TimeObject -> TimeContext -> ([TimeObject], [TimeObject])
- data AMPM
- data Predicate
- runPredicate :: Predicate -> SeriesPredicate
- emptyTimeDatePredicate :: Predicate
- mkSeriesPredicate :: SeriesPredicate -> Predicate
- mkSecondPredicate :: Int -> Predicate
- mkMinutePredicate :: Int -> Predicate
- mkHourPredicate :: Bool -> Int -> Predicate
- mkAMPMPredicate :: AMPM -> Predicate
- mkDayOfTheWeekPredicate :: Int -> Predicate
- mkDayOfTheMonthPredicate :: Int -> Predicate
- mkMonthPredicate :: Int -> Predicate
- mkYearPredicate :: Int -> Predicate
- mkIntersectPredicate :: Predicate -> Predicate -> Predicate
- mkTimeIntervalsPredicate :: TimeIntervalType -> Predicate -> Predicate -> Predicate
- isEmptyPredicate :: Predicate -> Bool
- runSecondPredicate :: Int -> SeriesPredicate
- runMinutePredicate :: Int -> SeriesPredicate
- runHourPredicate :: Maybe AMPM -> Bool -> Int -> SeriesPredicate
- runAMPMPredicate :: AMPM -> SeriesPredicate
- runDayOfTheWeekPredicate :: Int -> SeriesPredicate
- runDayOfTheMonthPredicate :: Int -> SeriesPredicate
- runMonthPredicate :: Int -> SeriesPredicate
- runYearPredicate :: Int -> SeriesPredicate
- safeMax :: Int
- runIntersectPredicate :: Predicate -> Predicate -> SeriesPredicate
- runCompose :: SeriesPredicate -> SeriesPredicate -> SeriesPredicate
- runTimeIntervalsPredicate :: TimeIntervalType -> Predicate -> Predicate -> SeriesPredicate
- safeMaxInterval :: Int
- timeSeqMap :: Bool -> (TimeObject -> TimeContext -> Maybe TimeObject) -> Predicate -> SeriesPredicate
- timeSequence :: Grain -> Int -> TimeObject -> ([TimeObject], [TimeObject])
- pad :: Int -> Int -> Text
- timezoneOffset :: TimeZone -> Text
- toRFC3339 :: ZonedTime -> Text
- instantValue :: TimeZoneSeries -> UTCTime -> Grain -> InstantValue
- timeValue :: TimeZoneSeries -> TimeObject -> SingleTimeValue
- openInterval :: TimeZoneSeries -> IntervalDirection -> TimeObject -> SingleTimeValue
- timeRound :: TimeObject -> Grain -> TimeObject
- timePlus :: TimeObject -> Grain -> Integer -> TimeObject
- timePlusEnd :: TimeObject -> Grain -> Integer -> TimeObject
- timeEnd :: TimeObject -> UTCTime
- timeStartingAtTheEndOf :: TimeObject -> TimeObject
- data TimeIntervalType
- timeInterval :: TimeIntervalType -> TimeObject -> TimeObject -> TimeObject
- timeStartsBeforeTheEndOf :: TimeObject -> TimeObject -> Bool
- timeBefore :: TimeObject -> TimeObject -> Bool
- timeIntersect :: TimeObject -> TimeObject -> Maybe TimeObject
Documentation
data TimeObject Source #
data IntervalDirection Source #
data TimeContext Source #
data SingleTimeValue Source #
type SeriesPredicate = TimeObject -> TimeContext -> ([TimeObject], [TimeObject]) Source #
Return a tuple of (past, future) elements
mkSecondPredicate :: Int -> Predicate Source #
mkMinutePredicate :: Int -> Predicate Source #
mkAMPMPredicate :: AMPM -> Predicate Source #
mkMonthPredicate :: Int -> Predicate Source #
mkYearPredicate :: Int -> Predicate Source #
isEmptyPredicate :: Predicate -> Bool Source #
runHourPredicate :: Maybe AMPM -> Bool -> Int -> SeriesPredicate Source #
runYearPredicate :: Int -> SeriesPredicate Source #
Converts 2-digits to a year between 1950 and 2050
timeSeqMap :: Bool -> (TimeObject -> TimeContext -> Maybe TimeObject) -> Predicate -> SeriesPredicate Source #
Applies f
to each interval yielded by g
.
| Intervals including "now" are in the future.
timeSequence :: Grain -> Int -> TimeObject -> ([TimeObject], [TimeObject]) Source #
timezoneOffset :: TimeZone -> Text Source #
Return the timezone offset portion of the RFC3339 format, e.g. "-02:00".
toRFC3339 :: ZonedTime -> Text Source #
Return a RFC3339 formatted time, e.g. "2013-02-12T04:30:00.000-02:00". | Backward-compatible with Duckling: fraction of second is milli and padded.
instantValue :: TimeZoneSeries -> UTCTime -> Grain -> InstantValue Source #
timeValue :: TimeZoneSeries -> TimeObject -> SingleTimeValue Source #
timeRound :: TimeObject -> Grain -> TimeObject Source #
timePlus :: TimeObject -> Grain -> Integer -> TimeObject Source #
timePlusEnd :: TimeObject -> Grain -> Integer -> TimeObject Source #
Shifts the whole interval by n units of theGrain Returned interval has the same length as the input one
timeEnd :: TimeObject -> UTCTime Source #
data TimeIntervalType Source #
Closed if the interval between A and B should include B Open if the interval should end right before B
timeInterval :: TimeIntervalType -> TimeObject -> TimeObject -> TimeObject Source #
timeStartsBeforeTheEndOf :: TimeObject -> TimeObject -> Bool Source #
timeBefore :: TimeObject -> TimeObject -> Bool Source #
timeIntersect :: TimeObject -> TimeObject -> Maybe TimeObject Source #
Intersection between two TimeObject
.
The resulting grain and end fields are the smallest.
Prefers intervals when the range is equal.