date-holidays icon indicating copy to clipboard operation
date-holidays copied to clipboard

中華民國 Taiwan Holidays Calculation Incorrect

Open bai-yi-bai opened this issue 1 year ago • 3 comments

Hi,

I discovered the public holiday calculation for 中華民國 Taiwan are incorrect when using stretch-my-time-off which uses date-holidays as a source. https://github.com/zachd/stretch-my-time-off/issues/11. I am not a expert on how things work in Taiwan, but these are great tools I want to improve. I didn't want to make a PR because I am not 100% sure how to fix all the problems.

Let's start with the reference calculated dates by date-holidays for 中華民國 Taiwan for 2025 and compare it to official Taiwanese government data. According to Directorate-General of Personnel Administration, Executive Yuan 2025Work Calendar and https://focustaiwan.tw/society/202406270019, there are several discrepancies for 2025, and the DPGA maintains a calendar list going back to 2001.

I found three issues looking at 2025, but there could be more:

  1. 農曆除夕 Chinese New Year starts 2025-01-27 and ends of 2025-01-31
  2. 兒童節 + 淸明節 Children's Day & Tomb Sweeping Day starts 2025-04-03 and ends 2025-04-04
  3. 端午節 Dragon Boat Festival is 2025-05-30

Chinese New Year

It looks like several years are incorrect.

  1. Possible Typo?

https://github.com/commenthol/date-holidays/blob/65b10b7b38585320e111696bf88a4b2461416c88/data/countries/TW.yaml#L27 contains "Saturdayif" is this supposed to contain a space? "Saturday if"?

  1. Possible Incorrect Placement of Conditional for Chinese New Year's Eve / Chinese New Year

Should the "if" statement for "農曆年初一" instead be "除夕" Move it from the first day 一 to the Eve? From line 27 to line 23?

  1. Make-up Days

One other issue with date-holidays is that I'm not sure it can include the concept of work days. For example, 2025-02-08 is a "make-up" work day.

"The day before Lunar New Year's Eve which falls on Jan. 27, a Monday, is also designated a holiday and will be made up on a later Saturday on Feb. 8, the DGPA said in a press release."

兒童節 + 淸明節 Children's Day & Tomb Sweeping Day

According to the DPGA:

  1. Children’s Day: 1 day of holiday. If the Children’s Day falls on the same day as Tomb Sweeping Day, the holiday will be held the day before. However, if Children’s Day falls on a Thursday, the holiday will be held the following day.

So, somehow additional logic would need to be implemented to handle this.

端午節 Dragon Boat Festival

customary holidays involve a day off except for Chinese New Year with three consecutive days off

So, somehow an additional day needs to be added. I don't know if the current language for date-holidays supports this.

How to Proceed

I suppose, I found this problem and perhaps I can help make the data match the official calendars...

bai-yi-bai avatar Nov 24 '24 08:11 bai-yi-bai

Hi @bai-yi-bai, I'd very appreciate if you could raise a PR which fixes the described issues for the named days.

commenthol avatar Nov 26 '24 18:11 commenthol

I'm trying. The contributing.md file was helpful, but I could use some help with the yaml syntax. I thought I'd try a simple one with the Dragon Boat festival, but it turned into a monster.

In Taiwan, Dragon Boat Festival is three consecutive days by statute. For 2025, it should be 2025-05-30, 2025-05-31, and 2025-06-01

chinese 05-0-05 and if Sunday then next Monday:
#chinese 05-0-05 and if Sunday then next Monday and if Tuesday then previous Monday and if Thursday then next Friday and if Saturday then previous Friday:
# Discrepancy
      # (Amended on August 30, 2002)
      # 2012-06-23 Saturday did not include previous Friday https://www.dgpa.gov.tw/en/information?uid=353&pid=6187
      # 2009-06-28 Thursday did include next Friday https://www.dgpa.gov.tw/en/information?uid=353&pid=6190
      # 2008-06-08 Sunday did not include next Monday https://www.dgpa.gov.tw/en/information?uid=353&pid=6191
      # 2005-06-11 Saturday did not include previous Friday https://www.dgpa.gov.tw/en/information?uid=353&pid=6195
        name:
          type: public
          en: Dragon Boat Festival
          zh: 端午節
      # chinese 05-0-04 and if chinese 05-0-05 is public holiday:
      chinese 05-0-04 and if chinese 05-0-05 is public holiday and chinese 05-0-04 is Friday:
        name:
          en: Dragon Boat Festival (Bridge Friday)
          zh: 端午節 (橋 五)

node ./test/sample.js "TW.yaml" 2025 --lang en

I tried using bridge days but it just fails to work.

bai-yi-bai avatar Nov 27 '24 05:11 bai-yi-bai

Update. The government added 3 additional holidays and revised the work calendar for 2025 and published the calendar for 2026. https://www.dgpa.gov.tw/information?uid=82&pid=12574

bai-yi-bai avatar Jun 14 '25 04:06 bai-yi-bai