diff options
author | niemeyer <> | 2010-03-30 00:42:25 +0000 |
---|---|---|
committer | niemeyer <> | 2010-03-30 00:42:25 +0000 |
commit | e9f0b2450ce1073ecc7b78a6f8631187bc6d018a (patch) | |
tree | 4c53bcf7b529c00004d5b08f1f310c5dc9d1fa28 /test.py | |
parent | 27bf3ec9d045b3b2ceee376f3b662f057836a76f (diff) | |
download | dateutil-e9f0b2450ce1073ecc7b78a6f8631187bc6d018a.tar.gz |
Adam Ryan reported a problem in the relativedelta implementation which
affected the yearday parameter in the month of January specifically.
This has been unittested and fixed.
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -131,6 +131,11 @@ class RelativeDeltaTest(unittest.TestCase): self.assertEqual(self.today+relativedelta(yearday=261), date(2003, 9, 18)) + def testYearDayBug(self): + # Tests a problem reported by Adam Ryan. + self.assertEqual(date(2010, 1, 1)+relativedelta(yearday=15), + date(2010, 1, 15)) + def testNonLeapYearDay(self): self.assertEqual(date(2003, 1, 1)+relativedelta(nlyearday=260), date(2003, 9, 17)) |