You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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"?
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?
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:
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...
The text was updated successfully, but these errors were encountered:
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.
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:
Chinese New Year
It looks like several years are incorrect.
date-holidays/data/countries/TW.yaml
Line 27 in 65b10b7
Should the "if" statement for "農曆年初一" instead be "除夕" Move it from the first day 一 to the Eve? From line 27 to line 23?
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:
So, somehow additional logic would need to be implemented to handle this.
端午節 Dragon Boat Festival
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...
The text was updated successfully, but these errors were encountered: