[Kmymoney-devel] [Bug 221800] Make use of KGlobal::locale to calculate the working week and KHolidays for other non-working days

Ian Neal iann_bugzilla at blueyonder.co.uk
Fri Jan 8 15:01:25 CET 2010


https://bugs.kde.org/show_bug.cgi?id=221800





--- Comment #1 from Ian Neal <iann_bugzilla blueyonder co uk>  2010-01-08 15:01:24 ---
Created an attachment (id=39687)
 --> (http://bugs.kde.org/attachment.cgi?id=39687)
HolidayRegion patch v0.1

This patch makes the following changes:
* Switch from MoveFriday/MoveMonday to MoveBefore/MoveAfter for use with
scheduled transactions;
* Strings with Friday / Monday now use previous / next working day;
* Strings with Weekend now use non-working days;
* Removed duplicate code from kenterscheduledlg.cpp and got it to use the code
from mymoneyscheduled.cpp;
* Added UI to scheduled transactions settings page to be able to select
relevant holiday calendar that the OS knows about as well as a (None) option;
* Added routine to calculate working week from KGlobal::locale() to
kmymoney.cpp;
* Added methods to mymoneyscheduled.cpp to read/write holiday region and
working week for scheduled transactions;
* Added defaults for holiday region (gb) and working week (Monday-Friday) to
mymoneyscheduled.cpp;
* In mymoneyscheduled.cpp split some of the code out of adjustedNextDueDate to
create adjustedDate so that kenterscheduledlg.cpp could use it instead of
duplicating code;
* Rewrote the code in adjustedDate to it reflects the locale's working week and
the selected holiday region;
* Added a new test that makes sure the working week is set correctly and
working/non-working days are identified correctly;
* Added further tests to testAdjustedNextDueDate to make sure that the adjusted
date is correct for non-working days not just weekends;
* Corrected it's vs its in various comments throughout code.

KHoliday assumes that any day marked as red or weekend is a holiday and at the
moment it has no concept of financial holidays so I've worked with what it has
provided.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list