Cleanest way to tell if 3 times are within half an hour of each other
- by niggles
I have 3 date / time input boxes on a form and the user cannot select any times within half an hour of each other.
I've converted all values to epoch format using a Javascript implementation of strtotime, but not sure how to recursively check that any of the times are actually half an hour apart.
I can hand code all checks, but it would be cleaner to write a recursive function (especially if there were theoretically more than 3 time slots).
Did some Google research but no luck.
Any suggestions on implementing this in Javascript or Jquery.
Thanks.