simonpoole / OpeningHoursParser

Parser for string values according to the OSM opening hours specification
MIT License
32 stars 12 forks source link

Open end for year not supported #65

Closed goodudetheboy closed 3 years ago

goodudetheboy commented 3 years ago

It seems that parsing for open end for year is not currently supported. When I try parsing an OH string like "2021+", the parser throws this error:

ch.poole.openinghoursparser.OpeningHoursParseException: Encountered:  "+" "+ " at line 1, column 1
Was expecting: <EOF>
        at ch.poole.openinghoursparser.OpeningHoursParser.rules(OpeningHoursParser.java:47)

        at ch.poole.openinghoursparser.IndividualTest.main(IndividualTest.java:25)
simonpoole commented 3 years ago

Added in https://github.com/simonpoole/OpeningHoursParser/commit/7cf8a65eb6a3ad1132a7f0a716ac424f924d1b16

There are currently only 4 correct usages of this in all OSM data, and nothing in the test data set so not a big surprise that I missed it.