I'm trying to make a function in PHP that will accept a time in a 24 hour format (HH:MM) then calculate the difference from the current time. I've found lots of useful looking bits of code on the net, but I don't have a clue about PHP when it comes to comparing times.
The function will also need to work when the input time is after midnight and the current time is before (ie. now = 23:55 input = 00:10 will return 15)
Can anyone point me in the right direction?
Thanks for any help,
Alex
The function will also need to work when the input time is after midnight and the current time is before (ie. now = 23:55 input = 00:10 will return 15)
Can anyone point me in the right direction?
Thanks for any help,
Alex