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

Allow (again) recursion for the `next_change()` method #10

Closed rezemika closed 6 years ago

rezemika commented 6 years ago

The following concerns the new-parsing branch.

The commit 754060b rewrites a large part of the code, but makes the recursion of the next_change() method inoperative. If someone has any idea of how to do that (or to do better!), please don't hesitate to propose a pull request!

The goal is to get the true next change for a field like Mo-Fr 00:00-24:00. Currently, for a test from a Monday, it will return 24:00 on Monday, it should return 24:00 on Friday.

Here is the concerned method: https://github.com/rezemika/humanized_opening_hours/blob/754060bca1ccef7d1aa8e6e6e8107c981725feee/humanized_opening_hours/main.py#L348-L377

rezemika commented 6 years ago

Fixed by 3db017e!