fix in datetimeRange to avoid round-off error
Added test for round-off error in datetimeRange