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

Add an automatic invert function #352

Open
sun-geo opened this issue Nov 17, 2020 · 3 comments
Open

Add an automatic invert function #352

sun-geo opened this issue Nov 17, 2020 · 3 comments
Labels
status: feedback needed Further discussion is needed to determine this issue's scope and/or implementation.

Comments

@sun-geo
Copy link

sun-geo commented Nov 17, 2020

Lets say we have a opening/service time of
Mo-Fr 09:00-17:00
and for conditional syntax you want to write the inverted times like:
Mo-Fr 00:00-09:00,17:00-24:00, Sa,Su 00:00-24:00

@sun-geo sun-geo changed the title Add a automatic invert function Add an automatic invert function Nov 17, 2020
@ypid ypid added the type: question Meta topic that is not about a bug or feature of the software. label Nov 17, 2020
@ypid
Copy link
Member

ypid commented Nov 17, 2020

Hm, I don’t have a clear idea yet how I could program this so that the inverse that would be generated is actually an "optimal" way to express it. So before we talk about extending https://openingh.openstreetmap.de/evaluation_tool/, lets maybe talk about how the syntax can be used in clever yet defined ways to achieve what you want.

My idea:

open; Mo-Fr 09:00-17:00 off
Mo-Fr 09:00-17:00

See https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification#explain:rule_modifier:closed

This makes it really quick to "toggle" inverse and normal. But that is open for discussion. It was just the first thing I came up with right now.

@sun-geo
Copy link
Author

sun-geo commented Nov 18, 2020

My idea:

open; Mo-Fr 09:00-17:00 off
Mo-Fr 09:00-17:00

Interesting, the request was related in usage of date/time values for traffic signs. I never used the open / closed / off syntax in combination with traffic sign tagging. Do you think it would be okay? Or you want to use the syntax just for an internal converting function?

Edit
Oh, i see, your mentioned statement (open; Mo-Fr 09:00-17:00 off) seems already working:
https://openingh.openstreetmap.de/evaluation_tool/?EXP=open%3B%20Mo-Fr%2009%3A00-17%3A00%20off&lat=48.7769&lon=9.1844&mode=0&DATE=1605714780000

@ypid
Copy link
Member

ypid commented Nov 18, 2020

Yes, it is already supported (for years already). I guess now that I read it a second time, I don’t see anything wrong with this so I would say you can use it.

@ypid ypid added status: feedback needed Further discussion is needed to determine this issue's scope and/or implementation. and removed type: question Meta topic that is not about a bug or feature of the software. labels Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback needed Further discussion is needed to determine this issue's scope and/or implementation.
Projects
None yet
Development

No branches or pull requests

2 participants