Skip to content

fix(TW): substitute days, Children's Day and the 2025 holidays act - #734

Merged
commenthol merged 1 commit into
commenthol:masterfrom
jjohnnystwsss:fix/490-taiwan-holidays
Nov 29, 2026
Merged

commenthol merged 1 commit into
commenthol:masterfrom
jjohnnystwsss:fix/490-taiwan-holidays

Conversation

@jjohnnystwsss

Copy link
Copy Markdown
Contributor

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:

  • Substitute days: a holiday on a Saturday is observed on the previous Friday, on a Sunday on the next Monday (Art. 5-1 of the old regulation, in force since 2015). Apart from New Year's Day, the holidays only had the Sunday rule.
  • Chinese New Year: days of the holiday on a weekend are observed on the working days after it. The holiday ends on the 3rd day, so the weekday of the 3rd day gives the substitute days. This replaces the "4th day" and the "Saturdayif" rule (2019 and 2022 listed a 4th day that wasn't a day off).
  • Children's Day and Tomb Sweeping Day: when both fall on April 4, Children's Day is the day before, or the day after when April 4 is a Thursday. Tomb Sweeping Day is always April 4 or 5 (1950–2100), so Children's Day is the day before it, and the Thursday years (2013, 2024, … 2097) are moved with disable/enable.
  • Commemoration Days and Holidays Implementation Act, in force since 2025-05-28: the day before New Year's Eve (from 2026), Labour Day, Confucius' Birthday / Teachers' Day (9/28), Taiwan Retrocession and Guningtou Victory Day (10/25) and Constitution Day (12/25) are now public holidays. Their old observance entries end on 2025-05-28.

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:

  • Substitute rules are applied to all years, as before. I couldn't find an official source for the rules before 2015.
  • 9/28 and the Mid-Autumn Festival fall on the same day in 2042, 2061 and 2080. There is no precedent for that yet, so they just overlap.

Tests:

  • npx mocha test/all.mocha.js --writetests --countries TW regenerated TW-2015…2029.
  • npm test passes except the CK fixtures. Those fail only on my macOS clone, because CK-MITIARO-* and CK-Mitiaro-* collide on a case-insensitive filesystem.
  • npm run lint is clean.

Written with help from Claude Code.

- 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>
@bai-yi-bai

Copy link
Copy Markdown

Thank you!

@commenthol
commenthol merged commit 2b809a1 into commenthol:master Nov 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

中華民國 Taiwan Holidays Calculation Incorrect

3 participants