KDE PIM/KHolidays/GCI

From KDE Community Wiki

Task: Create new holiday data files to be used by the KHolidays library. A holiday file defines generic rules for calculating holidays for any given year, which can then be displayed in a calendar or used in financial applications. KDE currently supports about 65 countries, but that means there are about 150 still remaining to be added.

Time to complete task: About 2 hours per holiday file, but may be more depending on complexity and availability of reliable data. Complete x holiday files to complete a task.

See Desktop Summit talk, wiki pages, code repository, and bug list for more details on Holiday data.

Decide on a country/language to implement. Find out the corresponding ISO Country and Langauge codes.

You may not need to know the language as you may be able to find a source that provide cross-references or enable you to make educated guesses. If you are uncertain of translations and KDE has a translation team for that language then you can check with them.

Try find at least two sources for the information that are not restricted by copyright or licence restrictions, at least one of which must be in English. Wikipedia is a good initial starting point as it usually has a basic list of holidays in English and often in the target language as well, either on the English page or the local language version of Wikipedia (try clicking the language links on the bottom left of the page). If possible find an official government source for the data in both the target language and in English, official tourism boards may have this information. Document these sources in the file. The Mozilla data files may be useful for specific observance dates but do not provide generic rules. Note, do not use websites like xxx as primary sources due to license restrictions, but they may be used to confirm your sources are accurate.

As a minimum, all official public holidays must be included, i.e. those days mandated by central government when the entire country has a day off.

Regional holidays can also be included but should not be marked as days off for the entire country. If a region has many holidays then a separate file can be created just for that region with the days marked as days off.

Religious holidays can be included if they are culturally significant in the target country, but don't add them for countries where a significant number of people may be annoyed by their appearance in their calendar. You can document them in the comments however for future use when categories are implemented.

Likewise with significant cultural or commercial holidays like Valentines Day and Halloween.

Some countries have rules for moving some holidays when they fall on a weekend. Try find out what these rules are and include them in the file.

Holidays can be defined in the Islamic calendar, but this uses the civil version and not the lunar version and so may differ by 1 or 2 days from the real observation, but this is close enough for our purposes.

Holidays defined in the Chinese calendar cannot be defined in a generic rule for now. Instead document in the comments what the rule is, then try find out the actual observance date for each year in the period 2000 to 2025 and hard code these in the file. Be very careful with using dates from one country in another country, cultural observance does vary for what days get observed. [Note this may take longer than the average, extra credit will be given].

Try to find out any rules for Daylight Savings or Summer Time.

Try to find out when the target country considers the seasons change, this may not be when you expect.

Try document any historic changes of holidays observed, i.e. if there was a one-off holiday 5 years ago or a current holiday only started 3 years ago. Documenting/supporting all holiday changes since 2000 would be useful, prior to this is entirely optional.

Create the file in the target language, with inline comments describing the holiday name and rule in English. This will make future maintenance easier and help when proper translation is implemented in a future release. If English is a commonly used language in the target country then you may want to create a separate file for the holidays in English.

Try testing the file for yourself. If you don't have or can't checkout and build a copy of the code, you can copy the file into your system holiday file directory and test it from there.

Once done, submit to me for confirmation and inclusion in the next KDE release.