Closed wilsonfreitas closed 11 years ago
Calendar's offset method implemented
cal = Calendar('Test')
self.assertEqual(cal.offset('2013-01-02', 1), '2013-01-03')
self.assertEqual(cal.offset('2013-01-02', 3), '2013-01-07')
self.assertEqual(cal.offset('2013-01-01', 1), '2013-01-03')
self.assertEqual(cal.offset('2013-01-01', 0), '2013-01-02')
self.assertEqual(cal.offset('2013-01-02', 0), '2013-01-02')
self.assertEqual(cal.offset('2013-01-02', -1), '2012-12-31')
self.assertEqual(cal.offset('2013-01-02', -3), '2012-12-27')
self.assertEqual(cal.offset('2013-01-01', -1), '2012-12-28')
A
offset
method should be implemented.it can be done with
adjust_next
andadjust_previous