Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Oct 1, 2024
1 parent dacd890 commit 51eb23c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions holidays/countries/taiwan.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,14 @@ def _populate_observed(

childrens_day = self.tr("兒童節")
for dt in sorted(dts):
for name in self.get_list(dt):
if name == childrens_day and len(self.get_list(dt)) > 1:
# Children’s Day falls on the same day as Tomb Sweeping Day.
self._add_observed(dt, name, CHILDRENS_DAY_RULE)
else:
self._add_observed(dt, name, rule)
names = self.get_list(dt)
for name in names:
self._add_observed(
dt,
name,
# Children's Day falls on the same day as Tomb Sweeping Day.
CHILDRENS_DAY_RULE if name == childrens_day and len(names) > 1 else rule,
)

def _populate_public_holidays(self):
if self._year <= 1911:
Expand Down

0 comments on commit 51eb23c

Please sign in to comment.