From 4aa06675ceba7845988fcb4f5682c6bba3c120a3 Mon Sep 17 00:00:00 2001 From: vshcherb Date: Sat, 31 Aug 2013 00:23:36 +0200 Subject: [PATCH] Add parser --- OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java index c0a410b2cf..e993004bbd 100644 --- a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java +++ b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java @@ -461,6 +461,7 @@ public class OpeningHoursParser { // check 24/7 if("24/7".equals(r)){ Arrays.fill(days, true); + Arrays.fill(months, true); basic.addTimeRange(0, 24*60); rs.addRule(basic); return true; @@ -664,6 +665,9 @@ public class OpeningHoursParser { boolean calculated = hours.isOpenedForTime(cal); System.out.printf(" %sok: Expected %s: %b = %b\n", ((calculated != expected) ? "NOT " : ""), time, expected, calculated); + if(calculated != expected) { + throw new IllegalArgumentException("BUG!!!"); + } } public static void main(String[] args) throws ParseException {