Bug 441738

Summary: Hong Kong (English) Lunar New Year 2021 is incorrect.
Product: [Applications] korganizer Reporter: gjditchfield
Component: monthviewAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.18.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description gjditchfield 2021-08-30 03:20:28 UTC
SUMMARY
Lunar New Year is a three-day holiday, but for 2021 it is reported on 4 days: Feb 12 to 15.  It actually ran from the 12th to the 14th.

STEPS TO REPRODUCE
1. Add Hong Kong (English) to KOrganizer's holidays.
2. Restart KOrganizer and view Feb 11—16 in the Agenda view.
3. Run KOrganizer in a debugger and inspect the result of the call to region.holidays(date) in CalendarSupport::holiday(QDate date)

ADDITIONAL INFORMATION
See also bug 187116.

France's Pâques, April 4—5 2021, is a multi-day holiday that is calculated correctly, so I suspect the data, not the code.
Comment 1 2wxsy58236r3 2021-08-30 06:09:28 UTC
Please see:

https://www.gov.hk/en/about/abouthk/holiday/2021.htm
https://www.elegislation.gov.hk/hk/cap149?xpid=ID_1438402723351_002

> (c) Lunar New Year’s Day (or if that day is a Sunday, then the fourth day of Lunar New Year); (Amended 23 of 2011 s. 3)
> (d) the second day of Lunar New Year (or if that day is a Sunday, then the fourth day of Lunar New Year); (Amended 23 of 2011 s. 3)
> (e) the third day of Lunar New Year (or if that day is a Sunday, then the fourth day of Lunar New Year); (Amended 23 of 2011 s. 3)

Feb 14 2021 is the third day of Lunar New Year, and is also a Sunday, so Feb 15 is the substitute holiday. For convenience it (Feb 14) is also marked as Lunar New Year.
Comment 2 gjditchfield 2021-08-30 19:27:21 UTC
So KOrganizer's Month view is wrong; it should show a holiday on the 15th.
Comment 3 Bug Janitor Service 2021-09-07 01:05:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/calendarsupport/-/merge_requests/29
Comment 4 gjditchfield 2021-09-08 02:10:02 UTC
Git commit 8d5ee7e4b131b5ed6f7418767b16654843a995f9 by Glen Ditchfield.
Committed on 06/09/2021 at 22:31.
Pushed by gditchfield into branch 'release/21.08'.

Remove all days of multi-day holidays from the workday list

M  +4    -5    src/utils.cpp

https://invent.kde.org/pim/calendarsupport/commit/8d5ee7e4b131b5ed6f7418767b16654843a995f9