This is an interesting idea. But there are some edge cases that aren't covered -- and they might be difficult to resolve.
Discontinuous shifts - What is the result of merging 7AM-9AM and 10AM-11AM? I would think it would need to be an invalid operation.
Shifts crossing midnight - What is the result of merging 10PM-2AM and 1AM-3AM? I would expect 10PM-3AM but the current code would result in 1AM-10PM.
Shifts that combine to over 24 hours - This problem overlaps with the previous. What does it mean to merge 1PM-5AM with 4AM-3PM? I would expect this to resolve to 1PM to 3PM the next day - a 26 hour shift. But the shift class can't represent that.
Hi, This isn't much but I thought it could be handy. Thanks for reviewing :)