Algorithm Request: Comparison against a range that wraps


Author Message
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 07:27pm 24 Jun 2021      

  vegipete said  
it fails with, say, 12:58 and 1:02 (assuming a 12 hour clock.)


Is the difference between those 2 times 0:04 (12:58am, 1:02pm) or 11:56 (12:58pm, 1:02am)? You need to set the border conditions. But I'm not expert for 12 hour clock...