[Tagging] opening_hours and related tags: hours past 24:00

Simon Poole simon at poole.ch
Sat Oct 16 15:53:11 UTC 2021


Am 16.10.2021 um 12:09 schrieb Yves via Tagging:
> If 06:00-25:00 is supposed to be valid, I think it's worth adding as 
> an exemple on the wiki as some would find it weird.

It is literally the correct grammar.

Now the case to do it this way, is likely due to be able to have time 
ranges where the end time is numerically larger than the start time, so 
say something like

22:00-47:00

which is not the same as

22:00-23:00

To further use this example, all ranges starting with 22:00 with end 
times up to 21:59

22:00-21:59

can be unambiguously parsed without reverting to the extended notation.

I would support changing the specification to make this a legit part of 
the grammar, but in a non-haphazard fashion that allows the previous 
valid values to work going forward.

Simon

> Yves
>
> Le 16 octobre 2021 09:09:16 GMT+02:00, "Shawn K. Quinn" 
> <skquinn at rushpost.com> a écrit :
>
>     So apparently at least two different validators disagree on which is
>     valid syntax for opening times stretching beyond midnight:
>
>     opening_hours=Fr-Sa 06:00-01:00
>     opening_hours=Fr-Sa 06:00-25:00
>     opening_hours=Fr 06:00-24:00; Sa 00:00-01:00,06:00-24:00; Su 00:00-01:00
>
>     (pretend the third one is all on one line; Thunderbird is being weird
>     about line wrapping)
>
>     JOSM throws a warning for the first but not the second. Apparently
>     Osmose throws a warning for the second but not the first. The third is
>     unquestionably valid in any validator but (at least IMHO) needlessly
>     inefficient and clumsy, and something I'd rather avoid having to resort to.
>
>     The second has always made more sense to me and I get the impression
>     that it's actually the preferred syntax per the formal specification on
>     the wiki (search for "extended_hour"). Unfortunately none of the
>     examples use it outside of 24:00 (the midnight on which a day ends, i.e.
>     Fr 24:00 and Sa 00:00 would be the same time) so there are some who
>     don't think it's valid syntax. Are there any programs which use OSM data
>     which have issues with hour values above 24, either choking outright or
>     which interpret them in a buggy fashion? Should bugs be filed with JOSM
>     and/or Osmose about this?
>
>     -- Shawn K. Quinn <skquinn at rushpost.com>
>     http://www.rantroulette.com <http://www.rantroulette.com>
>     http://www.skqrecordquest.com <http://www.skqrecordquest.com>
>     ------------------------------------------------------------------------
>     Tagging mailing list Tagging at openstreetmap.org
>     https://lists.openstreetmap.org/listinfo/tagging
>     <https://lists.openstreetmap.org/listinfo/tagging>
>
>
> _______________________________________________
> Tagging mailing list
> Tagging at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/tagging
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tagging/attachments/20211016/b695bd01/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/tagging/attachments/20211016/b695bd01/attachment.sig>


More information about the Tagging mailing list