Bug 407800 - 21st June 2019 shows as non-processing day when holiday calendar is configured
Summary: 21st June 2019 shows as non-processing day when holiday calendar is configured
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-21 14:42 UTC by Ian Neal
Modified: 2019-06-26 09:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Neal 2019-05-21 14:42:39 UTC
SUMMARY
When a transaction is scheduled to fall on Friday 21st June 2019 and it is configured to change it to next processing day, the transaction is shown as happening on Monday 24th June 2019

STEPS TO REPRODUCE
1. Set holiday calendar to be England and Wales
2. Create a monthly scheduled transfer to happen on Friday 21st June 2019
3. Set non-processing option to be on next processing day
4. Look at ledger for one of the accounts transfer is happening between

OBSERVED RESULT
Processing date is Monday 24th June 2019

EXPECTED RESULT
Processing date is Friday 21st June 2019

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 28
(available in About System)
KDE Plasma Version: 5.13.5-1
KDE Frameworks Version: 5.55.0
Qt Version: 5.11.3
Using git master: 5.0.80-db7ccf17d

ADDITIONAL INFORMATION
Looked at https://cgit.kde.org/kholidays.git/tree/holidays/plan2/holiday_gb-eaw_en-gb?h=v5.55.0

If you set holiday calendar to (none) then processing date shows correctly. I've tested about 12 other calendars and they all seem to move 21st to a future date. Some e.g. Canada and France, move it to 25th even though I can not see a holiday on 24th June either.
Canada's calendar - https://cgit.kde.org/kholidays.git/tree/holidays/plan2/holiday_ca_en-gb?h=v5.55.0
Comment 1 Jack 2019-05-21 16:06:17 UTC
I believe 21 June is Solstice Day in Canada (and elsewhere.)  However, I agree there is something funny going on with KDE holiday calendars.  I added Canada to my US holidays by configuring the digital clock on the panel, and it shows up there, but even separately adding Canada holidays to korganizer, I don't see them there.  Unfortunately, I have no idea where to post this, but I strongly suspect it's not a KMM specific issue.
Comment 2 Thomas Baumgart 2019-05-21 19:36:40 UTC
I added John to the CC list. Maybe he has an idea of what might be going on here or where to look for more details.
Comment 3 Thomas Baumgart 2019-06-25 19:17:09 UTC
Git commit 02e5037185496d070bc1ebbcdc3034f9a1cded77 by Thomas Baumgart.
Committed on 25/06/2019 at 19:15.
Pushed by tbaumgart into branch '5.0'.

Treat special days as processing days if they are workdays

The holiday list contains entries that shows special events that are
working days. Nevertheless, KMyMoney treated them as non processing
days.

This change makes sure to treat those entries as processing days.
FIXED-IN: 5.0.5

M  +9    -8    kmymoney/kmymoney.cpp

https://commits.kde.org/kmymoney/02e5037185496d070bc1ebbcdc3034f9a1cded77
Comment 4 Jack 2019-06-25 19:39:16 UTC
Yes there are "special days" which are NOT holidays and so still processing days.  However, is it certain there are no such days which really are holidays during the week?  There are certainly holidays which fall on weekdays.  For special days which are weekdays - how can we tell if they are true non-processing holidays, or just special events which are not holidays?
Comment 5 Thomas Baumgart 2019-06-26 09:51:59 UTC
We rely on the KHolidays package at this point. The data for the various regions can be found at https://cgit.kde.org/kholidays.git/tree/holidays/plan2. Within this data 'The "public" category caries the extra meaning of being a day off.' (seen in https://cgit.kde.org/kholidays.git/tree/holidays/file-format.txt)