ruby Screen Scraping Library for formatting times -
i wondering if there library method out there take time string of unknown format , reformat standard format (i.e. hhmm). examples of type of thing getting websites are.
1030 10:30 10pm 10pm 1030pm 10pm 1030pm 1030p.m. 1030pm. 930 930am 9am 8.30 8.30pm
and sure there others.
i started write method , it's getting there (https://gist.github.com/funkytwig/b47551e98e8698ebb59310286982a6ce) wondering if there 1 around. worth mentioning have come across websites times in same list (i.e. event listing) not consistent, think hand typed text field when input.
just clarify wondering if there method in library existing, i'm not asking people debug code. i'm sharing show have done try solve problem, , see why hoping there library.
try chronic. can parse whole lot of time formats, including ones gave.
Comments
Post a Comment