@@ -35,6 +35,29 @@ def _populate(self, year: int) -> None:
3535 )
3636
3737
38+ _relevant_subdivisions : list [str ] = [
39+ "BB" , # Brandenburg.
40+ "BE" , # Berlin.
41+ "BW" , # Baden-Württemberg.
42+ "BY" , # Bayern.
43+ "HB" , # Bremen.
44+ "HE" , # Hessen.
45+ "HH" , # Hamburg.
46+ "MV" , # Mecklenburg-Vorpommern.
47+ "NI" , # Niedersachsen.
48+ "NW" , # Nordrhein-Westfalen.
49+ "RP" , # Rheinland-Pfalz.
50+ "SH" , # Schleswig-Holstein.
51+ "SL" , # Saarland.
52+ "SN" , # Sachsen.
53+ "ST" , # Sachsen-Anhalt.
54+ "TH" , # Thüringen.
55+ # This list contains an explicit list of all BDEW calendar relevant Germany subdivisions.
56+ # It does _not_ include the 'Augsburg' subdivision which has been added in holidays v0.78.
57+ # https://github.com/vacanza/holidays/commit/feab68b4377369ad52eeee9e98fc8316ec0c6f86
58+ ]
59+
60+
3861def create_bdew_calendar () -> HolidaySum :
3962 """Creates a calendar containing all days considered by the BDEW.
4063
@@ -64,7 +87,7 @@ def create_bdew_calendar() -> HolidaySum:
6487 # If a day is holiday in any subdivision, the holiday is valid nationwide.
6588 # Therefore, we add all subdivisions of Germany to the BDEW specific holidays.
6689 # Currently, in Germany holidays are not observed.
67- for subdivision in Germany . subdivisions :
90+ for subdivision in _relevant_subdivisions :
6891 # the method __add__ expects a Union[int, "HolidayBase", "HolidaySum"] as `other`
6992 # here, we're dealing with a child instance of HolidayBase
7093 result += Germany (
0 commit comments