Confine the calculation of the present_intervals to its own function within FormData and add a test for this