toOpeningHoursOrNull

Parse this string as OSM opening hours according to the specification.

Note that the specification also covers defining points in time (used in for example for the tag key collection_times). You can check whether a parsed OpeningHours contains points in time via OpeningHours.containsTimePoints

Return

parsed opening hours or null if this cannot be parsed as opening hours

Parameters

lenient

Whether to accept certain unambiguous syntax variations that are not documented in the specification as valid