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] (Maybe Text)
- type SeriesPredicate = TimeObject -> TimeContext -> ([TimeObject], [TimeObject])
- data AMPM
- data SeasonName
- data Season = Season {}
- newtype NoShow a = NoShow a
- data Predicate
- runPredicate :: Predicate -> SeriesPredicate
- emptyTimeDatePredicate :: Predicate
- mkEmptyPredicate :: 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
- containsTimeIntervalsPredicate :: Predicate -> Bool
- diffStartTime :: TimeObject -> TimeObject -> NominalDiffTime
- isEmptyPredicate :: Predicate -> Bool
- seasonStart :: Season -> Day
- seasonEnd :: Season -> Day
- nextSeason :: Season -> Season
- prevSeason :: Season -> Season
- seasonOf :: Day -> Season
- seasonPredicate :: Predicate
- weekdayPredicate :: Predicate
- toMidnight :: Day -> UTCTime
- 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
data SeasonName Source #
Regular seasons of the Northern Hemisphere.
mkSecondPredicate :: Int -> Predicate Source #
mkMinutePredicate :: Int -> Predicate Source #
mkAMPMPredicate :: AMPM -> Predicate Source #
mkMonthPredicate :: Int -> Predicate Source #
mkYearPredicate :: Int -> Predicate Source #
diffStartTime :: TimeObject -> TimeObject -> NominalDiffTime Source #
isEmptyPredicate :: Predicate -> Bool Source #
seasonStart :: Season -> Day Source #
nextSeason :: Season -> Season Source #
prevSeason :: Season -> Season Source #
toMidnight :: Day -> UTCTime 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.