From 1652fe538214fe2a21e914a6af9ebb8e595ba4ea Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Fri, 29 Jan 2010 14:28:19 +0000 Subject: [PATCH] Easier method (and correct) to calculate Midsommardagen. svn: r14165 --- src/plugins/lib/holidays.xml | 2 +- src/plugins/lib/libholiday.py | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/plugins/lib/holidays.xml b/src/plugins/lib/holidays.xml index 9b5a7e851..4c13ced95 100644 --- a/src/plugins/lib/holidays.xml +++ b/src/plugins/lib/holidays.xml @@ -411,7 +411,7 @@ - + diff --git a/src/plugins/lib/libholiday.py b/src/plugins/lib/libholiday.py index c907cf7b0..8bac3f1c1 100644 --- a/src/plugins/lib/libholiday.py +++ b/src/plugins/lib/libholiday.py @@ -87,21 +87,6 @@ def dst(year, area="us"): stop = "%d/%d/%d" % (year, 10, (31 - (math.floor(year * 5 / 4) + 1) % 7)) # Oct return (start, stop) -def swedish_midsummer_day(year): - """ - Function for calculating date for Swedish Midsummer Day - It is Saturday in week number 25, which is the third or - forth Saturday in June. - First possible date for third Saturday is June, 15 - Last possible date for fourth Saturday is June, 28 - In holidays.xml it is called by - - """ - for day in range(15,29): - d = datetime.date(year, 6, day) - if (year, 25, 6) == d.isocalendar(): - return str(year) + "/6/" + str(day) - #------------------------------------------------------------------------ # # HolidayTable