Closed TariqAHassan closed 5 years ago
Thank you for your report! However, this is a normal behavior.
Indeed, it is theoretically possible to automatically fix this field, but currently, there is nothing in the code to remove "AM" / "PM" or to fix the weekday names. It may be added, but unfortunately, I am very busy these days. If the support of these errors is crucial to you, you can try to fix the field before parsing with this library: https://github.com/rezemika/oh_sanitizer
Sorry for the inconvenience!
@rezemika
No worries. Thanks for the reply.
The parser will fail against opening hours that contain nonstandard days of the week abbreviations and the presence of 'AM' and / or 'PM'.
For example,
"Mon-Sat 11:30AM-10PM"
will fail on both of the counts above (see OSM node30899821
). Moreover, the lack of:00
seems to confuse it as well.Python 3.6.5 :: Anaconda, Inc.
Error:
In order for the string to be parsed correctly, it must be modified to:
'Mo-Sa 11:30-22:00'
.Great job on the package overall. I know that this is a hard problem!