added function to get all intervals from a user and a day; equality function for intervals