Skip to content

feat(KR): add substitute holiday (대체공휴일) support - #641

Merged
commenthol merged 1 commit into
commenthol:masterfrom
g1mn:feat/kr-substitute-holidays
Jul 26, 2026
Merged

feat(KR): add substitute holiday (대체공휴일) support#641
commenthol merged 1 commit into
commenthol:masterfrom
g1mn:feat/kr-substitute-holidays

Conversation

@g1mn

@g1mn g1mn commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add substitute-day (대체공휴일) rules for Korea: Children's Day, Independence Movement Day, Liberation Day, National Foundation Day, Hangul Day, Buddha's Birthday, Christmas Day and Constitution Day, each active from the year its substitute rule took legal effect (2014 / 2021 / 2023 / 2026 depending on the holiday).
  • Seollal and Chuseok get explicit dated entries instead of a generic rule: their 3-day block can be pushed by either a Sunday overlap or an overlap with another public holiday (e.g. Chuseok colliding with National Foundation Day), and the existing korean 01-0-01 P3D rule for Seollal is anchored one day later than the real 전날/당일/다음날 window, so a rule computed against it directly would land on the wrong date. Entries are computed from the corrected window and cover 2014-2050 (see comment in the yaml for details/limitations).
  • Verified against known real-world substitute dates, e.g. 2018 (no Seollal substitute), 2024-02-12 (Seollal), 2025-05-06 (Children's Day/Buddha's Birthday collision), 2017-10-06 (Chuseok/National Foundation Day collision).

Test plan

  • npm run build
  • npm test (regenerated test/fixtures/KR-*.json, full suite passing: 5373 tests)
  • Cross-checked computed substitute dates for 2014-2050 against public sources for several representative years

Closes #640

Add substitute-day rules for Children's Day, Independence Movement Day,
Liberation Day, National Foundation Day, Hangul Day, Buddha's Birthday,
Christmas Day and Constitution Day when they fall on a weekend, each
effective from the year its substitute rule took legal effect.

Seollal and Chuseok need separate explicit-date handling: their 3-day
block can overlap either a Sunday or another public holiday, and the
existing korean 01-0-01 P3D rule is anchored one day later than the
real 전날/당일/다음날 window. Entries are computed from the corrected
dates and cover 2014-2050.

Closes commenthol#640
@commenthol
commenthol merged commit 3d065b4 into commenthol:master Jul 26, 2026
2 checks passed
@commenthol

Copy link
Copy Markdown
Owner

Many thanks.

@g1mn
g1mn deleted the feat/kr-substitute-holidays branch July 26, 2026 11:22
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.

Korean substitute holiday (대체공휴일) rules are not implemented in KR.yaml

2 participants