[Tagging] opening_hours and related tags: hours past 24:00
Simon Poole
simon at poole.ch
Sat Oct 16 09:00:08 UTC 2021
[resent to full list]
Am 16.10.2021 um 09:09 schrieb Shawn K. Quinn:
> 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.
Your first example isn't correct from a formal definition pov, but can
automatically be fixed up to be valid. The parser JOSM uses has two
modes strict and non-strict, in strict mode it will complain about the
construct as you would expect, in non-strict mode it will remain silent.
The 2nd example is clearly valid and osmose should not be indicating
that as an error (osmose is now on it's 2nd parser implementation and
I'm surprised that it gets so super basic stuff wrong).
Simon
> 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?
>
-------------- 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/7b6caae4/attachment.sig>
More information about the Tagging
mailing list