timeframe
timeframe
Classes:
Name | Description |
---|---|
TimeFrame |
Pre-defined TimeFrame values |
Functions:
Name | Description |
---|---|
clean_timestamp |
Removes Microseconds from the timestamp and returns it |
on_timeframe |
Checks if timestamp is on a timeframe value |
round_down_timestamp |
Find and round down timestamp to the nearest matching timeframe. E.G timeframe of 5 minute |
within_timeframe |
Checks if timestamp is within other timestamp and timeframe period |
TimeFrame
clean_timestamp
on_timeframe
round_down_timestamp
Find and round down timestamp to the nearest matching timeframe. E.G timeframe of 5 minute E.G T5: 09:00:01 -> 9:00:00 E.G T5: 09:01:20 -> 9:00:00 E.G T5: 09:05:00 -> 9:05:00 Note: This method also calls clean_timestamp, removing microseconds
Source code in hexital/utils/timeframe.py
within_timeframe
Checks if timestamp is within other timestamp and timeframe period