MobilityData / gbfs-json-schema

JSON Schema for GBFS feeds, managed by MobilityData. The versions are organized by folders. CC BY 4.0
Apache License 2.0
23 stars 25 forks source link

Regex for OSM opening hours #81

Closed josee-sabourin closed 11 months ago

josee-sabourin commented 1 year ago

As discussed in #79, we have not been able to find a regular expression that encapsulates the OSM Opening Hours format.

Opening this issue in case someone has a solution, and as a general reminder to keep looking for one.

richfab commented 11 months ago

This comment (upvoted by 3 people) mentions that this format is too complex to be validated with a regex.

I don't think a regex can handle this complex format. You will need a real parser. The OSM wiki lists several implementations:

For this reason, I would recommend to close this issue.

A new issue could be opened in https://github.com/MobilityData/gbfs-validator, given that code seems to be required to validate OSM opening hours.