From 8333eaf17f53bec0bdcb92845cbd55674f05ee74 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 19 Mar 2018 13:43:45 +0200 Subject: [PATCH] Fix #5115 --- OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java index b131da8d40..908a154565 100644 --- a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java +++ b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java @@ -39,6 +39,7 @@ public class OpeningHoursParser { DateFormatSymbols dateFormatSymbols = DateFormatSymbols.getInstance(Locale.US); monthsStr = dateFormatSymbols.getShortMonths(); daysStr = getTwoLettersStringArray(dateFormatSymbols.getShortWeekdays()); + dateFormatSymbols = DateFormatSymbols.getInstance(); localMothsStr = dateFormatSymbols.getShortMonths(); localDaysStr = getTwoLettersStringArray(dateFormatSymbols.getShortWeekdays()); @@ -78,8 +79,8 @@ public class OpeningHoursParser { String[] newStrings = new String[strings.length]; for (int i = 0; i < strings.length; i++) { if (strings[i] != null) { - if (strings[i].length() > 2) { - newStrings[i] = Algorithms.capitalizeFirstLetter(strings[i].substring(0, 2)); + if (strings[i].length() > 3) { + newStrings[i] = Algorithms.capitalizeFirstLetter(strings[i].substring(0, 3)); } else { newStrings[i] = Algorithms.capitalizeFirstLetter(strings[i]); }