Skip to content

Commit

Permalink
Merge pull request #23 from stanislavlevin/issue_22
Browse files Browse the repository at this point in the history
tests: Fix broken assumption for leap year
  • Loading branch information
jaraco authored Apr 10, 2023
2 parents cca753a + 66540d2 commit 19e422d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tempora/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ def parse_timedelta(str):
Note that months and years strict intervals, not aligned
to a calendar:
>>> now = datetime.datetime.now()
>>> later = now + parse_timedelta('1 year')
>>> diff = later.replace(year=now.year) - now
>>> date = datetime.datetime.fromisoformat('2000-01-01')
>>> later = date + parse_timedelta('1 year')
>>> diff = later.replace(year=date.year) - date
>>> diff.seconds
20940
Expand Down

0 comments on commit 19e422d

Please sign in to comment.