Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understand "nth" ranges with ranges of months in non-strict mode #70

Open
westnordost opened this issue Jan 16, 2022 · 2 comments
Open

Comments

@westnordost
Copy link
Contributor

e.g. Jan-Dec 1-31/2 -> "Open every odd day of month" or the same for every even day of a month.

Use case

Currently, the way to express the above correctly in line with the specification would be
Jan 1-31/2, Feb 1-29/2, Mar 1-31/2, Apr 1-30/2, May 1-31/2, Jun 1-30/2, Jul 1-31/2, Aug 1-31/2, Sep 1-30/2, Oct 1-31/2, Nov 1-30/2, Dec 1-31/2

A real life example of such "opening hours" would be this road sign, which is a conditional "no parking" restriction for odd days of a month, found in some countries following the Vienna convention on road signs.
It is tagged like parking:condition:*:conditional=no_parking @ (<opening hours>)

It is possible that contributors that happen upon such opening hours (or restrictions) will not use the correct syntax but just use Jan-Dec 1-31/2 or similar because one needs to know the specification really really well to know that at this position, month ranges are not allowed. They are allowed at other positions in the specification after all.

Issues

There are two issues: on the one hand there are no month day ranges that are separate from dates. What is supported is only Jan 1-31 which simply is short hand for Jan 1 - Jan 31, so support would require month day ranges as an independent construct. Not sure if that wouldn't create even more ambiguity in parsing (for example with that shorthand). The 2nd minor issue is adding an interval specification, that is unlikely to be problematic on it's own.
- @simonpoole

@westnordost
Copy link
Contributor Author

I noticed this came up already 4 years ago in @ypid's parser opening-hours/opening_hours.js#252 - with this exact example, to boot.

@westnordost
Copy link
Contributor Author

FYI the wiki now suggests to use
parking:right:restriction:conditional=no_parking @ ("Odd days of each month")
to map these parking "opening hours"

https://wiki.openstreetmap.org/wiki/Street_parking#Alternate_side_parking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant