Skip to content
Snippets Groups Projects
Commit f84e0a07 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

SSB-47: Fix range

parent e63dd339
No related branches found
No related tags found
1 merge request!44Merge back holography to master
......@@ -16,9 +16,9 @@ def is_observation_in_range(start, end, from_datetime, to_datetime):
:return: true if the observation is contained in the range false otherwise
:raises: ValueError if start > end
"""
if start <= end:
start_in_range = from_datetime < start < to_datetime
end_in_range = from_datetime < end < to_datetime
if start < end:
start_in_range = from_datetime <= start < to_datetime
end_in_range = from_datetime < end <= to_datetime
else:
raise ValueError('start datetime is greater then end datetime')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment