diff --git a/src/plugins/lib/holidays.xml b/src/plugins/lib/holidays.xml index da15cd4f6..0bd0f912c 100644 --- a/src/plugins/lib/holidays.xml +++ b/src/plugins/lib/holidays.xml @@ -21,11 +21,11 @@ + if="date.weekday().__cmp__(4)-1" /> + if="date.weekday() == 0" /> + if="date.weekday() == 0" /> @@ -409,35 +409,25 @@ - - - - - - - - - + + + - - + - - - - - - + + + + + - - - + diff --git a/src/plugins/lib/libholiday.py b/src/plugins/lib/libholiday.py index 8bac3f1c1..1c92c0b34 100644 --- a/src/plugins/lib/libholiday.py +++ b/src/plugins/lib/libholiday.py @@ -87,6 +87,10 @@ def dst(year, area="us"): stop = "%d/%d/%d" % (year, 10, (31 - (math.floor(year * 5 / 4) + 1) % 7)) # Oct return (start, stop) +def isodow(y, m, d): + """ Return the ISO day of week for the given year, month and day. """ + return datetime.date(y, m, d).isoweekday() + #------------------------------------------------------------------------ # # HolidayTable