I am pulling the data from the feed for which I have no control, and I need to check if the line I am giving is the real time.
In most cases, I correctly send something like โ2:35โ or โ15:41โ, but in other cases it looks like โAMโ or โPMโ (and without digits) ... so I ultimately just need to ignore them.
So how can I check if the data is valid time?
string ruby ruby-on-rails time
Shpigford
source share