Sort by next date in range from array of dates

Thanks very much. My data is actually in more of a parent-child relationship anyway (I had simplified it for this example), so I will try this out and report back!