rezemika / humanized_opening_hours

A parser for the opening_hours fields from OpenStreetMap
GNU Affero General Public License v3.0
26 stars 20 forks source link

Can't parse comma-separated ranges #7

Closed nbolten closed 6 years ago

nbolten commented 6 years ago

OHParser raises a ParseError on day ranges after a comma:

hoh.OHParser('We,Fr-Su 10:00-17:00')

ParseError: The field could not be parsed, it may be invalid. Error happened on column 5 when parsing '-'.

This error doesn't happen if you have the range first: hoh.OHParser('We-Fr,Su 10:00-17:00')

I've opened a pull request at #6, but since I'm new to EBNF it probably contains some issues.

rezemika commented 6 years ago

This will be fixed with the 1.0.0 coming soon version. ;)