I have time interval strings like 6:30 am – 2:30 pm or 5:30–11:00 pm (notice the omitted “pm” for the start time here) that I want to parse into Time objects in Ruby. Is there an elegant way to do that or do I have to catch all different cases manually?
I have time interval strings like 6:30 am – 2:30 pm or 5:30–11:00 pm
Share
Thanks for the Chronic recommendation, alas, it doesn’t provide interval parsing. Ended up using
Time.parseand parsing the interval manually.