Repository: jaraco/calendra (language: python)

Issue:
Do not apply "floating monday" holidays by default to  western calendars
Not every country follows the "floating monday" mechanism for holydays. For what I was able to figure out this is mainly used in the USA but not in Europe (certainly not in Italy).

https://github.com/jaraco/calendra/blob/40ec0791697b5de5c749cdb122e8365e64800517/calendra/core.py#L495

The default `observance_shift` should be left `None` or empty dict and should be set only to single calendars.


Discussion / hints:

Fix patch:
diff --git a/calendra/europe/italy.py b/calendra/europe/italy.py
index 4bc95ffc..8e868f26 100644
--- a/calendra/europe/italy.py
+++ b/calendra/europe/italy.py
@@ -22,3 +22,4 @@ class Italy(WesternCalendar):
     include_all_saints = True
     include_boxing_day = True
     boxing_day_label = "St Stephen's Day"
+    observance_shift = None


Test patch:
diff --git a/calendra/tests/test_europe.py b/calendra/tests/test_europe.py
index 7a448fb0..0ba37b39 100644
--- a/calendra/tests/test_europe.py
+++ b/calendra/tests/test_europe.py
@@ -1020,6 +1020,12 @@ def test_labour_day_label(self):
         self.assertEqual(
             holidays[date(2020, 5, 1)], "International Workers' Day")
 
+    def test_workday_after_weekend_holiday(self):
+        # 2024-06-02 was on sunday
+        self.cal.is_working_day(date(2024, 6, 3))
+        # 2024-01-06 was on saturday
+        self.cal.is_working_day(date(2024, 1, 8))
+
 
 class LatviaTest(GenericCalendarTest):