Skip to content

Commit

Permalink
Merge pull request #142 from hf-kklein/sonderfeiertag2025
Browse files Browse the repository at this point in the history
feat: Add "Sonderfeiertag" `2025-04-04`
  • Loading branch information
mj0nez authored Jul 16, 2024
2 parents b6468f3 + 25f8dc5 commit ac15ef0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bdew_datetimes/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import date

from holidays import HolidayBase, HolidaySum
from holidays.constants import DEC
from holidays.constants import APR, DEC
from holidays.countries.germany import Germany


Expand All @@ -27,6 +27,10 @@ def __init__(self, observed: bool = False, **kwargs):
def _populate(self, year):
self[date(year, DEC, 24)] = "Heiligabend"
self[date(year, DEC, 31)] = "Silvester"
if year == 2025:
self[date(2025, APR, 4)] = (
"Sonderfeiertag" # Anlässlich der Einführung des 24h Lieferantenwechsels
)


def create_bdew_calendar() -> HolidaySum:
Expand Down
1 change: 1 addition & 0 deletions tests/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def test_bdew_holidays(expected_holiday: date):
pytest.param(date(2024, 8, 15), True, id="Mariä Himmelfahrt (BY, SL)"),
pytest.param(date(2024, 11, 20), True, id="Buß- und Bettag (SN)"),
pytest.param(date(2024, 12, 31), True, id="Silvester 2024 (BDEW)"),
pytest.param(date(2025, 4, 4), True, id="Sonderfeiertag 2025 (BDEW)"),
],
)
def test_create_bdew_calendar(test_date: date, expected_is_in_calendar: bool):
Expand Down

0 comments on commit ac15ef0

Please sign in to comment.