Skip to content

Commit

Permalink
Add observances for Christmas Day and Boxing Day
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Lauf <[email protected]>
  • Loading branch information
lauft committed Aug 25, 2024
1 parent b92b984 commit 987d745
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/holidata/holidays/AU/QLD.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,16 @@ def __init__(self, country):
.on(month=12, day=25) \
.with_flags("RF")

"""
27 December
A public holiday is to be observed on 27 December only if 25 December is a Saturday or Sunday.
"""
self.define_holiday() \
.with_name("Christmas Day (observed)") \
.on(month=12, day=27) \
.with_flags("RF") \
.on_condition(self.date_is_on_weekend(month=12, day=25))

"""
Boxing Day
Public holiday on 26 December.
Expand All @@ -224,6 +234,16 @@ def __init__(self, country):
.on(month=12, day=26) \
.with_flags("RF")

"""
28 December
A public holiday is to be observed on 28 December only if 26 December is a Saturday or Sunday.
"""
self.define_holiday() \
.with_name("Boxing Day (observed)") \
.on(month=12, day=28) \
.with_flags("RF") \
.on_condition(self.date_is_on_weekend(month=12, day=26))

@staticmethod
def date_is_on_weekend(month, day):
def wrapper(year):
Expand Down

0 comments on commit 987d745

Please sign in to comment.