rezemika / humanized_opening_hours

A parser for the opening_hours fields from OpenStreetMap
GNU Affero General Public License v3.0
26 stars 20 forks source link

Fix OverflowError when no rule exists in the future #35

Closed amatissart closed 5 years ago

amatissart commented 5 years ago

opening_hours values such as 2018 Jul 02- 2018 Sep 02 Mo-Su 08:00-20:00 (with limited timespan) cause next_change to raise an OverflowError.

This PR suggests to limit the number of iterations to find a date when a "current rule" applies.

rezemika commented 5 years ago

It's merged! Thank you for you work! :)