# SPDX-License-Identifier: MIT
# Holiday file for Taiwan
# Derived from the Python holidays project at
# https://github.com/vacanza/holidays
#
# See important caveats in the README file in this directory.

OMIT 1 January MSG %"中華民國開國紀念日%" %! %b.
REM 1 January OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG %"中華民國開國紀念日（慶祝）%" %! %b.
REM 1 January OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 1, 1)), 0, 6)] MSG %"中華民國開國紀念日（慶祝）%" %! %b.
OMIT 28 February MSG %"和平紀念日%" %! %b.
REM 28 February OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 28)), 0, 6)] MSG %"和平紀念日（慶祝）%" %! %b.
REM 28 February OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 2, 28)), 0, 6)] MSG %"和平紀念日（慶祝）%" %! %b.
REM 2 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T+2) == 0] MSG %"兒童節（慶祝）%" %! %b.
REM 3 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T+1) == 2] MSG %"兒童節（慶祝）%" %! %b.
REM 3 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T+1) == 3] MSG %"兒童節（慶祝）%" %! %b.
REM 3 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T+1) == 5] MSG %"兒童節（慶祝）%" %! %b.
REM 3 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T+1) == 6] MSG %"兒童節（慶祝）%" %! %b.
OMIT 4 April MSG %"兒童節%" %! %b.
REM 4 April OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 4)), 0, 6)] MSG %"清明節（慶祝）%" %! %b.
REM 4 April OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 4, 4)), 0, 6)] MSG %"清明節（慶祝）%" %! %b.
REM 5 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-1) == 1] MSG %"兒童節（慶祝）%" %! %b.
REM 5 April ADDOMIT SCANFROM -28 SATISFY [wkdaynum($T-1) == 4] MSG %"兒童節（慶祝）%" %! %b.
OMIT 10 October MSG %"中華民國國慶日%" %! %b.
REM 10 October OMIT SAT SUN AFTER ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 10)), 0, 6)] MSG %"中華民國國慶日（慶祝）%" %! %b.
REM 10 October OMIT SAT SUN BEFORE ADDOMIT SCANFROM -28 SATISFY [isany(wkdaynum(date($Ty, 10, 10)), 0, 6)] MSG %"中華民國國慶日（慶祝）%" %! %b.
