diff --git a/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java b/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java index 723ed50128..2159d41382 100644 --- a/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java +++ b/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java @@ -1196,6 +1196,17 @@ public class OpeningHoursParser { return false; } + public boolean isOpenedEveryDay() { + boolean openedEveryDay = true; + for (int i = 0; i < 7; i++) { + if (!days[i]) { + openedEveryDay = false; + break; + } + } + return openedEveryDay; + } + @Override public String getTime(Calendar cal, boolean checkAnotherDay, int limit, boolean opening) { StringBuilder sb = new StringBuilder(); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java index f476a7528a..4c52132564 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/BasicEditPoiFragment.java @@ -148,6 +148,9 @@ public class BasicEditPoiFragment extends BaseOsmAndFragment } public void setBasicOpeningHoursRule(BasicOpeningHourRule item, int position) { + if (item.getStartTime() == 0 && item.getEndTime() == 0 && item.isOpenedEveryDay()) { + item.setEndTime(24 * 60); + } mOpeningHoursAdapter.setOpeningHoursRule(item, position); }