Closed berkes closed 5 years ago
You are right it never worked. I kept it to remind myself to correct this. The interpreter on http://openingh.openstreetmap.de/evaluation_tool/?EXP=2017%20Dec%2015-2018%20Jan%2015%2000%3A00-03%3A00%2C10%3A00-24%3A00&lat=48.7769&lon=9.1844&mode=0&DATE=1514648520000&diff_value=2017%20Dec%2015-2018%20Jan%2015%20Mo%2010%3A00-24%3A00%3B%202017%20Dec%2015-2018%20Jan%2015%20Tu%2000%3A00-03%3A00 is actually wrong, those two are not similar : "2017 Dec 15-2018 Jan 15 00:00-03:00,10:00-24:00" gives
while "2017 Dec 15-2018 Jan 15 Mo 10:00-24:00; 2017 Dec 15-2018 Jan 15 Tu 00:00-03:00" gives
So it's not just esthetical. I'll try to fix this tonight but from memories it's a pretty difficult problem to solve. I'll keep you up to date.
actually @berkes it was easier than I thought, https://github.com/Publidata/opening_hours_converter/pull/14 fix it.
There was a problem with intervals starting with a weekday higher than the end day (from sunday to monday in the spec).
I released a new version with the fix (1.7.19) feel free to reopen.
Test
rspec ./spec/opening_hours_builder_spec.rb:463
fails.It looks like this test has never worked, according to git-bisect the first commit where this started failing, is the commit where it was introduced.
I'm not familiar enough with
opening_hours_rule.rb
yet to understand where the decision to place a;
or a,
is made.According to the specs, both are similar, just different in presentation. The first, however, is cleaner, but means the same as the last. So if it is enough to simply rewrite the test, I can do that.