Fix #5231
This commit is contained in:
parent
7dbbe8e581
commit
87e098f8a5
1 changed files with 10 additions and 4 deletions
|
@ -1790,12 +1790,14 @@ public class OpeningHoursParser {
|
|||
}
|
||||
}
|
||||
String basicRuleComment = null;
|
||||
if (sequences.size() > 1) {
|
||||
for (BasicOpeningHourRule bRule : basicRules) {
|
||||
if (!Algorithms.isEmpty(bRule.getComment())) {
|
||||
basicRuleComment = bRule.getComment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Algorithms.isEmpty(basicRuleComment)) {
|
||||
for (BasicOpeningHourRule bRule : basicRules) {
|
||||
bRule.setComment(basicRuleComment);
|
||||
|
@ -2231,5 +2233,9 @@ public class OpeningHoursParser {
|
|||
testInfo("16.02.2018 14:00", hours, "Will close at 15:00");
|
||||
testInfo("16.02.2018 16:00", hours, "Will open at 17:00");
|
||||
testInfo("16.02.2018 18:00", hours, "Open till 23:00");
|
||||
|
||||
hours = parseOpenedHours("Mo-Fr 10:00-21:00; Sa 12:00-23:00; PH \"Wird auf der Homepage bekannt gegeben.\"");
|
||||
testParsedAndAssembledCorrectly("Mo-Fr 10:00-21:00; Sa 12:00-23:00; PH - Wird auf der Homepage bekannt gegeben.", hours);
|
||||
System.out.println(hours);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue