holidays:
  TW:
    # @attrib https://en.wikipedia.org/wiki/Public_holidays_in_Taiwan
    names:
      zh: 中華民國
      en: Taiwan
    langs:
      - zh
    zones:
      - Asia/Taipei
    dayoff: ""
    days:
      # @source https://law.moj.gov.tw/LawClass/LawAll.aspx?pcode=D0020095
      # Commemoration Days and Holidays Implementation Act (紀念日及節日實施條例),
      # in force since 2025-05-28
      # @source https://law.moj.gov.tw/LawClass/LawAll.aspx?pcode=D0020033
      # Regulations on the Implementation of Memorial Days and Holidays (紀念日及節日實施辦法),
      # repealed 2025-06-06. Art. 5-1, in force since 2015: a holiday on a Saturday is
      # observed on the previous working day, on a Sunday on the next working day; days of
      # Chinese New Year on a weekend are observed on the working days after the holiday.
      # @source https://data.gov.tw/dataset/14718
      # Government office calendars of the DGPA (行政院人事行政總處), used to check
      # the rules for 2017-2027. Extra days off which are made up on a Saturday
      # (調整放假) are not included.
      01-01 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        _name: 01-01
        name:
          zh: 中華民國開國紀念日 / 元旦
          en: Founding of the Republic of China
      # Since 2025-05-28 the holiday starts on the day before New Year's Eve
      1 day before chinese 01-0-00:
        name:
          en: Day before Chinese New Year’s Eve
          zh: 小年夜
        active:
          - from: "2025-05-28"
      chinese 01-0-00:
        name:
          en: Chinese New Year’s Eve
          zh: 農曆除夕
      chinese 01-0-01:
        name:
          en: Chinese New Year
          zh: 農曆年初一
      chinese 01-0-02:
        name:
          en: The second day of the Chinese New Year
          zh: 農曆年初二
      chinese 01-0-03:
        name:
          en: The third day of the Chinese New Year
          zh: 農曆年初三
      # Days of the Chinese New Year holiday on a Saturday or Sunday are observed on the
      # working days after the holiday. The holiday is a block of 4 days (5 days since
      # 2025-05-28) which ends on the 3rd day, so the weekday of the 3rd day gives the
      # substitute days.
      substitutes chinese 01-0-03 if Monday then next Tuesday if Tuesday then next Wednesday if Wednesday then next Thursday if Saturday then next Monday if Sunday then next Monday:
        substitute: true
        name:
          en: Chinese New Year
          zh: 春節
        active:
          - to: "2025-05-28"
      substitutes chinese 01-0-03 if Monday then next Wednesday if Tuesday then next Thursday if Sunday then next Tuesday:
        substitute: true
        name:
          en: Chinese New Year
          zh: 春節
        active:
          - to: "2025-05-28"
      substitutes chinese 01-0-03 if Monday then next Tuesday if Tuesday then next Wednesday if Wednesday then next Thursday if Thursday then next Friday if Saturday then next Monday if Sunday then next Monday:
        substitute: true
        name:
          en: Chinese New Year
          zh: 春節
        active:
          - from: "2025-05-28"
      substitutes chinese 01-0-03 if Monday then next Wednesday if Tuesday then next Thursday if Wednesday then next Friday if Sunday then next Tuesday:
        substitute: true
        name:
          en: Chinese New Year
          zh: 春節
        active:
          - from: "2025-05-28"
      02-28 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        name:
          en: Peace Memorial Day
          zh: 228和平紀念日
      # Children's Day (04-04) is observed the day before Tomb Sweeping Day when both fall
      # on the same day, or the day after when that day is a Thursday. Tomb Sweeping Day
      # is on April 4 or 5, so Children's Day is always the day before it, except in the
      # Thursday case, which is moved with disable/enable (Tomb Sweeping Day on Thursday,
      # April 4 in 2013-2100). On a Saturday the previous
      # Friday is a day off; on a Sunday the next Monday is Tomb Sweeping Day, so the
      # substitute is the Tuesday.
      1 day before chinese 5-01 solarterm and if Saturday then previous Friday if Sunday then next Tuesday:
        substitute: true
        disable:
          - "2013-04-03"
          - "2024-04-03"
          - "2041-04-03"
          - "2052-04-03"
          - "2058-04-03"
          - "2069-04-03"
          - "2075-04-03"
          - "2080-04-03"
          - "2086-04-03"
          - "2097-04-03"
        enable:
          - "2013-04-05"
          - "2024-04-05"
          - "2041-04-05"
          - "2052-04-05"
          - "2058-04-05"
          - "2069-04-05"
          - "2075-04-05"
          - "2080-04-05"
          - "2086-04-05"
          - "2097-04-05"
        name:
          en: Children’s Day
          zh: 兒童節
      # On a Saturday, the previous Friday is Children's Day, so the substitute is the
      # Thursday
      chinese 5-01 solarterm and if Saturday then previous Thursday if Sunday then next Monday:
        substitute: true
        name:
          en: Tomb Sweeping Day
          zh: 民族掃墓節 / 清明節
      "05-01 and if Saturday then previous Friday if Sunday then next Monday #1":
        substitute: true
        _name: 05-01
        name:
          zh: 勞動節
        active:
          - from: "2025-05-28"
      chinese 05-0-05 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        name:
          en: Dragon Boat Festival
          zh: 端午節
      chinese 08-0-15 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        name:
          en: Mid-Autumn Festival
          zh: 中秋節
      09-28 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        name:
          en: Confucius’ Birthday / Teachers’ Day
          zh: 孔子誕辰紀念日 / 教師節
        active:
          - from: "2025-05-28"
      10-10 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        name:
          en: National Day / Double Tenth Day
          zh: 國慶日 / 雙十節
      10-25 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        name:
          en: Taiwan Retrocession and Guningtou Victory Day
          zh: 臺灣光復暨金門古寧頭大捷紀念日
        active:
          - from: "2025-05-28"
      12-25 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        name:
          en: Constitution Day
          zh: 行憲紀念日
        active:
          - from: "2025-05-28"
      # observed
      02-04:
        name:
          en: Farmer’s Day
          zh: 農民節
        type: observance
      03-08:
        _name: 03-08
        type: observance
      03-12:
        name:
          en: Arbor Day
          zh: 國父逝世紀念日
        type: observance
      03-29:
        name:
          en: Youth Day
          zh: 靑年節
        type: observance
      05-01 and if Saturday then previous Friday if Sunday then next Monday:
        substitute: true
        _name: 05-01
        name:
          zh: 勞動節
        type: observance
        note: private sector
        active:
          - to: "2025-05-28"
      05-04:
        name:
          en: Literary Day
          zh: 文藝節
        type: observance
      2nd Sunday in May:
        _name: Mothers Day
        name:
          zh: 母親節
        type: observance
      06-03:
        name:
          en: Opium Suppression Movement Day
          zh: 禁菸節
        type: observance
      08-08:
        _name: Fathers Day
        name:
          zh: 父親節
        type: observance
      09-01:
        name:
          en: Journalist’ Day
          zh: 記者節
        type: observance
      09-03:
        name:
          en: Armed Forces Day
          zh: 軍人節
        type: observance
      09-28:
        name:
          en: Teachers’ Day
          zh: 孔子誕辰紀念日
        type: observance
        active:
          - to: "2025-05-28"
      10-21:
        name:
          en: Overseas Chinese Day
          zh: 華僑節
        type: observance
      10-25:
        name:
          en: Taiwan Retrocession Day
          zh: 臺灣光復節
        type: observance
        active:
          - to: "2025-05-28"
      11-12:
        name:
          en: Sun Yat-sen’s Birthday
          zh: 國父誕辰紀念日
        note: Also Doctors' Day and Cultural Renaissance Day
        type: observance
      december solstice:
        name:
          en: Dongzhi Festival
          zh: 冬至
        type: observance
      12-25:
        name:
          en: Constitution Day
          zh: 行憲紀念日
        type: observance
        active:
          - to: "2025-05-28"
      chinese 01-0-15:
        name:
          en: Lantern Festival
          zh: 元宵節
        type: observance
      "chinese 01-0-15 #1":
        name:
          en: Tourism Day
          zh: 觀光節
        type: observance
      chinese 02-0-02:
        name:
          en: Earth God’s Birthday
          zh: 土地公誕辰
        type: observance
      chinese 02-0-19:
        name:
          en: Kuan Yin’s Birthday
          zh: 觀音誕辰
        type: observance
      chinese 03-0-15:
        name:
          en: God of Medicine’s Birthday
          zh: 保生大帝誕辰
        type: observance
      chinese 03-0-23:
        name:
          en: Matsu’s Birthday
          zh: 媽祖誕辰
        type: observance
      chinese 04-0-08:
        name:
          en: Buddha’s Birthday
          zh: 佛誕日
        type: observance
      chinese 05-0-13:
        name:
          en: Kuan Kung’s Birthday
          zh: 關公誕辰
        type: observance
      "chinese 05-0-13 #1":
        name:
          en: Cheng Huang’s Birthday
          zh: 城隍爺誕辰
        type: observance
      chinese 07-0-07:
        name:
          en: Qixi Festival
          zh: 七夕
        type: observance
      chinese 07-0-15:
        name:
          en: Ghost Festival
          zh: 中元節
        type: observance
      chinese 09-0-09:
        name:
          en: Double Ninth Festival
          zh: 重陽節
        type: observance
      chinese 10-0-15:
        name:
          en: Saisiat Festival
          zh: 賽夏節
        type: observance

    # states:
    #   CHA:
    #     name: Changhua
    #   CYI:
    #     name: Chiayi County
    #   CYQ:
    #     name: Chiayi
    #   HSQ:
    #     name: Hsinchu County
    #   HSZ:
    #     name: Hsinchu
    #   HUA:
    #     name: Hualien
    #   ILA:
    #     name: Yilan
    #   KEE:
    #     name: Keelung
    #   KHH:
    #     name: Kaohsiung
    #   KIN:
    #     name: Kinmen
    #   LIE:
    #     name: Lienchiang
    #   MIA:
    #     name: Miaoli
    #   NAN:
    #     name: Nantou
    #   NWT:
    #     name: New Taipei
    #   PEN:
    #     name: Penghu
    #   PIF:
    #     name: Pingtung
    #   TAO:
    #     name: Taoyuan
    #   TNN:
    #     name: Tainan
    #   TPE:
    #     name: Taipei
    #   TTT:
    #     name: Taitung
    #   TXG:
    #     name: Taichung
    #   YUN:
    #     name: Yunlin
