Repository navigation
fix(TW): substitute days, Children's Day and the 2025 holidays act - #734
Merged
commenthol merged 1 commit intoNov 29, 2026
Merged
Conversation
- Substitute days follow the DGPA rules: a holiday on a Saturday is observed on the previous Friday, on a Sunday on the next Monday. - Chinese New Year days on a weekend are observed after the holiday; replaces the "4th day" and "Saturdayif" rules. - Children's Day is the day before Tomb Sweeping Day when both fall on the same day, or the day after when that is a Thursday. - Commemoration Days and Holidays Implementation Act (2025-05-28): the day before New Year's Eve, Labour Day, Confucius' Birthday, Retrocession Day and Constitution Day are public holidays. Checked against the DGPA government office calendars for 2017-2027. Closes commenthol#490 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #490. Thanks @bai-yi-bai for the report and the DGPA links.
Taiwan's public holidays now match the government office calendars of the DGPA (行政院人事行政總處) for 2017–2027:
disable/enable.Sources (cited in the YAML):
How I checked: I compared every weekday day off in the DGPA CSVs for 2017–2027 with the public holidays from
new Holidays('TW'); all 11 years match. The calendars also have extra days off that are made up on a Saturday (調整放假, and 小年夜 before 2026). Those aren't included, as for CN, since the make-up working day can't be expressed.Not covered:
Tests:
npx mocha test/all.mocha.js --writetests --countries TWregenerated TW-2015…2029.npm testpasses except the CK fixtures. Those fail only on my macOS clone, becauseCK-MITIARO-*andCK-Mitiaro-*collide on a case-insensitive filesystem.npm run lintis clean.Written with help from Claude Code.