Re: [OSM-dev] JavaScript Opening Hours Parser

2013-05-05 Thread Rob Nickerson
Good idea,

A couple of values that gave incorrect results:

Mo-Fr 08:62-27:88
Mo-Fr 09:00-16:00; Su 11-12
mo-we 12:00-15:00; Su off
24/7
we 09:00-12:00,13:30-15:00

The first is obviously incorrect so should produce an error rather than
attempting to parse it.

In the second and third example, when you type Su the parser assumes that
the same times should be applied to the Sunday. It sticks with this
assumption until a correctly formatted time is entered (in this case it
should be 11:00-12:00), but does not recognise off as a correct time
interval even though it is common use.

The fourth value is the most common (as shown on taginfo). It is not parsed
at all.

The fifth represents a lunch time break. The parser picks up the initial
part only.

Cheers,
Rob

(p.s I expect that some of these might be simply that the parser shows the
last correctly entered value until a new valid (an interpretable) value is
given.
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] JavaScript Opening Hours Parser

2013-05-05 Thread Henning Scholland

Hi,
maybe talk to user Netzwolf, who developed already a very extended 
parser for opening_hours.


See http://www.netzwolf.info/en/cartography/osm/time_domain/form_hours

Henning

Am 04.05.2013 17:06, schrieb Ian Dees:

In an effort to bring opening_hours editing to iD and to make it easier
for businesses to add themselves to OSM, I wrote a bit of JavaScript to
parse existing opening_hours tag values and display them in an
easy-to-read form.

You can give it a try here:
http://osmlab.github.io/jsopeninghours/

Keep in mind that the goal of this is to parse the most common cases and
to not screw up data when it encounters something it can't parse.

Give it a whirl and please submit bugs if you see them. Once this is
robust I'll probably write something to get it in to iD.

Thanks,
Ian


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev




___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev