Fix #17 - infinite loop when calculating diff
Fix #17 - infinite loop when calculating diff

A diff between two times on the same "night" causes the from and to times to be flipped, and so the iterator that attempts to get them onto the same day recurses infinitely.

A simple check that from is still before to after normalisation prevents this. If from has ened up after to, then we were dealing with two times on the same night, and so the diff is zero.

lennym/moment-business-time