Bug 445962

Summary: 24/7 with other rules
Product: [Applications] KOpeningHours Reporter: HubMiner <cal030>
Component: generalAssignee: Volker Krause <vkrause>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description HubMiner 2021-11-23 05:30:22 UTC
Input:
    Friday and Saturday 24/7 Sunday-Thursday 4:00 am to 12:00 am
Current output:
    Fr,Sa, 24/7; Su-Th 04:00-24:00
Desired output:
    Fr,Sa 00:00-24:00; Su-Th 04:00-24:00

1) There should not be a comma after Sa.
2) "24/7" implies it is a complete rule (always open). If any other specifiers are present before or after it, it needs be converted to 00:00-24:00.
Comment 1 Bug Janitor Service 2021-11-23 17:12:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/kopeninghours/-/merge_requests/80
Comment 2 David Faure 2021-12-04 19:03:56 UTC
Git commit ca23f1658b9a2eb6b3b1292c15459eefabacfc3c by David Faure, on behalf of Volker Krause.
Committed on 04/12/2021 at 19:03.
Pushed by dfaure into branch 'release/21.12'.

Convert 24/7 rules to timespan selectors when used in a timespan context

This only covers cases where we even get here due to parser error recovery
though, other variants found in the OSM corpus fail to parse already. But
that's the important part for Osmose's correction suggestions.

M  +6    -0    autotests/parsertest.cpp
M  +9    -0    src/lib/openinghours.cpp

https://invent.kde.org/libraries/kopeninghours/commit/ca23f1658b9a2eb6b3b1292c15459eefabacfc3c