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

Implement Taiwan's unofficial holidays

Open Curtis081 opened this issue 1 year ago • 2 comments

Bug Report

Expected & Actual Behavior

Labor Day is a holiday. but the information not in the module(holidays) - Taiwan class

Environment

  • OS: Windows 10
  • Python version: 3.11
  • holidays version: 0.54

Additional Context

The following is my use example, it will raise the Error. Cause the variable this_is_holiday not in tw_holidays.

import holidays
from datetime import datetime

Taiwan_labor_day = datetime(2024, 5, 1)
Double_tenth_Day = datetime(2024, 10, 10)
  
the_day = Taiwan_labor_day
  
tw_holidays = holidays.Taiwan()
this_is_holiday = the_day in tw_holidays
assert this_is_holiday

Curtis081 avatar Aug 09 '24 06:08 Curtis081

Thanks for reporting this @Curtis081 It seems there is a list of unofficial holidays that hasn't been covered yet.

I've updated the issue title based on that info.

arkid15r avatar Aug 09 '24 15:08 arkid15r

Thank you for your attention and assistance! I have resolved the issue in my project by adding conditional statements.

By the way, there was a small problem with Python inspections: it showed the message "Cannot find reference 'Taiwan' in 'init.py.'"

Thanks again!

Curtis081 avatar Aug 10 '24 06:08 Curtis081

I'm refactoring Taiwan holidays at the moment - relying on the actual holiday law texts as appeared on Chinese language Wikipedia from 1999 onwards i.e. https://zh.wikisource.org/wiki/紀念日及節日實施辦法_(民國88年)

On top of that, it seems like DGPA sources from 2001-2009 are now available online.

Let me know if you've managed to come across earlier legal sources elsewhere as well 🙏 @Curtis081

PPsyrius avatar Mar 08 '25 07:03 PPsyrius