- Included some tests where the week start changes the result.
- Changed wkst parameter to default to the result of
calendar.firstweekday().
- Added examples in the documentation showing cases where
byweekno may yield results from last year and next year.
diff --git a/test.py b/test.py
index 4903756..6c5396a 100644
--- a/test.py
+++ b/test.py
@@ -2303,6 +2303,28 @@
until=parse("19970901T090000"))),
[])
+ def testWkStIntervalMO(self):
+ self.assertEqual(list(rrule(FREQ_WEEKLY,
+ count=3,
+ interval=2,
+ byweekday=(TU,SU),
+ wkst=MO,
+ dtstart=parse("19970902T090000"))),
+ [datetime(1997, 9, 2, 9, 0),
+ datetime(1997, 9, 7, 9, 0),
+ datetime(1997, 9, 16, 9, 0)])
+
+ def testWkStIntervalSU(self):
+ self.assertEqual(list(rrule(FREQ_WEEKLY,
+ count=3,
+ interval=2,
+ byweekday=(TU,SU),
+ wkst=SU,
+ dtstart=parse("19970902T090000"))),
+ [datetime(1997, 9, 2, 9, 0),
+ datetime(1997, 9, 14, 9, 0),
+ datetime(1997, 9, 16, 9, 0)])
+
class ParserTest(unittest.TestCase):
def setUp(self):
self.tzinfos = {"BRST": -10800}