Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中華民國 Taiwan Holidays Calculation Incorrect #490

Open
bai-yi-bai opened this issue Nov 24, 2024 · 2 comments
Open

中華民國 Taiwan Holidays Calculation Incorrect #490

bai-yi-bai opened this issue Nov 24, 2024 · 2 comments

Comments

@bai-yi-bai
Copy link

Hi,

I discovered the public holiday calculation for 中華民國 Taiwan are incorrect when using stretch-my-time-off which uses date-holidays as a source. zachd/stretch-my-time-off#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?

chinese 01-0-01 if Monday then next Friday if Tuesday then next Saturdayif Wednesday then next Sunday if Thursday then next Monday if Friday then next Tuesday if Saturday then next Wednesday if Sunday then next Thursday:
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...

@commenthol
Copy link
Owner

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

@bai-yi-bai
Copy link
Author

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.

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

No branches or pull requests

2 participants