Summary: | Winter solstice inappropriately listed as a holiday | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kholidays | Reporter: | Lukas Sommer <sommerluk> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate, plasma-bugs, postix, spitz234, winter |
Priority: | NOR | ||
Version: | 5.88.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=465539 | ||
Latest Commit: | https://invent.kde.org/frameworks/kholidays/commit/58c51df658c04361e648adcee711d3ae28289a9c | Version Fixed In: | |
Sentry Crash Report: |
Description
Lukas Sommer
2021-11-11 10:50:21 UTC
If you do have the plugin enabled, does it show up twice on that day? That's what happens for me. This indicates that the same event is coming from multiple calendar plugins. Do you have any holiday plugins also enabled? If you turn those off, does the last occurrence of the event finally disappear? > If you do have the plugin enabled, does it show up twice on that day? That's what happens for me. Indeed, if both (Astronomical events and Holidays) are enabled, I see it twice also. > Do you have any holiday plugins also enabled? I'm using ci_fr, but I've also tested with at_de, and it's the same problem. > If you turn those off, does the last occurrence of the event finally disappear? If both (Astronomical events and Holidays) are disabled, indeed the last occurrence of the event finally disappears. I can reproduce with the en_us holiday package, so it seems to be a problem that's not unique to a single one. Moving to the kholidays framework. To the Digital Clock people: The solstice and equinox "holidays" are added to the Holiday list unconditionally. the holiday class has a categoryList. look in that list for QLatin1String("seasonal") filter on that. Can we remove them from the holidays lists? They aren't holidays... *** Bug 446329 has been marked as a duplicate of this bug. *** I searched and played around with kholiday. I found out, when I comment at function https://lxr.kde.org/source/frameworks/kholidays/src/parsers/holidayparserdriver.cpp#0049 > Holiday::List HolidayParserDriver::parseHolidays(const QDate &startDate, const QDate &endDate) following rows >// for (int year = startDate.year(); year < endDate.year(); ++year) { >// for (auto s : {AstroSeasons::JuneSolstice, AstroSeasons::DecemberSolstice, AstroSeasons::MarchEquinox, AstroSeasons::SeptemberEquinox}) { >// const auto dt = AstroSeasons::seasonDate(s, year); >// if (dt >= startDate && dt <= endDate) { >// Holiday season; >// season.d->mDayType = Holiday::Workday; >// season.d->mObservedDate = dt; >// season.d->mDuration = 1; >// season.d->mName = AstroSeasons::seasonName(s); >// season.d->mCategoryList.append(QLatin1String("seasonal")); >// m_resultList.append(season); >// } >// } >// } everything works as expected. The autotests are also working. But I am not experienced enough to see, what this is good for and what is the influence to other parts. A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kholidays/-/merge_requests/34 A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kholidays/-/merge_requests/38 Git commit 58c51df658c04361e648adcee711d3ae28289a9c by Allen Winter, on behalf of Alois Spitzbart. Committed on 10/04/2022 at 15:26. Pushed by winterz into branch 'master'. New function for plasma to generate holidays without astro seasons This function creates just holidays from the holiday files. Astro seasons are not included, which are calculated. In Plasma can the astro seasons displayed two times. When this function is used, this can prevented. I did get a better name. Maybe someone has a better idea. Would be Plasma as suffix better than Only? This a follow up to https://invent.kde.org/frameworks/kholidays/-/merge_requests/34 M +2 -0 CMakeLists.txt M +6 -0 autotests/CMakeLists.txt M +31 -0 autotests/testholidayregion.cpp M +2 -0 autotests/testholidayregion.h M +4 -0 docs/Doxyfile.local M +8 -1 src/CMakeLists.txt M +9 -0 src/holidayregion.cpp M +44 -0 src/holidayregion.h M +7 -1 src/parsers/holidayparserdriver.cpp M +10 -0 src/parsers/holidayparserdriver_p.h https://invent.kde.org/frameworks/kholidays/commit/58c51df658c04361e648adcee711d3ae28289a9c |