Skip to content

Commit

Permalink
Merge pull request #692 from sdispater/fix/diff-tests-for-date
Browse files Browse the repository at this point in the history
Fix diff tests for dates
  • Loading branch information
sdispater authored Feb 25, 2023
2 parents 74cc9fd + 8ebab74 commit f071ed3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pendulum/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def is_anniversary(self, dt: date | None = None) -> bool:
Compares the date/month values of the two dates.
"""
if dt is None:
dt = Date.today()
dt = self.__class__.today()

instance = self.__class__(dt.year, dt.month, dt.day)

Expand Down
2 changes: 1 addition & 1 deletion tests/date/test_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

@pytest.fixture
def today():
return pendulum.today().date()
return pendulum.Date.today()


def test_diff_in_years_positive():
Expand Down

0 comments on commit f071ed3

Please sign in to comment.