Function to support event categories
Function returns only holiday tagged with the supplied category.
This can be useful for selecting categories, as mentioned in https://bugs.kde.org/show_bug.cgi?id=365153#c6
The function holidays
was overloaded with (startDate, endDate, category)
.
The test file was adapted. Here is the output:
PASS : HolidayRegionTest::initTestCase()
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() This regionCode = "calendar_systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Is valid? = true
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Country code = "CALENDAR"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Language code = "systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Name = "Multiple Calendar Systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Description = "A test file for multiple calendar systems"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems()
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Parsing regionCode = "calendar_systems" start date = "2020-07-01" end date = "2021-06-30" category = "seasonal"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-09-22" Duration = 1 Name = "September-Tagundnachtgleiche"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2020-12-21" Duration = 1 Name = "Wintersonnenwende"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2021-03-20" Duration = 1 Name = "März-Tagundnachtgleiche"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems() Date = "2021-06-21" Duration = 1 Name = "Sommersonnenwende"
QDEBUG : HolidayRegionTest::testLoadFileCalendarSystems()