Bug 446224 - Do not add month to every date
Summary: Do not add month to every date
Status: RESOLVED FIXED
Alias: None
Product: KOpeningHours
Classification: Applications
Component: normalization (other bugs)
Version First Reported In: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-29 03:35 UTC by HubMiner
Modified: 2021-12-05 11:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description HubMiner 2021-11-29 03:35:28 UTC
Input:
Mo-Fr 08:30-20:30; Sa-Su,PH 08:30-21:30; Jan 20,30,Feb 10,20,Mar 20,30,Apr 20,30,Mar 20,30,Jun 20,30,Jul 20,30,Aug 20,30,Sep 20,30,Oct 20,30,Nov 20,30,Dec 20,30 08:30-21:30

Current:
Mo-Fr 08:30-20:30; Sa-Su,PH 08:30-21:30; Jan 20,Jan 30,Feb 10,Feb 20,Mar 20,Mar 30,Apr 20,Apr 30,Mar 20,Mar 30,Jun 20,Jun 30,Jul 20,Jul 30,Aug 20,Aug 30,Sep 20,Sep 30,Oct 20,Oct 30,Nov 20,Nov 30,Dec 20,Dec 30 08:30-21:30

Expected: Input unchanged: don't add month to every date.
Comment 1 David Faure 2021-12-05 10:30:16 UTC
Hmm, I thought I remembered this was "as per the spec", but a quick look says "daily: months [   monthdays [ , monthdays ]... ]" which would indeed allow this. And https://openingh.openstreetmap.de/evaluation_tool/?setLng=fr#check doesn't warn either.

Then it's just about simplification of the output, should be easy.
Comment 2 Bug Janitor Service 2021-12-05 10:51:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/kopeninghours/-/merge_requests/84
Comment 3 David Faure 2021-12-05 11:06:37 UTC
Git commit 95f816ef64a74db4f47df07e53893c4d9d4ed304 by David Faure.
Committed on 05/12/2021 at 11:04.
Pushed by dfaure into branch 'release/21.12'.

Do not repeat months when unnecessary

M  +14   -12   autotests/parsertest.cpp
M  +1    -1    src/lib/rule.cpp
M  +17   -11   src/lib/selectors.cpp
M  +4    -2    src/lib/selectors_p.h

https://invent.kde.org/libraries/kopeninghours/commit/95f816ef64a74db4f47df07e53893c4d9d4ed304