time#
Source code: sensai/util/time.py
- time_of_day(ts: pd.Timestamp) float [source]#
- Parameters:
ts – the timestamp
- Returns:
the time of day as a floating point number in [0, 24)
- class TimeInterval(start: pd.Timestamp, end: pd.Timestamp)[source]#
Bases:
object
- contains_time(t: time)[source]#
- Parameters:
t – a time of day
- Returns:
True iff the time interval contains the given time of day at least once, False otherwise
- overlaps_with(other: TimeInterval) bool [source]#
- intersection(other: TimeInterval) TimeInterval [source]#