Closed westnordost closed 11 months ago
This is obviously easy to fix, just did it, not quite sure how the oversight happened in the 1st place though.
However there is the related question as to what strict mode should do now, throw an error or ...?
I'm contemplating moving from two simple flags to an (increasing) strictness level so that the base level could remain compatible with the current behaviour, but it would be easy to cater for other issues in the future. Or simply using individual flags at a more granular level as we discussed in https://github.com/simonpoole/OpeningHoursParser/issues/40
However there is the related question as to what strict mode should do now, throw an error or ...?
Hmm, I guess the same as what the strict mode does when encountering single digits for week numbers or hours. That would be consistent.
A rule like "Jan 05" is parsed correctly, but when the library outputs this value into canonical form, it outputs "Jan 5".
This is not correct according the spec, as should be padded to always have 2 digits. The opening_hours evaluation tool also does this.
See the specification version you link from the readme ( https://wiki.openstreetmap.org/w/index.php?title=Template:Key:opening_hours/specification_table&oldid=1075289 ) but it is the same on the the current specification version.