Opened 3 years ago
Closed 3 years ago
#21853 closed defect (fixed)
[patch] Validator - unusual value of interval
Reported by: | nlehuby | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 22.02 |
Component: | Core validator | Version: | |
Keywords: | public_transport interval | Cc: |
Description (last modified by )
The validator raises warning of values of interval tags that seems legit:
for instance interval=120
(As interval=90 is ok, I can't see why 120 won't be, it is also a number of minutes)
And BTW, it does not raise on 01:30:90 which is not ok
Attachments (1)
Change History (11)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
Summary: | Validator - unusual value of interval → [patch] Validator - unusual value of interval |
---|
follow-up: 6 comment:3 by , 3 years ago
How to tag an interval of several days? For a weekly interval I used 168:00:00
but that will still raise a warning. I could use only minutes, though, I do not like interval=10080
.
It might be better to split the regex into two parts. One for only numbers (minutes) and one for the HH:MM:SS
with :
.
follow-up: 5 comment:4 by , 3 years ago
It might be better to split the regex into two parts. One for only numbers (minutes) and one for the HH:MM:SS with :.
I don't understand, it is already the case, the regexp is in two parts with a | between the two expressions
comment:5 by , 3 years ago
Replying to nlehuby:
It might be better to split the regex into two parts. One for only numbers (minutes) and one for the HH:MM:SS with :.
I don't understand, it is already the case, the regexp is in two parts with a | between the two expressions
I am sorry, I misread the patch.
comment:6 by , 3 years ago
Replying to skyper:
How to tag an interval of several days? For a weekly interval I used
168:00:00
but that will still raise a warning. I could use only minutes, though, I do not likeinterval=10080
.
For public transport interval at least, interval tag should be used in addition with opening_hours tag, and it could be better suited for weekly interval
For instance, for a municipal shuttle bus to the city market on Wednesday morning, I would use instead opening_hours = We 10:00-12:00 and no interval tag
comment:7 by , 3 years ago
Sorry, my example was bad.
Especially, with ferries I knew some that sailed only every three, four or five days. This cannot be expressed in opening hours. Sorry, I do not find the timetables atm.
comment:9 by , 3 years ago
Keywords: | interval added |
---|---|
Milestone: | → 22.02 |
Yes, thanks.
No translation updated needed.
Here is attached a patch with a new regexp to fix both issues