in reply to Extract times from strings and compute difference
Neil,
A bit more precision may be wise in your request. While sgifford's response is possibly sufficient, it doesn't take into account things like day roll-overs. If you don't need to worry about boundary cases such as 23:00 vs 01:00, that's great. If you do need to worry about those cases, then you'll need to give more information about how you can tell (from a human perspective if you can't describe it in perl). For example, the time difference between 23:00 and 01:00 could be 2 hours, or 22 hours, depending on which comes first. If the second time is always later than the first, then that's information we can use to come up with a more accurate algorithm.
Thanks,
|
|---|