simonpoole / OpeningHoursParser

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

Hours and minutes for interval #62

Closed goodudetheboy closed 3 years ago

goodudetheboy commented 3 years ago

For the pattern points in time in timespan, or setting interval, the <hour_minutes> is not supported by the parser (see specification). For example, parsing 13:00-19:00/90 results in

TimeSpan:13:00-19:00/01:30

but parsing 13:00-19:00/1:30 or 13:00-19:00/01:30 results in

ch.poole.openinghoursparser.OpeningHoursParseException: Encountered:  ":" ": " at line 1, column 13

throwing an error.

simonpoole commented 3 years ago

Thanks for the report.

Fixed in https://github.com/simonpoole/OpeningHoursParser/commit/78203e45245fa7c75179fb52f69d45a77822ce9e