spice_ev.util.dt_within_core_standing_time
- spice_ev.util.dt_within_core_standing_time(dt, core_standing_time)
Check if datetime dt is in inside core standing time.
- Parameters:
dt (datetime) – time to be checked
core_standing_time (dict) – Provides time_windows to check Example: one core standing time each day from 22:00 to 5:00 next day additionally weekends: {“times”: [{“start”: (22,0), “end”:(5,0)}], “no_drive_days”: [5,6]}
- Returns:
True - if dt is inside a time_window or if core_standing_time=None. False - if dt is outside of time window
- Return type:
bool