rubyparsingdatetimerubygemschronic

Is there a RubyGem for parsing store hours?


Are there any ruby gems to parse and standardize store hours? I've seen Chronic, but I don't think it'll work for this specific use case.

For example, how would you parse Mon-Sun 11am-10pm or Hours today: 5:30 AM – 10:00 PM? Do you have to create rules specific to each context? Is there a library that does this already?


Solution

  • Chronic Duration solves the problem of parsing duration time strings.