simonpoole / OpeningHoursParser

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

Document extension to the spec: Referring to specific weekday for dates and date ranges #85

Open westnordost opened 9 months ago

westnordost commented 9 months ago

The syntax <month> <weekday> [<nth>] is not documented in the spec, although it is supported both by this parser and also the opening_hours.js

westnordost commented 9 months ago

Hm, actually Apr Fr[1,-1] is not necessarily an extension of the specification, as it could be parsed as <month_selector> <weekday_selector>. (Funnily enough, this is not supported by opening_hours.js)

Only <month> <weekday> [<single nth_entry>] - <month> <weekday> [<single nth_entry>] is not mentioned in the spec.